コード例 #1
0
        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;
        }
コード例 #2
0
        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));
                    }
                }
            }
        }
コード例 #3
0
 public PythonScope(Module module, LanguageService language)
 {
     this.module = module;
     this.language = language;
 }