Commit c09bdf9
Oneline whiteblock parsing fixes
- Allow parsing of single statements in oneline whiteblocks
- Change if and arrow parsing to call new subroutine
- Allow ASI after existing semicolons and in other edge cases
- Add class to startsExpr so `ClassExpression`s don’t get parsed as stmts
- Added fixtures
Block parsing cleanup
- Move special parsing case for arrows into parseArrowBody
- Break up parseWhiteBlockBody
Whiteblocks don’t allow directives
Revert changes adding `exprContext` to parsing functions
Disallow empty whiteblocks (removes need for `couldBeginStatement`)
- Disallow empty whiteblocks
- Update fixtures
- Remove some obsolete fixtures
- Use idiomatic `-> return` in fixtures1 parent c69be04 commit c09bdf9
File tree
28 files changed
+2372
-319
lines changed- src
- parser
- plugins
- tokenizer
- test/fixtures
- flow/type-annotations/99
- lightscript
- arrow-expressions
- fat-class-expr
- oneline-stmt
- skinny-double
- skinny-oneline-stmt-semi
- skinny-oneline-stmt
- stmt-call
- arrow-methods
- class-skinny-oneline-stmt
- obj-skinny-oneline-stmt
- automatic-semicolon-insertion/new
- if-expression/oneline-stmt
- if-statement/oneline-return-undelimited
- named-arrow-functions/skinny-oneline-stmt
28 files changed
+2372
-319
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
68 | | - | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
69 | 80 | | |
70 | 81 | | |
71 | 82 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
134 | 134 | | |
135 | 135 | | |
136 | 136 | | |
137 | | - | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
138 | 155 | | |
139 | | - | |
| 156 | + | |
140 | 157 | | |
141 | 158 | | |
142 | | - | |
143 | | - | |
144 | | - | |
145 | | - | |
146 | | - | |
147 | | - | |
148 | | - | |
149 | | - | |
150 | | - | |
151 | | - | |
152 | | - | |
153 | | - | |
154 | | - | |
155 | | - | |
156 | | - | |
157 | | - | |
158 | | - | |
159 | | - | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
160 | 167 | | |
161 | | - | |
162 | | - | |
163 | 168 | | |
164 | 169 | | |
165 | | - | |
166 | | - | |
167 | | - | |
168 | | - | |
169 | | - | |
170 | | - | |
| 170 | + | |
| 171 | + | |
171 | 172 | | |
172 | 173 | | |
173 | 174 | | |
| |||
301 | 302 | | |
302 | 303 | | |
303 | 304 | | |
304 | | - | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
305 | 322 | | |
306 | 323 | | |
307 | 324 | | |
| |||
376 | 393 | | |
377 | 394 | | |
378 | 395 | | |
379 | | - | |
| 396 | + | |
380 | 397 | | |
381 | 398 | | |
382 | 399 | | |
| |||
425 | 442 | | |
426 | 443 | | |
427 | 444 | | |
428 | | - | |
| 445 | + | |
429 | 446 | | |
430 | 447 | | |
431 | 448 | | |
| |||
613 | 630 | | |
614 | 631 | | |
615 | 632 | | |
616 | | - | |
| 633 | + | |
617 | 634 | | |
618 | | - | |
| 635 | + | |
619 | 636 | | |
620 | 637 | | |
621 | 638 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
83 | | - | |
| 83 | + | |
84 | 84 | | |
85 | 85 | | |
86 | 86 | | |
| |||
152 | 152 | | |
153 | 153 | | |
154 | 154 | | |
155 | | - | |
| 155 | + | |
156 | 156 | | |
157 | 157 | | |
158 | 158 | | |
| |||
0 commit comments