Skip to content

Commit 7b6415d

Browse files
committed
Remove ignoreErrorOrder property. Add error format description
1 parent 8f5f958 commit 7b6415d

File tree

4 files changed

+4
-13
lines changed

4 files changed

+4
-13
lines changed

tokenizer/README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,16 @@ Basic Structure
1414
    "output": [expected_output_tokens],
1515
    "initialStates": [initial_states],
1616
    "lastStartTag": last_start_tag,
17-
    "ignoreErrorOrder": ignore_error_order
17+
"errors": [parse_errors]
1818
    }
1919
]}
2020

2121
Multiple tests per file are allowed simply by adding more objects to the
2222
"tests" list.
2323

24+
Each parse error is an object that contains error `code` and one-based
25+
error location indices: `line` and `col`.
26+
2427
`description`, `input` and `output` are always present. The other values
2528
are optional.
2629

tokenizer/test4.test

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,6 @@
355355
{"description":"U+0000 in lookahead region after non-matching character",
356356
"input":"<!doc>\u0000",
357357
"output":[["Comment", "doc"], ["Character", "\u0000"]],
358-
"ignoreErrorOrder":true,
359358
"errors":[
360359
{ "code": "incorrectly-opened-comment", "line": 1, "col": 3 },
361360
{ "code": "unexpected-null-character", "line": 1, "col": 7 }
@@ -364,15 +363,13 @@
364363
{"description":"U+0000 in lookahead region",
365364
"input":"<!doc\u0000",
366365
"output":[["Comment", "doc\uFFFD"]],
367-
"ignoreErrorOrder":true,
368366
"errors":[
369367
{ "code": "incorrectly-opened-comment", "line": 1, "col": 3 }
370368
]},
371369

372370
{"description":"U+0080 in lookahead region",
373371
"input":"<!doc\u0080",
374372
"output":[["Comment", "doc\u0080"]],
375-
"ignoreErrorOrder":true,
376373
"errors":[
377374
{ "code": "incorrectly-opened-comment", "line": 1, "col": 3 },
378375
{ "code": "control-character-in-input-stream", "line": 1, "col": 6 }
@@ -381,7 +378,6 @@
381378
{"description":"U+FDD1 in lookahead region",
382379
"input":"<!doc\uFDD1",
383380
"output":[["Comment", "doc\uFDD1"]],
384-
"ignoreErrorOrder":true,
385381
"errors":[
386382
{ "code": "incorrectly-opened-comment", "line": 1, "col": 3 },
387383
{ "code": "noncharacter-in-input-stream", "line": 1, "col": 6 }
@@ -390,7 +386,6 @@
390386
{"description":"U+1FFFF in lookahead region",
391387
"input":"<!doc\uD83F\uDFFF",
392388
"output":[["Comment", "doc\uD83F\uDFFF"]],
393-
"ignoreErrorOrder":true,
394389
"errors":[
395390
{ "code": "incorrectly-opened-comment", "line": 1, "col": 3 },
396391
{ "code": "noncharacter-in-input-stream", "line": 1, "col": 6 }

tokenizer/unicodeCharsProblematic.test

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
"doubleEscaped":true,
44
"input": "\\uDFFF",
55
"output":[["Character", "\\uDFFF"]],
6-
"ignoreErrorOrder":true,
76
"errors":[
87
{ "code": "surrogate-in-input-stream", "line": 1, "col": 1 }
98
]},
@@ -12,7 +11,6 @@
1211
"doubleEscaped":true,
1312
"input": "\\uD800",
1413
"output":[["Character", "\\uD800"]],
15-
"ignoreErrorOrder":true,
1614
"errors":[
1715
{ "code": "surrogate-in-input-stream", "line": 1, "col": 1 }
1816
]},
@@ -21,7 +19,6 @@
2119
"doubleEscaped":true,
2220
"input": "a\\uDFFF",
2321
"output":[["Character", "a"], ["Character", "\\uDFFF"]],
24-
"ignoreErrorOrder":true,
2522
"errors":[
2623
{ "code": "surrogate-in-input-stream", "line": 1, "col": 2 }
2724
]},
@@ -30,15 +27,13 @@
3027
"doubleEscaped":true,
3128
"input": "\\uD800a",
3229
"output":[["Character", "\\uD800a"]],
33-
"ignoreErrorOrder":true,
3430
"errors":[
3531
{ "code": "surrogate-in-input-stream", "line": 1, "col": 1 }
3632
]},
3733

3834
{"description":"CR followed by U+0000",
3935
"input":"\r\u0000",
4036
"output":[["Character", "\n"], ["Character", "\u0000"]],
41-
"ignoreErrorOrder":true,
4237
"errors":[
4338
{ "code": "unexpected-null-character", "line": 2, "col": 1 }
4439
]}

tokenizer/xmlViolation.test

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,10 @@
22

33
{"description":"Non-XML character",
44
"input":"a\uFFFFb",
5-
"ignoreErrorOrder":true,
65
"output":[["Character","a\uFFFDb"]]},
76

87
{"description":"Non-XML space",
98
"input":"a\u000Cb",
10-
"ignoreErrorOrder":true,
119
"output":[["Character","a b"]]},
1210

1311
{"description":"Double hyphen in comment",

0 commit comments

Comments
 (0)