Remove repetition from language spec descriptions
This commit is contained in:
parent
38ad248a53
commit
8134b64d00
14 changed files with 250 additions and 71 deletions
|
|
@ -1,21 +1,29 @@
|
|||
==========================================
|
||||
recovers from top-level errors
|
||||
top-level errors
|
||||
==========================================
|
||||
|
||||
[}
|
||||
|
||||
---
|
||||
|
||||
(ERROR '}')
|
||||
|
||||
==========================================
|
||||
recovers from unexpected tokens
|
||||
unexpected tokens
|
||||
==========================================
|
||||
|
||||
barf
|
||||
|
||||
---
|
||||
|
||||
(ERROR 'b')
|
||||
|
||||
==========================================
|
||||
recovers from errors inside arrays
|
||||
errors inside arrays
|
||||
==========================================
|
||||
|
||||
[1, , 2]
|
||||
|
||||
---
|
||||
(array
|
||||
(number)
|
||||
|
|
@ -23,17 +31,23 @@ recovers from errors inside arrays
|
|||
(number))
|
||||
|
||||
==========================================
|
||||
recovers from errors inside objects
|
||||
errors inside objects
|
||||
==========================================
|
||||
|
||||
{ "key1": 1, oops }
|
||||
|
||||
---
|
||||
|
||||
(object (string) (number) (ERROR 'o'))
|
||||
|
||||
==========================================
|
||||
recovers from errors inside nested objects
|
||||
errors inside nested objects
|
||||
==========================================
|
||||
|
||||
{ "key1": { "key2": 1, 2 }, [, "key3": 3 }
|
||||
|
||||
---
|
||||
|
||||
(object
|
||||
(string) (object (string) (number) (ERROR '2'))
|
||||
(ERROR '[')
|
||||
|
|
|
|||
|
|
@ -1,20 +1,27 @@
|
|||
=============================
|
||||
parses floating point numbers
|
||||
floating point numbers
|
||||
=============================
|
||||
|
||||
3.14
|
||||
|
||||
---
|
||||
|
||||
(number)
|
||||
|
||||
===================
|
||||
parses empty arrays
|
||||
empty arrays
|
||||
===================
|
||||
|
||||
[]
|
||||
|
||||
---
|
||||
|
||||
(array)
|
||||
|
||||
===================
|
||||
parses arrays
|
||||
arrays
|
||||
===================
|
||||
|
||||
[
|
||||
333,
|
||||
null,
|
||||
|
|
@ -22,7 +29,9 @@ parses arrays
|
|||
false,
|
||||
{ "stuff": "good" }
|
||||
]
|
||||
|
||||
---
|
||||
|
||||
(array
|
||||
(number)
|
||||
(null)
|
||||
|
|
@ -31,21 +40,26 @@ parses arrays
|
|||
(object (string) (string)))
|
||||
|
||||
====================
|
||||
parses empty objects
|
||||
empty objects
|
||||
====================
|
||||
|
||||
{}
|
||||
|
||||
---
|
||||
|
||||
(object)
|
||||
|
||||
===================
|
||||
parses long objects
|
||||
long objects
|
||||
===================
|
||||
|
||||
{
|
||||
"key1": "value1",
|
||||
"key2": 1
|
||||
}
|
||||
|
||||
---
|
||||
|
||||
(object
|
||||
(string) (string)
|
||||
(string) (number))
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue