public override bool Walk(FoxPro.Compiler.Ast.ClassDefinition node) { ClassNode classNode = new ClassNode(node); AddNode(classNode); return(true); }
// ClassDefinition public override bool Walk(FoxPro.Compiler.Ast.ClassDefinition node) { Define(node.Name, new ClassDefinition(node)); // Base references are in the outer scope foreach (Expression b in node.Bases) { b.Walk(this); } // And so is the __name__ reference Reference(SymbolTable.Name); PushScope(node); // define the __doc__ SymbolId doc = SymbolTable.Doc; Define(doc, new DirectDefinition(typeof(string))); // Walk the body node.Body.Walk(this); return(false); }
public void PostWalk(FoxPro.Compiler.Ast.ClassDefinition node) { AssertCurrent(node); current = current.Parent; }
// ClassDefinition public bool Walk(FoxPro.Compiler.Ast.ClassDefinition node) { current = node; return(Process(node)); }
public ClassScope(Module module, Scope parent, FoxPro.Compiler.Ast.ClassDefinition statement) : base(module, parent) { this.statement = statement; }
public ClassNode(FoxPro.Compiler.Ast.ClassDefinition cls) { this.cls = cls; }
public override void PostWalk(FoxPro.Compiler.Ast.ClassDefinition node) { scopes.Pop(); }
public ClassDefinition(FoxPro.Compiler.Ast.ClassDefinition @class) { this.@class = @class; }
private List <Inferred> InferClassDef(FoxPro.Compiler.Ast.ClassDefinition node, Scope scope) { return(Engine.MakeList <Inferred>(module.GetClass(node))); }
private void PushScope(FoxPro.Compiler.Ast.ClassDefinition cls) { PushScope(new ClassScope(module, current, cls)); }
public InferredClass GetClass(FoxPro.Compiler.Ast.ClassDefinition cls) { Debug.Assert(scopes.ContainsKey(cls)); return(new InferredClass(scopes[cls] as ClassScope)); }