-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(es/parser): Allow instantiation expression followed by a line bre…
…ak or a binary operator (#5000)
- Loading branch information
Showing
9 changed files
with
2,927 additions
and
117 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
crates/swc_ecma_parser/tests/typescript-errors/instantiation-expr/case3/input.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
f<x> & g<y>; | ||
f<x> < g<y>; |
7 changes: 3 additions & 4 deletions
7
crates/swc_ecma_parser/tests/typescript-errors/instantiation-expr/case3/input.ts.stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,6 @@ | ||
|
||
x Unexpected token `&`. Expected this, import, async, function, [ for array literal, { for object literal, @ for decorator, function, class, null, true, false, number, bigint, string, regexp, ` | ||
| for template literal, (, or an identifier | ||
x Expected '>', got ';' | ||
,-[$DIR/tests/typescript-errors/instantiation-expr/case3/input.ts:1:1] | ||
1 | f<x> & g<y>; | ||
: ^ | ||
1 | f<x> < g<y>; | ||
: ^ | ||
`---- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
a62b2b3
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Benchmark
es/full/minify/libraries/antd
1665910709
ns/iter (± 21418160
)1595596554
ns/iter (± 25919669
)1.04
es/full/minify/libraries/d3
420832871
ns/iter (± 13923745
)399007394
ns/iter (± 10144751
)1.05
es/full/minify/libraries/echarts
1631790816
ns/iter (± 35590098
)1607225109
ns/iter (± 35462491
)1.02
es/full/minify/libraries/jquery
94419103
ns/iter (± 7765267
)86439496
ns/iter (± 994302
)1.09
es/full/minify/libraries/lodash
126296352
ns/iter (± 5608096
)114184251
ns/iter (± 2619824
)1.11
es/full/minify/libraries/moment
55286597
ns/iter (± 5308480
)50434404
ns/iter (± 828848
)1.10
es/full/minify/libraries/react
17981371
ns/iter (± 686664
)17110091
ns/iter (± 431702
)1.05
es/full/minify/libraries/terser
613592985
ns/iter (± 20865920
)592073229
ns/iter (± 10413409
)1.04
es/full/minify/libraries/three
555181692
ns/iter (± 15511209
)532438620
ns/iter (± 18457299
)1.04
es/full/minify/libraries/typescript
3500488602
ns/iter (± 110380568
)3382711801
ns/iter (± 43927454
)1.03
es/full/minify/libraries/victory
734717102
ns/iter (± 20444119
)706384351
ns/iter (± 13735424
)1.04
es/full/minify/libraries/vue
146564335
ns/iter (± 6431667
)132783710
ns/iter (± 7842543
)1.10
es/full/codegen/es3
30940
ns/iter (± 769
)31967
ns/iter (± 2884
)0.97
es/full/codegen/es5
30987
ns/iter (± 991
)32086
ns/iter (± 647
)0.97
es/full/codegen/es2015
31079
ns/iter (± 1301
)32176
ns/iter (± 1947
)0.97
es/full/codegen/es2016
30963
ns/iter (± 534
)31969
ns/iter (± 903
)0.97
es/full/codegen/es2017
30962
ns/iter (± 414
)31957
ns/iter (± 499
)0.97
es/full/codegen/es2018
31025
ns/iter (± 550
)32160
ns/iter (± 3019
)0.96
es/full/codegen/es2019
31008
ns/iter (± 786
)31949
ns/iter (± 792
)0.97
es/full/codegen/es2020
30622
ns/iter (± 1018
)32044
ns/iter (± 1057
)0.96
es/full/all/es3
189294665
ns/iter (± 6733970
)203108890
ns/iter (± 13888393
)0.93
es/full/all/es5
176533166
ns/iter (± 6567706
)181555448
ns/iter (± 12204746
)0.97
es/full/all/es2015
144034543
ns/iter (± 4578609
)146577373
ns/iter (± 9400778
)0.98
es/full/all/es2016
142066072
ns/iter (± 5772343
)152646850
ns/iter (± 6573469
)0.93
es/full/all/es2017
142183275
ns/iter (± 6829370
)146453992
ns/iter (± 11804738
)0.97
es/full/all/es2018
140791622
ns/iter (± 4024809
)142397367
ns/iter (± 5588469
)0.99
es/full/all/es2019
140320310
ns/iter (± 6451481
)142450810
ns/iter (± 6433830
)0.99
es/full/all/es2020
135024386
ns/iter (± 5991640
)138647242
ns/iter (± 14437394
)0.97
es/full/parser
711365
ns/iter (± 15410
)702100
ns/iter (± 15477
)1.01
es/full/base/fixer
30210
ns/iter (± 558
)29211
ns/iter (± 284
)1.03
es/full/base/resolver_and_hygiene
88591
ns/iter (± 3995
)88220
ns/iter (± 4263
)1.00
serialization of ast node
200
ns/iter (± 7
)206
ns/iter (± 4
)0.97
serialization of serde
217
ns/iter (± 1
)218
ns/iter (± 1
)1.00
This comment was automatically generated by workflow using github-action-benchmark.