Fix segmentation fault on function parsing error.

This commit is contained in:
Danila Fedorin 2018-09-12 14:32:23 -07:00
parent c4a7117704
commit b311c854ee

View File

@ -525,6 +525,7 @@ libab_result _parse_fun(struct parser_state* state, libab_tree** store_into) {
libab_result result = LIBAB_SUCCESS;
int is_parenth, is_comma;
libab_tree* temp;
*store_into = NULL;
result = _parser_consume_type(state, TOKEN_KW_FUN);
if (result == LIBAB_SUCCESS) {
if (_parser_is_type(state, TOKEN_ID)) {