This repository was archived by the owner on Apr 1, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 458
Some errors are completely ignored #574
Copy link
Copy link
Closed as not planned
Description
e. g.
λ> parseByteString @JSON.Document @Text tree_sitter_json "{\"a\":} [1]"
Right
(Document
{ann = "{\"a\":} [1]",
extraChildren =
Value
{getValue =
R1
(R1
(R1
(R1
(L1
(Object
{ann = "{\"a\":} [1]",
extraChildren =
[Pair
{ann = "\"a\":} [1]",
value =
Value
{getValue =
L1
(Array
{ann = "[1]",
extraChildren =
[Value
{getValue =
R1
(R1
(R1
(L1
(Number
{ann =
"1",
text =
"1"}))))}]})},
key =
R1
(String
{ann = "\"a\"",
extraChildren =
Just
StringContent
{ann = "a",
extraChildren =
[]}})}]})))))}})
vs
$ tree-sitter parse 2.json
(document [0, 0] - [2, 0]
(object [0, 0] - [0, 10]
(pair [0, 1] - [0, 10]
key: (string [0, 1] - [0, 4]
(string_content [0, 2] - [0, 3]))
(ERROR [0, 5] - [0, 6])
value: (array [0, 7] - [0, 10]
(number [0, 8] - [0, 9])))))
version=current master
Metadata
Metadata
Assignees
Labels
No labels