static Thread invoke_thread;
static ArrayList using_alias_list = new ArrayList ();
- static ArrayList using_list = new ArrayList ();
+ internal static ArrayList using_list = new ArrayList ();
static Hashtable fields = new Hashtable ();
static Type interactive_base_class = typeof (InteractiveBase);
if (inited)
return new string [0];
- RootContext.Version = LanguageVersion.Default;
driver = Driver.Create (args, false);
if (driver == null)
throw new Exception ("Failed to create compiler driver with the given arguments");
bool partial_input;
CSharpParser parser = ParseString (ParseMode.GetCompletions, input, out partial_input);
if (parser == null){
- Console.WriteLine ("DEBUG: No completions available");
+ if (CSharpParser.yacc_verbose_flag != 0)
+ Console.WriteLine ("DEBUG: No completions available");
return null;
}
Class parser_result = parser.InteractiveResult as Class;
if (parser_result == null){
- Console.WriteLine ("Do not know how to cope with !Class yet");
+ if (CSharpParser.yacc_verbose_flag != 0)
+ Console.WriteLine ("Do not know how to cope with !Class yet");
return null;
}
if (method == null)
throw new InternalErrorException ("did not find the the Host method");
- EmitContext ec = method.CreateEmitContext (method.Parent, null);
- bool unreach;
+ EmitContext ec = method.CreateEmitContext (null);
try {
- ec.ResolveTopBlock (null, method.Block, method.ParameterInfo, method, out unreach);
+ method.Block.Resolve (null, ec, method.ParameterInfo, method);
} catch (CompletionResult cr){
prefix = cr.BaseText;
return cr.Result;
parser.Lexer.CompleteOnEOF = true;
bool disable_error_reporting;
- if (mode == ParseMode.Silent && CSharpParser.yacc_verbose_flag == 0)
+ if ((mode == ParseMode.Silent || mode == ParseMode.GetCompletions) && CSharpParser.yacc_verbose_flag == 0)
disable_error_reporting = true;
else
disable_error_reporting = false;
}
}
+ static internal ICollection GetUsingList ()
+ {
+ ArrayList res = new ArrayList (using_list.Count);
+ foreach (object ue in using_list)
+ res.Add (ue.ToString ());
+ return res;
+ }
+
static internal string [] GetVarNames ()
{
lock (evaluator_lock){
TypeContainer container;
string name;
- public LocalVariableReferenceWithClassSideEffect (TypeContainer container, string name, Block current_block, string local_variable_id, Location loc)
- : base (current_block, local_variable_id, loc)
+ public LocalVariableReferenceWithClassSideEffect (TypeContainer container, string name, Block current_block, string local_variable_id, LocalInfo li, Location loc)
+ : base (current_block, local_variable_id, loc, li, false)
{
this.container = container;
this.name = name;