Don't store tree's hidden children in a separate array

Just mark hidden trees as such, and skip them when
pretty-printing a tree
This commit is contained in:
Max Brunsfeld 2014-07-16 18:38:06 -07:00
parent 95fbdb6fdb
commit 779bf0d745
17 changed files with 167 additions and 243 deletions

View file

@ -17,24 +17,24 @@ recovers from errors inside arrays
==========================================
[1, , 2]
---
(value (array
(array
(number)
(ERROR <EOF>)
(number)))
(number))
==========================================
recovers from errors inside objects
==========================================
{ "key1": 1, oops }
---
(value (object (string) (number) (ERROR 'o')))
(object (string) (number) (ERROR 'o'))
==========================================
recovers from errors inside nested objects
==========================================
{ "key1": { "key2": 1, 2 }, [, "key3": 3 }
---
(value (object
(object
(string) (object (string) (number) (ERROR '2'))
(ERROR '[')
(string) (number)))
(string) (number))

View file

@ -3,14 +3,14 @@ parses floating point numbers
=============================
3.14
---
(value (number))
(number)
===================
parses empty arrays
===================
[]
---
(value (array))
(array)
===================
parses arrays
@ -23,19 +23,19 @@ parses arrays
{ "stuff": "good" }
]
---
(value (array
(array
(number)
(null)
(true)
(false)
(object (string) (string))))
(object (string) (string)))
====================
parses empty objects
====================
{}
---
(value (object))
(object)
===================
parses long objects
@ -45,8 +45,7 @@ parses long objects
"key2": 1
}
---
(value (object
(object
(string) (string)
(string) (number)
))
(string) (number))