Preserve tokens within errors

This commit is contained in:
Max Brunsfeld 2015-06-15 15:24:15 -07:00
parent 0c4620f3ab
commit 3d0890eecf
9 changed files with 89 additions and 112 deletions

View file

@ -6,7 +6,7 @@ top-level errors
---
(ERROR '}')
(ERROR (UNEXPECTED '}'))
==========================================
unexpected tokens
@ -16,7 +16,7 @@ barf
---
(ERROR 'b')
(ERROR (UNEXPECTED 'b'))
==========================================
errors inside arrays
@ -27,7 +27,7 @@ errors inside arrays
---
(array
(number)
(ERROR ',')
(ERROR (UNEXPECTED ','))
(number))
==========================================
@ -38,7 +38,7 @@ errors inside objects
---
(object (string) (number) (ERROR 'o'))
(object (string) (number) (ERROR (UNEXPECTED 'o')))
==========================================
errors inside nested objects
@ -49,6 +49,8 @@ errors inside nested objects
---
(object
(string) (object (string) (number) (ERROR '2'))
(ERROR '[')
(string) (object
(string) (number)
(ERROR (UNEXPECTED '2') (number)))
(ERROR (UNEXPECTED '['))
(string) (number))