/* throws ParseException */ /* final */ public static AstType astType() { ast.AstType t; AstExp e; jj_consume_token(AstRegExpId.kw56); switch ((jj_ntk == AstRegExpId.UNDEFINED) ? jj_ntk_fn() : jj_ntk) { case AstRegExpId.kwBasicType: jj_consume_token(AstRegExpId.kwBasicType); switch ((jj_ntk == AstRegExpId.UNDEFINED)?jj_ntk_fn():jj_ntk) { case AstRegExpId.kwInt: jj_consume_token(AstRegExpId.kwInt); t = new AstBasicType(AstBasicType.Int); break; case AstRegExpId.kwBool: jj_consume_token(AstRegExpId.kwBool); t = new AstBasicType(AstBasicType.Bool); break; default: jj_la1[6] = jj_gen; jj_consume_token(AstRegExpId.UNDEFINED); throw new AstParseException(); } break; case AstRegExpId.kwObjType: jj_consume_token(AstRegExpId.kwObjType); e = astExp(); t = new AstObjType((AstId)e); break; case AstRegExpId.kwArrayType: jj_consume_token(AstRegExpId.kwArrayType); t = astType(); t = new AstArrayType(t); break; case AstRegExpId.kwNullType: jj_consume_token(AstRegExpId.kwNullType); t = null; break; default: jj_la1[7] = jj_gen; jj_consume_token(AstRegExpId.UNDEFINED); throw new AstParseException(); } jj_consume_token(AstRegExpId.kw57); {if (true) return t;} throw new Error("Missing return statement in function"); }
// ************************************************ // * TYPES // ************************************************ public AstType visit(AstBasicType n) { return n; }