diff --git a/src/libre/parser.act b/src/libre/parser.act index abcc28be8..91d10913f 100644 --- a/src/libre/parser.act +++ b/src/libre/parser.act @@ -1095,6 +1095,17 @@ err->e = RE_ESUCCESS; ADVANCE_LEXER; + +#define BUILD_FOR_FUZZER 0 +#if BUILD_FOR_FUZZER + /* these errors currently are not handled properly */ + if (act_state->lex_tok == TOK_ERROR) { + fprintf(stderr, "syntax error\n"); + lx->free(lx->buf_opaque); + goto error; + } +#endif + DIALECT_ENTRY(&flags, lex_state, act_state, err, &ast->expr); lx->free(lx->buf_opaque);