Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono-tools.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/gsharp
diff options
context:
space:
mode:
authorMarek Safar <marek.safar@gmail.com>2012-04-02 23:04:19 +0400
committerMarek Safar <marek.safar@gmail.com>2012-04-02 23:04:19 +0400
commited745e6f998554d4eaa0a99f56eaeca804d42d8a (patch)
tree14c607fd87125dd0b2b03552ec55d32b07933e2a /gsharp
parent1e74ed8ee15a01be19b3ea27488f096bb15dc9a1 (diff)
Update to the master api
Diffstat (limited to 'gsharp')
-rw-r--r--gsharp/Main.cs4
-rw-r--r--gsharp/Shell.cs11
2 files changed, 8 insertions, 7 deletions
diff --git a/gsharp/Main.cs b/gsharp/Main.cs
index 1ac27251..52ed96a0 100644
--- a/gsharp/Main.cs
+++ b/gsharp/Main.cs
@@ -93,7 +93,7 @@ namespace Mono.CSharp.Gui
InteractiveGraphicsBase.Attached = true;
Gtk.Application.Invoke (delegate {
try {
- evaluator = new Evaluator (new CompilerSettings (), new Report (new ConsoleReportPrinter ()));
+ evaluator = new Evaluator (new CompilerContext (new CompilerSettings (), new ConsoleReportPrinter ()));
} catch {
return;
}
@@ -146,4 +146,4 @@ namespace Mono.CSharp.Gui
}
}
}
-} \ No newline at end of file
+}
diff --git a/gsharp/Shell.cs b/gsharp/Shell.cs
index abb5fe42..5f41ea56 100644
--- a/gsharp/Shell.cs
+++ b/gsharp/Shell.cs
@@ -52,7 +52,7 @@ namespace Mono.CSharp.Gui
TextMark end_of_last_processing;
string expr;
Evaluator evaluator;
- Report report;
+ CompilerContext context;
List<string> history = new List<string> ();
int history_cursor;
@@ -74,8 +74,9 @@ namespace Mono.CSharp.Gui
Buffer.InsertWithTagsByName (ref end, "Mono C# Shell, type 'help;' for help\n\nEnter statements or expressions below.\n", "Comment");
ShowPrompt (false);
- report = new Report (new ConsoleReportPrinter ());
- evaluator = new Evaluator (new CompilerSettings (), report);
+
+ context = new CompilerContext (new CompilerSettings (), new ConsoleReportPrinter ());
+ evaluator = new Evaluator (context);
evaluator.DescribeTypeExpressions = true;
evaluator.InteractiveBaseClass = typeof (InteractiveGraphicsBase);
@@ -145,7 +146,7 @@ namespace Mono.CSharp.Gui
bool result_set;
StringWriter errorwriter = new StringWriter ();
- var old_printer = report.SetPrinter (new StreamReportPrinter (errorwriter));
+ var old_printer = context.Report.SetPrinter (new StreamReportPrinter (errorwriter));
try {
res = evaluator.Evaluate (s, out result, out result_set);
@@ -155,7 +156,7 @@ namespace Mono.CSharp.Gui
ShowPrompt (true, false);
return true;
} finally {
- report.SetPrinter (old_printer);
+ context.Report.SetPrinter (old_printer);
}
// Partial input