1 #ifndef GMQCC_PARSER_HDR
2 #define GMQCC_PARSER_HDR
12 #define parser_ctx(p) ((p)->lex->tok.ctx)
22 std::vector<ast_expression *> globals;
23 std::vector<ast_expression *> fields;
24 std::vector<ast_function *> functions;
27 /* must be deleted first, they reference immediates and values */
28 std::vector<ast_value *> accessors;
31 ast_value *reserved_version;
36 ast_function *function;
39 /* All the labels the function defined...
40 * Should they be in ast_function instead?
42 std::vector<ast_label*> labels;
43 std::vector<ast_goto*> gotos;
44 std::vector<const char *> breaks;
45 std::vector<const char *> continues;
47 /* A list of hashtables for each scope */
53 /* not to be used directly, we use the hash table */
54 ast_expression **_locals;
56 ast_value **_typedefs;
57 size_t *_blocktypedefs;
58 lex_ctx_t *_block_ctx;
60 /* we store the '=' operator info */
61 const oper_info *assign_op;
64 ast_value *const_vec[3];
69 /* collected information */
70 size_t max_param_count;
78 char *parser_strdup (const char *str);
79 ast_expression *parser_find_global(parser_t *parser, const char *name);