Skip to content

Commit 03e4c96

Browse files
committed
feat: support expression continuations after newlines
1 parent 5033129 commit 03e4c96

File tree

5 files changed

+893
-2
lines changed

5 files changed

+893
-2
lines changed
Lines changed: 366 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,366 @@
1+
1╭─ a=x!
2+
│ ││╰─ attrValue.value "x!\ny"
3+
│ │├─ attrValue "=x!\ny"
4+
│ │╰─ attrName
5+
╰─ ╰─ tagName
6+
2├─ y
7+
3╭─ a=x*
8+
│ ││╰─ attrValue.value "x*\ny"
9+
│ │├─ attrValue "=x*\ny"
10+
│ │╰─ attrName
11+
│ ├─ closeTag(a)
12+
│ ├─ openTagEnd(a)
13+
╰─ ╰─ tagName
14+
4├─ y
15+
5╭─ a=x**
16+
│ ││╰─ attrValue.value "x**\ny"
17+
│ │├─ attrValue "=x**\ny"
18+
│ │╰─ attrName
19+
│ ├─ closeTag(a)
20+
│ ├─ openTagEnd(a)
21+
╰─ ╰─ tagName
22+
6├─ y
23+
7╭─ a=x%
24+
│ ││╰─ attrValue.value "x%\ny"
25+
│ │├─ attrValue "=x%\ny"
26+
│ │╰─ attrName
27+
│ ├─ closeTag(a)
28+
│ ├─ openTagEnd(a)
29+
╰─ ╰─ tagName
30+
8├─ y
31+
9╭─ a=x&
32+
│ ││╰─ attrValue.value "x&\ny"
33+
│ │├─ attrValue "=x&\ny"
34+
│ │╰─ attrName
35+
│ ├─ closeTag(a)
36+
│ ├─ openTagEnd(a)
37+
╰─ ╰─ tagName
38+
10├─ y
39+
11╭─ a=x&&
40+
│ ││╰─ attrValue.value "x&&\ny"
41+
│ │├─ attrValue "=x&&\ny"
42+
│ │╰─ attrName
43+
│ ├─ closeTag(a)
44+
│ ├─ openTagEnd(a)
45+
╰─ ╰─ tagName
46+
12├─ y
47+
13╭─ a=x^
48+
│ ││╰─ attrValue.value "x^\ny"
49+
│ │├─ attrValue "=x^\ny"
50+
│ │╰─ attrName
51+
│ ├─ closeTag(a)
52+
│ ├─ openTagEnd(a)
53+
╰─ ╰─ tagName
54+
14├─ y
55+
15╭─ a=x~
56+
│ ││╰─ attrValue.value "x~\ny"
57+
│ │├─ attrValue "=x~\ny"
58+
│ │╰─ attrName
59+
│ ├─ closeTag(a)
60+
│ ├─ openTagEnd(a)
61+
╰─ ╰─ tagName
62+
16├─ y
63+
17╭─ a=x|
64+
│ ││╰─ attrValue.value "x|\ny"
65+
│ │├─ attrValue "=x|\ny"
66+
│ │╰─ attrName
67+
│ ├─ closeTag(a)
68+
│ ├─ openTagEnd(a)
69+
╰─ ╰─ tagName
70+
18├─ y
71+
19╭─ a=x||
72+
│ ││╰─ attrValue.value "x||\ny"
73+
│ │├─ attrValue "=x||\ny"
74+
│ │╰─ attrName
75+
│ ├─ closeTag(a)
76+
│ ├─ openTagEnd(a)
77+
╰─ ╰─ tagName
78+
20├─ y
79+
21╭─ a=x??
80+
│ ││╰─ attrValue.value "x??\ny"
81+
│ │├─ attrValue "=x??\ny"
82+
│ │╰─ attrName
83+
│ ├─ closeTag(a)
84+
│ ├─ openTagEnd(a)
85+
╰─ ╰─ tagName
86+
22├─ y
87+
23╭─ a=x?
88+
│ ││╰─ attrValue.value "x?\ny:\nz"
89+
│ │├─ attrValue "=x?\ny:\nz"
90+
│ │╰─ attrName
91+
│ ├─ closeTag(a)
92+
│ ├─ openTagEnd(a)
93+
╰─ ╰─ tagName
94+
24├─ y:
95+
25├─ z
96+
26╭─ a=x==
97+
│ ││╰─ attrValue.value "x==\ny"
98+
│ │├─ attrValue "=x==\ny"
99+
│ │╰─ attrName
100+
│ ├─ closeTag(a)
101+
│ ├─ openTagEnd(a)
102+
╰─ ╰─ tagName
103+
27├─ y
104+
28╭─ a=x===
105+
│ ││╰─ attrValue.value "x===\ny"
106+
│ │├─ attrValue "=x===\ny"
107+
│ │╰─ attrName
108+
│ ├─ closeTag(a)
109+
│ ├─ openTagEnd(a)
110+
╰─ ╰─ tagName
111+
29├─ y
112+
30╭─ a=x!=
113+
│ ││╰─ attrValue.value "x!=\ny"
114+
│ │├─ attrValue "=x!=\ny"
115+
│ │╰─ attrName
116+
│ ├─ closeTag(a)
117+
│ ├─ openTagEnd(a)
118+
╰─ ╰─ tagName
119+
31├─ y
120+
32╭─ a=x!==
121+
│ ││╰─ attrValue.value "x!==\ny"
122+
│ │├─ attrValue "=x!==\ny"
123+
│ │╰─ attrName
124+
│ ├─ closeTag(a)
125+
│ ├─ openTagEnd(a)
126+
╰─ ╰─ tagName
127+
33├─ y
128+
34╭─ a=x<=
129+
│ ││╰─ attrValue.value "x<=\ny"
130+
│ │├─ attrValue "=x<=\ny"
131+
│ │╰─ attrName
132+
│ ├─ closeTag(a)
133+
│ ├─ openTagEnd(a)
134+
╰─ ╰─ tagName
135+
35├─ y
136+
36╭─ a=x>=
137+
│ ││╰─ attrValue.value "x>=\ny"
138+
│ │├─ attrValue "=x>=\ny"
139+
│ │╰─ attrName
140+
│ ├─ closeTag(a)
141+
│ ├─ openTagEnd(a)
142+
╰─ ╰─ tagName
143+
37├─ y
144+
38╭─ a=x&=
145+
│ ││╰─ attrValue.value "x&=\ny"
146+
│ │├─ attrValue "=x&=\ny"
147+
│ │╰─ attrName
148+
│ ├─ closeTag(a)
149+
│ ├─ openTagEnd(a)
150+
╰─ ╰─ tagName
151+
39├─ y
152+
40╭─ a=x&&=
153+
│ ││╰─ attrValue.value "x&&=\ny"
154+
│ │├─ attrValue "=x&&=\ny"
155+
│ │╰─ attrName
156+
│ ├─ closeTag(a)
157+
│ ├─ openTagEnd(a)
158+
╰─ ╰─ tagName
159+
41├─ y
160+
42╭─ a=x|=
161+
│ ││╰─ attrValue.value "x|=\ny"
162+
│ │├─ attrValue "=x|=\ny"
163+
│ │╰─ attrName
164+
│ ├─ closeTag(a)
165+
│ ├─ openTagEnd(a)
166+
╰─ ╰─ tagName
167+
43├─ y
168+
44╭─ a=x||=
169+
│ ││╰─ attrValue.value "x||=\ny"
170+
│ │├─ attrValue "=x||=\ny"
171+
│ │╰─ attrName
172+
│ ├─ closeTag(a)
173+
│ ├─ openTagEnd(a)
174+
╰─ ╰─ tagName
175+
45├─ y
176+
46╭─ a=x^=
177+
│ ││╰─ attrValue.value "x^=\ny"
178+
│ │├─ attrValue "=x^=\ny"
179+
│ │╰─ attrName
180+
│ ├─ closeTag(a)
181+
│ ├─ openTagEnd(a)
182+
╰─ ╰─ tagName
183+
47├─ y
184+
48╭─ a=x~=
185+
│ ││╰─ attrValue.value "x~=\ny"
186+
│ │├─ attrValue "=x~=\ny"
187+
│ │╰─ attrName
188+
│ ├─ closeTag(a)
189+
│ ├─ openTagEnd(a)
190+
╰─ ╰─ tagName
191+
49├─ y
192+
50╭─ a=x>>=
193+
│ ││╰─ attrValue.value "x>>=\ny"
194+
│ │├─ attrValue "=x>>=\ny"
195+
│ │╰─ attrName
196+
│ ├─ closeTag(a)
197+
│ ├─ openTagEnd(a)
198+
╰─ ╰─ tagName
199+
51├─ y
200+
52╭─ a=x>>>=
201+
│ ││╰─ attrValue.value "x>>>=\ny"
202+
│ │├─ attrValue "=x>>>=\ny"
203+
│ │╰─ attrName
204+
│ ├─ closeTag(a)
205+
│ ├─ openTagEnd(a)
206+
╰─ ╰─ tagName
207+
53├─ y
208+
54╭─ a=x-=
209+
│ ││╰─ attrValue.value "x-=\ny"
210+
│ │├─ attrValue "=x-=\ny"
211+
│ │╰─ attrName
212+
│ ├─ closeTag(a)
213+
│ ├─ openTagEnd(a)
214+
╰─ ╰─ tagName
215+
55├─ y
216+
56╭─ a=x/=
217+
│ ││╰─ attrValue.value "x/=\ny"
218+
│ │├─ attrValue "=x/=\ny"
219+
│ │╰─ attrName
220+
│ ├─ closeTag(a)
221+
│ ├─ openTagEnd(a)
222+
╰─ ╰─ tagName
223+
57├─ y
224+
58╭─ a=x*=
225+
│ ││╰─ attrValue.value "x*=\ny"
226+
│ │├─ attrValue "=x*=\ny"
227+
│ │╰─ attrName
228+
│ ├─ closeTag(a)
229+
│ ├─ openTagEnd(a)
230+
╰─ ╰─ tagName
231+
59├─ y
232+
60╭─ a=x**=
233+
│ ││╰─ attrValue.value "x**=\ny"
234+
│ │├─ attrValue "=x**=\ny"
235+
│ │╰─ attrName
236+
│ ├─ closeTag(a)
237+
│ ├─ openTagEnd(a)
238+
╰─ ╰─ tagName
239+
61├─ y
240+
62╭─ a=x%=
241+
│ ││╰─ attrValue.value "x%=\ny"
242+
│ │├─ attrValue "=x%=\ny"
243+
│ │╰─ attrName
244+
│ ├─ closeTag(a)
245+
│ ├─ openTagEnd(a)
246+
╰─ ╰─ tagName
247+
63├─ y
248+
64╭─ a=x+=
249+
│ ││╰─ attrValue.value "x+=\ny"
250+
│ │├─ attrValue "=x+=\ny"
251+
│ │╰─ attrName
252+
│ ├─ closeTag(a)
253+
│ ├─ openTagEnd(a)
254+
╰─ ╰─ tagName
255+
65├─ y
256+
66╭─ a=x.
257+
│ ││╰─ attrValue.value "x.\ny"
258+
│ │├─ attrValue "=x.\ny"
259+
│ │╰─ attrName
260+
│ ├─ closeTag(a)
261+
│ ├─ openTagEnd(a)
262+
╰─ ╰─ tagName
263+
67├─ y
264+
68╭─ a=x++
265+
│ ││╰─ attrValue.value "x++\n+y"
266+
│ │├─ attrValue "=x++\n+y"
267+
│ │╰─ attrName
268+
│ ├─ closeTag(a)
269+
│ ├─ openTagEnd(a)
270+
╰─ ╰─ tagName
271+
69├─ +y
272+
70╭─ a=x+
273+
│ ││╰─ attrValue.value "x+\n++y"
274+
│ │├─ attrValue "=x+\n++y"
275+
│ │╰─ attrName
276+
│ ├─ closeTag(a)
277+
│ ├─ openTagEnd(a)
278+
╰─ ╰─ tagName
279+
71├─ ++y
280+
72╭─ a=x>
281+
│ ││╰─ attrValue.value "x>\ny"
282+
│ │├─ attrValue "=x>\ny"
283+
│ │╰─ attrName
284+
│ ├─ closeTag(a)
285+
│ ├─ openTagEnd(a)
286+
╰─ ╰─ tagName
287+
73├─ y
288+
74╭─ a=x>>
289+
│ ││╰─ attrValue.value "x>>\ny"
290+
│ │├─ attrValue "=x>>\ny"
291+
│ │╰─ attrName
292+
│ ├─ closeTag(a)
293+
│ ├─ openTagEnd(a)
294+
╰─ ╰─ tagName
295+
75├─ y
296+
76╭─ a=x>>>
297+
│ ││╰─ attrValue.value "x>>>\ny"
298+
│ │├─ attrValue "=x>>>\ny"
299+
│ │╰─ attrName
300+
│ ├─ closeTag(a)
301+
│ ├─ openTagEnd(a)
302+
╰─ ╰─ tagName
303+
77├─ y
304+
78╭─ a=x
305+
│ ││╰─ attrValue.value "x\n(y)"
306+
│ │├─ attrValue "=x\n(y)"
307+
│ │╰─ attrName
308+
│ ├─ closeTag(a)
309+
│ ├─ openTagEnd(a)
310+
╰─ ╰─ tagName
311+
79├─ (y)
312+
80╭─ a=x
313+
│ ││╰─ attrValue.value "x\n{y}"
314+
│ │├─ attrValue "=x\n{y}"
315+
│ │╰─ attrName
316+
│ ├─ closeTag(a)
317+
│ ├─ openTagEnd(a)
318+
╰─ ╰─ tagName
319+
81├─ {y}
320+
82╭─ <a=x
321+
│ │││╰─ attrValue.value "x\n[y]"
322+
│ ││├─ attrValue "=x\n[y]"
323+
│ ││╰─ attrName
324+
│ │╰─ tagName
325+
│ ├─ closeTag(a)
326+
╰─ ╰─ openTagEnd(a)
327+
83╭─ [y]/>
328+
╰─ ╰─ openTagEnd(a) "/>"
329+
84╭─ a=x
330+
│ ││╰─ attrValue.value "x\n=>\ny"
331+
│ │├─ attrValue "=x\n=>\ny"
332+
│ │╰─ attrName
333+
│ ├─ closeTag(a)
334+
╰─ ╰─ tagName
335+
85├─ =>
336+
86╭─ y z
337+
╰─ ╰─ attrName
338+
87╭─ a=x=>
339+
│ ││╰─ attrValue.value "x=>\n(y)"
340+
│ │├─ attrValue "=x=>\n(y)"
341+
│ │╰─ attrName
342+
│ ├─ closeTag(a)
343+
│ ├─ openTagEnd(a)
344+
╰─ ╰─ tagName
345+
88╭─ (y) z
346+
╰─ ╰─ attrName
347+
89╭─ a=x=>
348+
│ ││╰─ attrValue.value "x=>\n{y}"
349+
│ │├─ attrValue "=x=>\n{y}"
350+
│ │╰─ attrName
351+
│ ├─ closeTag(a)
352+
│ ├─ openTagEnd(a)
353+
╰─ ╰─ tagName
354+
90╭─ {y} z
355+
╰─ ╰─ attrName
356+
91╭─ a=(x)
357+
│ ││╰─ attrValue.value "(x)\n{y}"
358+
│ │├─ attrValue "=(x)\n{y}"
359+
│ │╰─ attrName
360+
│ ├─ closeTag(a)
361+
│ ├─ openTagEnd(a)
362+
╰─ ╰─ tagName
363+
92╭─ {y} z
364+
│ │├─ closeTag(a)
365+
│ │╰─ openTagEnd(a)
366+
╰─ ╰─ attrName

0 commit comments

Comments
 (0)