[Mono-dev] Mono.CSharp.Evaluator questions

Miguel de Icaza miguel at novell.com
Thu Jun 10 17:22:45 EDT 2010


Hello,

1) You cannot do something like this:
>

Correct;   Using statements are parsed independently of expressions, you can
not do this.

The reason is that you need to evaluate either declarations or
expression/statements and using clauses are not expression/statements.


> 2) The method Evaluator.GetVars returns a string that is unnecessary hard
> to parse.
>
> For example:
>
> Random random = new Random ();
> var num = random.Next (5);
> var rslt = num + 5;
>
> Is translated into:
>
> "System.Random random = System.Randomint num = 4int rslt = 9"
>

They should be separated by a newline, I find it strange that it is not
there, the actual strings is:

sb.AppendFormat ("{0} {1} = {2}", fi.Item1.MemberType.GetSignatureForError
(), de.Key, value);
sb.AppendLine ();

Miguel

>
> I will be good at least to separate the variables with a space or a special
> separator character to make this more easy to parse for consumer
> applications.
>
> No need to say that returning the data in type, variable, value separated
> somehow separated in an array will be even better.
>
> Thanks in advance,
>
> Jordi,
>
>
> _______________________________________________
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-devel-list
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-devel-list/attachments/20100610/ef1fbb91/attachment.html 


More information about the Mono-devel-list mailing list