Show offending lookahead chars when pretty-printing trees w/ errors
This commit is contained in:
parent
844f73c193
commit
2988cc5aa2
5 changed files with 31 additions and 16 deletions
|
|
@ -3,7 +3,7 @@ recovers from errors in function calls
|
|||
==========================================
|
||||
stuff(|||);
|
||||
---
|
||||
(program (expression_statement (function_call (identifier) (ERROR))))
|
||||
(program (expression_statement (function_call (identifier) (ERROR '|'))))
|
||||
|
||||
==========================================
|
||||
recovers from errors in if statements
|
||||
|
|
@ -16,8 +16,8 @@ moreStuff();
|
|||
---
|
||||
(program
|
||||
(expression_statement (function_call (identifier)))
|
||||
(if_statement (ERROR)
|
||||
(statement_block (expression_statement (ERROR))))
|
||||
(if_statement (ERROR '*')
|
||||
(statement_block (expression_statement (ERROR '*'))))
|
||||
(expression_statement (function_call (identifier))))
|
||||
|
||||
==========================================
|
||||
|
|
@ -33,8 +33,8 @@ moreStuff();
|
|||
(expression_statement (function_call (identifier)))
|
||||
(for_statement
|
||||
(var_declaration (assignment (identifier) (number)))
|
||||
(expression_statement (ERROR))
|
||||
(ERROR)
|
||||
(statement_block (expression_statement (ERROR))))
|
||||
(expression_statement (ERROR '*'))
|
||||
(ERROR '*')
|
||||
(statement_block (expression_statement (ERROR '*'))))
|
||||
(expression_statement (function_call (identifier))))
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue