mirror of
https://github.com/DarkPlacesEngine/gmqcc.git
synced 2024-11-24 04:41:25 +00:00
null-init parser_t, add a function member to it
This commit is contained in:
parent
03baa85c43
commit
f4864fd5ac
1 changed files with 4 additions and 0 deletions
4
parser.c
4
parser.c
|
@ -10,6 +10,8 @@ typedef struct {
|
|||
|
||||
MEM_VECTOR_MAKE(ast_value*, globals);
|
||||
MEM_VECTOR_MAKE(ast_function*, functions);
|
||||
|
||||
ast_function *function;
|
||||
} parser_t;
|
||||
|
||||
MEM_VEC_FUNCTIONS(parser_t, ast_value*, globals)
|
||||
|
@ -275,6 +277,8 @@ bool parser_compile(const char *filename)
|
|||
if (!parser)
|
||||
return false;
|
||||
|
||||
memset(&parser, 0, sizeof(parser));
|
||||
|
||||
MEM_VECTOR_INIT(parser, globals);
|
||||
parser->lex = lex_open(filename);
|
||||
|
||||
|
|
Loading…
Reference in a new issue