void VALUE(out AST e) { e = null; List <AST> elist = new List <AST>(); switch (la.kind) { case 4: case 5: { BOOL(); e = new BooleanConst(t.val); break; } case 1: { Get(); e = new IntConst(t.val); break; } case 2: { Get(); e = new FloatConst(t.val); break; } case 6: { Get(); e = new StringConst(t.val); break; } case 10: { LISTCONST(out e); break; } case 3: { IDENTIFIER(out e); if (la.kind == 17) { FUNC(out elist); e = new FunctionStmt(e, elist); } break; } default: SynErr(58); break; } }
void CALL(AST id, out AST e) { e = null; List <AST> stm = new List <AST>(); if (la.kind == 17) { FUNC(out stm); e = new FunctionStmt(id, stm); } else if (la.kind == 10 || la.kind == 12) { ASSIG(out e, id); } else { SynErr(57); } }
public abstract void Visit(FunctionStmt n);