Repository navigation
Commit 2018e5e
committed
fix(javascript): read
- Where an expression belongs, a `/=` the tokenizer took for the
division-assignment operator now re-reads as a regexp, as a lone `/`
already did: `await /=a/g`, `x\n{} /=a/g` and the like parse, as the
spec, V8, meriyah and Babel read them (acorn rejects them).
- WebpackParser's lazy template path raised a TypeError for a `${…}`
closed at the end of input; it now raises acorn's "Unterminated
template literal" at the same position.
Checked against the lexical grammar with differential fuzzing against
acorn, V8, meriyah and Babel.
Claude-Session: https://claude.ai/code/session_017TkBWTk3wcyUcJYDp5ZhaP/= in expression position as a regexp1 parent 9e8cb55 commit 2018e5e
3 files changed
Lines changed: 51 additions & 6 deletions
File tree
- .changeset
- lib/javascript
- test/unitCases/javascript
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5020 | 5020 | | |
5021 | 5021 | | |
5022 | 5022 | | |
5023 | | - | |
5024 | | - | |
5025 | | - | |
| 5023 | + | |
| 5024 | + | |
| 5025 | + | |
| 5026 | + | |
| 5027 | + | |
| 5028 | + | |
| 5029 | + | |
| 5030 | + | |
5026 | 5031 | | |
5027 | 5032 | | |
5028 | 5033 | | |
| |||
15373 | 15378 | | |
15374 | 15379 | | |
15375 | 15380 | | |
| 15381 | + | |
| 15382 | + | |
| 15383 | + | |
| 15384 | + | |
15376 | 15385 | | |
15377 | 15386 | | |
15378 | 15387 | | |
| |||
15864 | 15873 | | |
15865 | 15874 | | |
15866 | 15875 | | |
15867 | | - | |
15868 | | - | |
| 15876 | + | |
| 15877 | + | |
| 15878 | + | |
| 15879 | + | |
| 15880 | + | |
| 15881 | + | |
| 15882 | + | |
15869 | 15883 | | |
15870 | 15884 | | |
15871 | 15885 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
91 | 91 | | |
92 | 92 | | |
93 | 93 | | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
94 | 120 | | |
95 | 121 | | |
96 | 122 | | |
| |||
219 | 245 | | |
220 | 246 | | |
221 | 247 | | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
222 | 253 | | |
223 | 254 | | |
224 | 255 | | |
| |||
0 commit comments