df307f1bc3
Before, only the syntax level (parse_*) was able to set the error string. This patch fixes the situation so that lexical (lex_*) and stream (stream_*) levels can report detailed error messages. Also, instead of 0, EOF is now returned by stream on error.
139 lines
1.3 KiB
Plaintext
139 lines
1.3 KiB
Plaintext
====
|
|
1
|
|
'[' or '{' expected near end of file
|
|
========
|
|
null
|
|
====
|
|
1
|
|
'[' or '{' expected near 'null'
|
|
========
|
|
{
|
|
====
|
|
2
|
|
string or '}' expected near end of file
|
|
========
|
|
[
|
|
====
|
|
2
|
|
']' expected near end of file
|
|
========
|
|
[,
|
|
====
|
|
1
|
|
unexpected token near ','
|
|
========
|
|
[1,
|
|
====
|
|
2
|
|
']' expected near end of file
|
|
========
|
|
["a
|
|
====
|
|
1
|
|
unexpected newline near '"a'
|
|
========
|
|
["a"
|
|
====
|
|
2
|
|
']' expected near end of file
|
|
========
|
|
['
|
|
====
|
|
1
|
|
invalid token near '''
|
|
========
|
|
{,
|
|
====
|
|
1
|
|
string or '}' expected near ','
|
|
========
|
|
{"
|
|
====
|
|
1
|
|
unexpected newline near '"'
|
|
========
|
|
{"a
|
|
====
|
|
1
|
|
unexpected newline near '"a'
|
|
========
|
|
{"a"
|
|
====
|
|
2
|
|
':' expected near end of file
|
|
========
|
|
{'a'
|
|
====
|
|
1
|
|
string or '}' expected near '''
|
|
========
|
|
{"a":
|
|
====
|
|
2
|
|
unexpected token near end of file
|
|
========
|
|
{"a":"a
|
|
====
|
|
1
|
|
unexpected newline near '"a'
|
|
========
|
|
{[
|
|
====
|
|
1
|
|
string or '}' expected near '['
|
|
========
|
|
[{
|
|
====
|
|
2
|
|
string or '}' expected near end of file
|
|
========
|
|
[{}
|
|
====
|
|
2
|
|
']' expected near end of file
|
|
========
|
|
[1,]
|
|
====
|
|
1
|
|
unexpected token near ']'
|
|
========
|
|
[1,
|
|
2,
|
|
3,
|
|
4,
|
|
5,
|
|
]
|
|
====
|
|
6
|
|
unexpected token near ']'
|
|
========
|
|
[1.]
|
|
====
|
|
1
|
|
invalid token near '1.'
|
|
========
|
|
[1e]
|
|
====
|
|
1
|
|
invalid token near '1e'
|
|
========
|
|
[1ea]
|
|
====
|
|
1
|
|
invalid token near '1e'
|
|
========
|
|
[012]
|
|
====
|
|
1
|
|
invalid token near '0'
|
|
========
|
|
[-012]
|
|
====
|
|
1
|
|
invalid token near '-0'
|
|
========
|
|
[" <-- tab character"]
|
|
====
|
|
1
|
|
control character 0x9 near '"'
|