null-init parser_t, add a function member to it

This commit is contained in:
Wolfgang Bumiller 2012-07-19 19:55:25 +02:00
parent 03baa85c43
commit f4864fd5ac

View file

@ -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);