private Module DoAnalyze(Modules modules, string name, Statement root) { GlobalSuite global = new GlobalSuite(root); module = new Module(modules, name, global, scopes); ModuleScope modsc; module.ModuleScope = modsc = new ModuleScope(module, null, global); PushScope(modsc); root.Walk(this); foreach (FieldAssignment fer in this.fields) { fer.Infer(module); } return module; }
public void Infer(Module module) { Engine e = Engine.Create(module, false); IList<Inferred> left = e.Infer(fe.Target, anchor); if (left != null) { foreach (Inferred inf in left) { InferredClass ic = inf as InferredClass; if (ic != null) { ic.Define(fe.Name, new IndirectDefinition(rhs, anchor)); } } } }
public PythonScope(Module module, LanguageService language) { this.module = module; this.language = language; }