diff --git a/parser.c b/parser.c index 5e42997..d086219 100644 --- a/parser.c +++ b/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);