Skip to content

Commit 9222af3

Browse files
committed
Add test for fixed await arrow bug
1 parent af29642 commit 9222af3

File tree

4 files changed

+280
-0
lines changed

4 files changed

+280
-0
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
f() -/> <- x
Lines changed: 139 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,139 @@
1+
{
2+
"type": "File",
3+
"start": 0,
4+
"end": 12,
5+
"loc": {
6+
"start": {
7+
"line": 1,
8+
"column": 0
9+
},
10+
"end": {
11+
"line": 1,
12+
"column": 12
13+
}
14+
},
15+
"program": {
16+
"type": "Program",
17+
"start": 0,
18+
"end": 12,
19+
"loc": {
20+
"start": {
21+
"line": 1,
22+
"column": 0
23+
},
24+
"end": {
25+
"line": 1,
26+
"column": 12
27+
}
28+
},
29+
"sourceType": "script",
30+
"body": [
31+
{
32+
"type": "NamedArrowDeclaration",
33+
"start": 0,
34+
"end": 12,
35+
"loc": {
36+
"start": {
37+
"line": 1,
38+
"column": 0
39+
},
40+
"end": {
41+
"line": 1,
42+
"column": 12
43+
}
44+
},
45+
"id": {
46+
"type": "Identifier",
47+
"start": 0,
48+
"end": 1,
49+
"loc": {
50+
"start": {
51+
"line": 1,
52+
"column": 0
53+
},
54+
"end": {
55+
"line": 1,
56+
"column": 1
57+
},
58+
"identifierName": "f"
59+
},
60+
"name": "f"
61+
},
62+
"generator": false,
63+
"expression": false,
64+
"async": true,
65+
"params": [],
66+
"skinny": true,
67+
"body": {
68+
"type": "BlockStatement",
69+
"start": 4,
70+
"end": 12,
71+
"loc": {
72+
"start": {
73+
"line": 1,
74+
"column": 4
75+
},
76+
"end": {
77+
"line": 1,
78+
"column": 12
79+
}
80+
},
81+
"body": [
82+
{
83+
"type": "ExpressionStatement",
84+
"start": 8,
85+
"end": 12,
86+
"loc": {
87+
"start": {
88+
"line": 1,
89+
"column": 8
90+
},
91+
"end": {
92+
"line": 1,
93+
"column": 12
94+
}
95+
},
96+
"expression": {
97+
"type": "AwaitExpression",
98+
"start": 8,
99+
"end": 12,
100+
"loc": {
101+
"start": {
102+
"line": 1,
103+
"column": 8
104+
},
105+
"end": {
106+
"line": 1,
107+
"column": 12
108+
}
109+
},
110+
"argument": {
111+
"type": "Identifier",
112+
"start": 11,
113+
"end": 12,
114+
"loc": {
115+
"start": {
116+
"line": 1,
117+
"column": 11
118+
},
119+
"end": {
120+
"line": 1,
121+
"column": 12
122+
},
123+
"identifierName": "x"
124+
},
125+
"name": "x"
126+
}
127+
}
128+
}
129+
],
130+
"directives": [],
131+
"extra": {
132+
"curly": false
133+
}
134+
}
135+
}
136+
],
137+
"directives": []
138+
}
139+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
f() -/> <!- x
Lines changed: 139 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,139 @@
1+
{
2+
"type": "File",
3+
"start": 0,
4+
"end": 13,
5+
"loc": {
6+
"start": {
7+
"line": 1,
8+
"column": 0
9+
},
10+
"end": {
11+
"line": 1,
12+
"column": 13
13+
}
14+
},
15+
"program": {
16+
"type": "Program",
17+
"start": 0,
18+
"end": 13,
19+
"loc": {
20+
"start": {
21+
"line": 1,
22+
"column": 0
23+
},
24+
"end": {
25+
"line": 1,
26+
"column": 13
27+
}
28+
},
29+
"sourceType": "script",
30+
"body": [
31+
{
32+
"type": "NamedArrowDeclaration",
33+
"start": 0,
34+
"end": 13,
35+
"loc": {
36+
"start": {
37+
"line": 1,
38+
"column": 0
39+
},
40+
"end": {
41+
"line": 1,
42+
"column": 13
43+
}
44+
},
45+
"id": {
46+
"type": "Identifier",
47+
"start": 0,
48+
"end": 1,
49+
"loc": {
50+
"start": {
51+
"line": 1,
52+
"column": 0
53+
},
54+
"end": {
55+
"line": 1,
56+
"column": 1
57+
},
58+
"identifierName": "f"
59+
},
60+
"name": "f"
61+
},
62+
"generator": false,
63+
"expression": false,
64+
"async": true,
65+
"params": [],
66+
"skinny": true,
67+
"body": {
68+
"type": "BlockStatement",
69+
"start": 4,
70+
"end": 13,
71+
"loc": {
72+
"start": {
73+
"line": 1,
74+
"column": 4
75+
},
76+
"end": {
77+
"line": 1,
78+
"column": 13
79+
}
80+
},
81+
"body": [
82+
{
83+
"type": "ExpressionStatement",
84+
"start": 8,
85+
"end": 13,
86+
"loc": {
87+
"start": {
88+
"line": 1,
89+
"column": 8
90+
},
91+
"end": {
92+
"line": 1,
93+
"column": 13
94+
}
95+
},
96+
"expression": {
97+
"type": "SafeAwaitExpression",
98+
"start": 8,
99+
"end": 13,
100+
"loc": {
101+
"start": {
102+
"line": 1,
103+
"column": 8
104+
},
105+
"end": {
106+
"line": 1,
107+
"column": 13
108+
}
109+
},
110+
"argument": {
111+
"type": "Identifier",
112+
"start": 12,
113+
"end": 13,
114+
"loc": {
115+
"start": {
116+
"line": 1,
117+
"column": 12
118+
},
119+
"end": {
120+
"line": 1,
121+
"column": 13
122+
},
123+
"identifierName": "x"
124+
},
125+
"name": "x"
126+
}
127+
}
128+
}
129+
],
130+
"directives": [],
131+
"extra": {
132+
"curly": false
133+
}
134+
}
135+
}
136+
],
137+
"directives": []
138+
}
139+
}

0 commit comments

Comments
 (0)