Show offending lookahead chars when pretty-printing trees w/ errors

This commit is contained in:
Max Brunsfeld 2014-05-26 21:50:01 -07:00
parent 844f73c193
commit 2988cc5aa2
5 changed files with 31 additions and 16 deletions

View file

@ -3,7 +3,7 @@ recovers from errors at the top level
=====================================================
x * * y
---
(ERROR)
(ERROR '*')
=====================================================
recovers from errors inside parenthesized expressions
@ -12,4 +12,4 @@ x + (y * + z) * 5
---
(expression (sum
(variable)
(product (group (ERROR)) (number))))
(product (group (ERROR '+')) (number))))