Skip to content

Commit df2f9f5

Browse files
committed
Chore: add tests about eof-in-comment
1 parent 7f38c49 commit df2f9f5

File tree

15 files changed

+870
-0
lines changed

15 files changed

+870
-0
lines changed
Lines changed: 166 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,166 @@
1+
{
2+
"type": "Program",
3+
"start": 0,
4+
"end": 0,
5+
"loc": {
6+
"start": {
7+
"line": 1,
8+
"column": 0
9+
},
10+
"end": {
11+
"line": 1,
12+
"column": 0
13+
}
14+
},
15+
"range": [
16+
0,
17+
0
18+
],
19+
"body": [],
20+
"sourceType": "script",
21+
"comments": [],
22+
"tokens": [],
23+
"templateBody": {
24+
"type": "VElement",
25+
"range": [
26+
0,
27+
15
28+
],
29+
"loc": {
30+
"start": {
31+
"line": 1,
32+
"column": 0
33+
},
34+
"end": {
35+
"line": 2,
36+
"column": 4
37+
}
38+
},
39+
"name": "template",
40+
"namespace": "http://www.w3.org/1999/xhtml",
41+
"startTag": {
42+
"type": "VStartTag",
43+
"range": [
44+
0,
45+
10
46+
],
47+
"loc": {
48+
"start": {
49+
"line": 1,
50+
"column": 0
51+
},
52+
"end": {
53+
"line": 1,
54+
"column": 10
55+
}
56+
},
57+
"attributes": []
58+
},
59+
"children": [
60+
{
61+
"type": "VText",
62+
"range": [
63+
10,
64+
15
65+
],
66+
"loc": {
67+
"start": {
68+
"line": 1,
69+
"column": 10
70+
},
71+
"end": {
72+
"line": 2,
73+
"column": 4
74+
}
75+
},
76+
"value": "\n "
77+
}
78+
],
79+
"endTag": null,
80+
"variables": [],
81+
"tokens": [
82+
{
83+
"type": "HTMLTagOpen",
84+
"range": [
85+
0,
86+
9
87+
],
88+
"loc": {
89+
"start": {
90+
"line": 1,
91+
"column": 0
92+
},
93+
"end": {
94+
"line": 1,
95+
"column": 9
96+
}
97+
},
98+
"value": "template"
99+
},
100+
{
101+
"type": "HTMLTagClose",
102+
"range": [
103+
9,
104+
10
105+
],
106+
"loc": {
107+
"start": {
108+
"line": 1,
109+
"column": 9
110+
},
111+
"end": {
112+
"line": 1,
113+
"column": 10
114+
}
115+
},
116+
"value": ""
117+
},
118+
{
119+
"type": "HTMLWhitespace",
120+
"range": [
121+
10,
122+
15
123+
],
124+
"loc": {
125+
"start": {
126+
"line": 1,
127+
"column": 10
128+
},
129+
"end": {
130+
"line": 2,
131+
"column": 4
132+
}
133+
},
134+
"value": "\n "
135+
}
136+
],
137+
"comments": [
138+
{
139+
"type": "HTMLComment",
140+
"range": [
141+
15,
142+
20
143+
],
144+
"loc": {
145+
"start": {
146+
"line": 2,
147+
"column": 4
148+
},
149+
"end": {
150+
"line": 2,
151+
"column": 9
152+
}
153+
},
154+
"value": ""
155+
}
156+
],
157+
"errors": [
158+
{
159+
"message": "eof-in-comment (2:9)",
160+
"index": 20,
161+
"lineNumber": 2,
162+
"column": 9
163+
}
164+
]
165+
}
166+
}
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
<template>
2+
<!---
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[
2+
"<template",
3+
">",
4+
"\n ",
5+
"<!---"
6+
]
Lines changed: 166 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,166 @@
1+
{
2+
"type": "Program",
3+
"start": 0,
4+
"end": 0,
5+
"loc": {
6+
"start": {
7+
"line": 1,
8+
"column": 0
9+
},
10+
"end": {
11+
"line": 1,
12+
"column": 0
13+
}
14+
},
15+
"range": [
16+
0,
17+
0
18+
],
19+
"body": [],
20+
"sourceType": "script",
21+
"comments": [],
22+
"tokens": [],
23+
"templateBody": {
24+
"type": "VElement",
25+
"range": [
26+
0,
27+
15
28+
],
29+
"loc": {
30+
"start": {
31+
"line": 1,
32+
"column": 0
33+
},
34+
"end": {
35+
"line": 2,
36+
"column": 4
37+
}
38+
},
39+
"name": "template",
40+
"namespace": "http://www.w3.org/1999/xhtml",
41+
"startTag": {
42+
"type": "VStartTag",
43+
"range": [
44+
0,
45+
10
46+
],
47+
"loc": {
48+
"start": {
49+
"line": 1,
50+
"column": 0
51+
},
52+
"end": {
53+
"line": 1,
54+
"column": 10
55+
}
56+
},
57+
"attributes": []
58+
},
59+
"children": [
60+
{
61+
"type": "VText",
62+
"range": [
63+
10,
64+
15
65+
],
66+
"loc": {
67+
"start": {
68+
"line": 1,
69+
"column": 10
70+
},
71+
"end": {
72+
"line": 2,
73+
"column": 4
74+
}
75+
},
76+
"value": "\n "
77+
}
78+
],
79+
"endTag": null,
80+
"variables": [],
81+
"tokens": [
82+
{
83+
"type": "HTMLTagOpen",
84+
"range": [
85+
0,
86+
9
87+
],
88+
"loc": {
89+
"start": {
90+
"line": 1,
91+
"column": 0
92+
},
93+
"end": {
94+
"line": 1,
95+
"column": 9
96+
}
97+
},
98+
"value": "template"
99+
},
100+
{
101+
"type": "HTMLTagClose",
102+
"range": [
103+
9,
104+
10
105+
],
106+
"loc": {
107+
"start": {
108+
"line": 1,
109+
"column": 9
110+
},
111+
"end": {
112+
"line": 1,
113+
"column": 10
114+
}
115+
},
116+
"value": ""
117+
},
118+
{
119+
"type": "HTMLWhitespace",
120+
"range": [
121+
10,
122+
15
123+
],
124+
"loc": {
125+
"start": {
126+
"line": 1,
127+
"column": 10
128+
},
129+
"end": {
130+
"line": 2,
131+
"column": 4
132+
}
133+
},
134+
"value": "\n "
135+
}
136+
],
137+
"comments": [
138+
{
139+
"type": "HTMLComment",
140+
"range": [
141+
15,
142+
21
143+
],
144+
"loc": {
145+
"start": {
146+
"line": 2,
147+
"column": 4
148+
},
149+
"end": {
150+
"line": 2,
151+
"column": 10
152+
}
153+
},
154+
"value": " "
155+
}
156+
],
157+
"errors": [
158+
{
159+
"message": "eof-in-comment (2:10)",
160+
"index": 21,
161+
"lineNumber": 2,
162+
"column": 10
163+
}
164+
]
165+
}
166+
}
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
<template>
2+
<!-- -
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[
2+
"<template",
3+
">",
4+
"\n ",
5+
"<!-- -"
6+
]

0 commit comments

Comments
 (0)