mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-10 23:32:09 +00:00
Minimal error recovery.
No more bailing on the first syntax error. While the recovery is not perfect (things can get right twisted), qfcc will now continue parsing after a syntax error.
This commit is contained in:
parent
a4635d79e8
commit
dc5bafb8fb
1 changed files with 4 additions and 0 deletions
|
@ -225,6 +225,9 @@ defs
|
|||
: /* empty */
|
||||
| defs {if (current_class) PARSE_ERROR;} def
|
||||
| defs obj_def
|
||||
| error END { current_class = 0; yyerrok; }
|
||||
| error ';' { yyerrok; }
|
||||
| error '}' { yyerrok; }
|
||||
;
|
||||
|
||||
def
|
||||
|
@ -796,6 +799,7 @@ statements
|
|||
|
||||
statement
|
||||
: ';' { $$ = 0; }
|
||||
| error ';' { $$ = 0; yyerrok; }
|
||||
| statement_block { $$ = $1; }
|
||||
| RETURN opt_expr ';'
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue