Skip to content

Commit 1a73a60

Browse files
committed
Update fixtures
1 parent 586bf27 commit 1a73a60

File tree

26 files changed

+4817
-5071
lines changed

26 files changed

+4817
-5071
lines changed

test/fixtures/lightscript/match/arrow-fns/expected.json

Lines changed: 791 additions & 806 deletions
Large diffs are not rendered by default.

test/fixtures/lightscript/match/binary-both-subscripts/expected.json

Lines changed: 110 additions & 125 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
"sourceType": "script",
3030
"body": [
3131
{
32-
"type": "ExpressionStatement",
32+
"type": "MatchStatement",
3333
"start": 0,
3434
"end": 35,
3535
"loc": {
@@ -42,187 +42,172 @@
4242
"column": 26
4343
}
4444
},
45-
"expression": {
46-
"type": "MatchExpression",
47-
"start": 0,
48-
"end": 35,
45+
"discriminant": {
46+
"type": "Identifier",
47+
"start": 6,
48+
"end": 7,
4949
"loc": {
5050
"start": {
5151
"line": 1,
52-
"column": 0
52+
"column": 6
5353
},
5454
"end": {
55-
"line": 2,
56-
"column": 26
57-
}
55+
"line": 1,
56+
"column": 7
57+
},
58+
"identifierName": "x"
5859
},
59-
"discriminant": {
60-
"type": "Identifier",
61-
"start": 6,
62-
"end": 7,
60+
"name": "x"
61+
},
62+
"cases": [
63+
{
64+
"type": "MatchCase",
65+
"start": 11,
66+
"end": 35,
6367
"loc": {
6468
"start": {
65-
"line": 1,
66-
"column": 6
69+
"line": 2,
70+
"column": 2
6771
},
6872
"end": {
69-
"line": 1,
70-
"column": 7
71-
},
72-
"identifierName": "x"
73+
"line": 2,
74+
"column": 26
75+
}
7376
},
74-
"name": "x"
75-
},
76-
"cases": [
77-
{
78-
"type": "MatchCase",
79-
"start": 11,
80-
"end": 35,
77+
"test": {
78+
"type": "BinaryExpression",
79+
"start": 13,
80+
"end": 20,
8181
"loc": {
8282
"start": {
8383
"line": 2,
84-
"column": 2
84+
"column": 4
8585
},
8686
"end": {
8787
"line": 2,
88-
"column": 26
88+
"column": 11
8989
}
9090
},
91-
"test": {
92-
"type": "BinaryExpression",
91+
"left": {
92+
"type": "MemberExpression",
9393
"start": 13,
94-
"end": 20,
94+
"end": 15,
9595
"loc": {
9696
"start": {
9797
"line": 2,
9898
"column": 4
9999
},
100100
"end": {
101101
"line": 2,
102-
"column": 11
102+
"column": 6
103103
}
104104
},
105-
"left": {
106-
"type": "MemberExpression",
107-
"start": 13,
108-
"end": 15,
105+
"object": {
106+
"type": "PlaceholderExpression",
107+
"start": 12,
108+
"end": 13,
109109
"loc": {
110110
"start": {
111111
"line": 2,
112-
"column": 4
112+
"column": 3
113113
},
114114
"end": {
115115
"line": 2,
116-
"column": 6
117-
}
118-
},
119-
"object": {
120-
"type": "PlaceholderExpression",
121-
"start": 12,
122-
"end": 13,
123-
"loc": {
124-
"start": {
125-
"line": 2,
126-
"column": 3
127-
},
128-
"end": {
129-
"line": 2,
130-
"column": 4
131-
}
116+
"column": 4
132117
}
133-
},
134-
"property": {
135-
"type": "Identifier",
136-
"start": 14,
137-
"end": 15,
138-
"loc": {
139-
"start": {
140-
"line": 2,
141-
"column": 5
142-
},
143-
"end": {
144-
"line": 2,
145-
"column": 6
146-
},
147-
"identifierName": "a"
148-
},
149-
"name": "a"
150-
},
151-
"computed": false
118+
}
152119
},
153-
"operator": "+",
154-
"right": {
155-
"type": "MemberExpression",
156-
"start": 18,
157-
"end": 20,
120+
"property": {
121+
"type": "Identifier",
122+
"start": 14,
123+
"end": 15,
158124
"loc": {
159125
"start": {
160126
"line": 2,
161-
"column": 9
127+
"column": 5
162128
},
163129
"end": {
164130
"line": 2,
165-
"column": 11
166-
}
167-
},
168-
"object": {
169-
"type": "PlaceholderExpression",
170-
"start": 17,
171-
"end": 18,
172-
"loc": {
173-
"start": {
174-
"line": 2,
175-
"column": 8
176-
},
177-
"end": {
178-
"line": 2,
179-
"column": 9
180-
}
181-
}
182-
},
183-
"property": {
184-
"type": "Identifier",
185-
"start": 19,
186-
"end": 20,
187-
"loc": {
188-
"start": {
189-
"line": 2,
190-
"column": 10
191-
},
192-
"end": {
193-
"line": 2,
194-
"column": 11
195-
},
196-
"identifierName": "b"
131+
"column": 6
197132
},
198-
"name": "b"
133+
"identifierName": "a"
199134
},
200-
"computed": false
201-
}
135+
"name": "a"
136+
},
137+
"computed": false
202138
},
203-
"consequent": {
204-
"type": "StringLiteral",
205-
"start": 22,
206-
"end": 35,
139+
"operator": "+",
140+
"right": {
141+
"type": "MemberExpression",
142+
"start": 18,
143+
"end": 20,
207144
"loc": {
208145
"start": {
209146
"line": 2,
210-
"column": 13
147+
"column": 9
211148
},
212149
"end": {
213150
"line": 2,
214-
"column": 26
151+
"column": 11
215152
}
216153
},
217-
"extra": {
218-
"rawValue": "has a and b",
219-
"raw": "'has a and b'"
154+
"object": {
155+
"type": "PlaceholderExpression",
156+
"start": 17,
157+
"end": 18,
158+
"loc": {
159+
"start": {
160+
"line": 2,
161+
"column": 8
162+
},
163+
"end": {
164+
"line": 2,
165+
"column": 9
166+
}
167+
}
220168
},
221-
"value": "has a and b"
169+
"property": {
170+
"type": "Identifier",
171+
"start": 19,
172+
"end": 20,
173+
"loc": {
174+
"start": {
175+
"line": 2,
176+
"column": 10
177+
},
178+
"end": {
179+
"line": 2,
180+
"column": 11
181+
},
182+
"identifierName": "b"
183+
},
184+
"name": "b"
185+
},
186+
"computed": false
222187
}
188+
},
189+
"consequent": {
190+
"type": "StringLiteral",
191+
"start": 22,
192+
"end": 35,
193+
"loc": {
194+
"start": {
195+
"line": 2,
196+
"column": 13
197+
},
198+
"end": {
199+
"line": 2,
200+
"column": 26
201+
}
202+
},
203+
"extra": {
204+
"rawValue": "has a and b",
205+
"raw": "'has a and b'"
206+
},
207+
"value": "has a and b"
223208
}
224-
]
225-
}
209+
}
210+
]
226211
}
227212
],
228213
"directives": []

0 commit comments

Comments
 (0)