public override void visit(IntDcl n) { if (!AST.SymbolTable.ContainsKey(n.id)) { AST.SymbolTable.Add(n.id, AST.INTTYPE); } else { error("variable " + n.id + " is already declared"); } }
void dcl(out SymDeclaring e) { e = null; if (la.kind == 3) { Get(); Expect(8); e = new FloatDcl(t.val); } else if (la.kind == 4) { Get(); Expect(8); e = new IntDcl(t.val); } else { SynErr(11); } }
public abstract void visit(IntDcl n);
public override void visit(IntDcl n) { //throw new NotImplementedException(); }
public override void visit(IntDcl n) { //Console.Write($"i {n.id} "); Console.WriteLine($"i {n.id} "); }
public override void visit(IntDcl n) { emit("int " + n.id + ";\n"); }