+2008-09-04 Miguel de Icaza <miguel@novell.com>
+
+ * repl.cs (PrettyPrint): Add Hashtable prettyprint
+
+ * anonymous.cs (AnonymousTypeClass): On EvalMode make the class
+ public.
+
+ * repl.cs: Update help.
+
2008-09-03 Miguel de Icaza <miguel@novell.com>
* driver.cs (ProcessDefaultConfig): Now it encapsulates all the
echo -e 'var a = 1;\na + 2;' | mono --debug gmcs.exe -v --shell
echo -e 'int j;\nj = 1;' | mono --debug gmcs.exe -v --shell
echo -e 'var a = new int[]{1,2,3};\nfrom x in a select x;' | mono --debug gmcs.exe -v --shell
+ echo -e 'var a = from f in System.IO.Directory.GetFiles ("/tmp") where f == "passwd" select f;' | mono gmcs.exe --shell
# read-eval-print-loop test target, for quickly hackign
repl:
readonly ArrayList parameters;
private AnonymousTypeClass (DeclSpace parent, MemberName name, ArrayList parameters, Location loc)
- : base (parent, name, Modifiers.SEALED)
+ : base (parent, name, (RootContext.EvalMode ? Modifiers.PUBLIC : 0) | Modifiers.SEALED)
{
this.parameters = parameters;
}
p ("false");
} else if (result is string){
p (String.Format ("\"{0}\"", EscapeString ((string)result)));
+ } else if (result is Hashtable){
+ Hashtable h = (Hashtable) result;
+ int top = h.Count, count = 0;
+
+ p ("{");
+ foreach (object k in h.Keys){
+ count++;
+ p ("{ ");
+ PrettyPrint (k);
+ p (", ");
+ PrettyPrint (h [k]);
+ if (count != top)
+ p (" }, ");
+ else
+ p (" }");
+ }
+ p ("}");
} else {
p (result.ToString ());
}
{
CloneContext cc = new CloneContext ();
Expression clone = source.Clone (cc);
-
+
clone = clone.Resolve (ec);
if (clone == null)
return null;
return "Static methods:\n"+
" LoadPackage (pkg); - Loads the given Package (like -pkg:FILE)\n" +
" ShowVars (); - Shows defined local variables.\n" +
- " ShowUsing (); - Show active using decltions.\n" +
+ " ShowUsing (); - Show active using decltions.\n" +
+ " Prompt - The prompt used by the C# shell\n" +
+ " ContinuationPrompt - The prompt for partial input\n" +
" help;\n";
}