File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed
crates/swc_ecma_parser/src/parser Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ swc_core : patch
3
+ swc_ecma_parser : patch
4
+ ---
5
+
6
+ perf(es/parser): less str cmp
Original file line number Diff line number Diff line change @@ -159,8 +159,7 @@ impl<I: Tokens> Parser<I> {
159
159
Word :: Keyword ( Keyword :: This ) if p. input . syntax ( ) . typescript ( ) => Ok ( atom ! ( "this" ) ) ,
160
160
Word :: Keyword ( Keyword :: Let ) => Ok ( atom ! ( "let" ) ) ,
161
161
Word :: Ident ( ident) => {
162
- if matches ! ( & ident, IdentLike :: Other ( arguments) if & * * arguments == "arguments" )
163
- && p. ctx ( ) . in_class_field
162
+ if p. ctx ( ) . in_class_field && matches ! ( & ident, IdentLike :: Other ( arguments) if atom!( "arguments" ) . eq( arguments) )
164
163
{
165
164
p. emit_err ( p. input . prev_span ( ) , SyntaxError :: ArgumentsInClassField )
166
165
}
You can’t perform that action at this time.
0 commit comments