jitters: return non-zero on parsing error
This commit is contained in:
parent
3f51857202
commit
a8f4122146
|
@ -6,11 +6,14 @@
|
||||||
|
|
||||||
int main(void)
|
int main(void)
|
||||||
{
|
{
|
||||||
struct ast_node *res;
|
struct ast_node *ast = NULL;
|
||||||
|
int ret = 0;
|
||||||
yydebug = getenv("PARSE") != NULL;
|
yydebug = getenv("PARSE") != NULL;
|
||||||
if (yyparse(&res) == 0) {
|
if ((ret = yyparse(&ast)) == 0) {
|
||||||
destroy_ast(res);
|
/* Nothing */
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
destroy_ast(ast);
|
||||||
|
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue