public TypeCheckingVisitor(Ast.Prog prog) { this.m_prog = prog; this.m_errorList = new List <string>(); // Visits Visit(); }
// Visit methods for every relevant Ast type // Looking for Vardefs and VarRefs to insert into the symbol table public void Visit(Ast.Prog prog) { foreach (var stmt in prog.Item) { Visit(stmt); } }
public SymbolTable(Ast.Prog prog) { // Create the symbol table and push a scope onto it this.m_symbolTable = new List <Dictionary <string, Ast.Stmt> >(); this.PushNewScope(); this.m_prog = prog; }