Skip to content

Commit e45cb32

Browse files
committed
perf: improve generation time, state count, & memory usage
1 parent 9f804be commit e45cb32

File tree

5 files changed

+311473
-334625
lines changed

5 files changed

+311473
-334625
lines changed

common/define-grammar.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -141,8 +141,8 @@ module.exports = function defineGrammar(dialect) {
141141
seq(optional('static'), optional($.override_modifier), optional('readonly')),
142142
seq(optional('abstract'), optional('readonly')),
143143
seq(optional('readonly'), optional('abstract')),
144+
optional('accessor'),
144145
),
145-
optional('accessor'),
146146
field('name', $._property_name),
147147
optional(choice('?', '!')),
148148
field('type', optional($.type_annotation)),

tsx/src/grammar.json

+10-10
Original file line numberDiff line numberDiff line change
@@ -7379,18 +7379,18 @@
73797379
]
73807380
}
73817381
]
7382-
}
7383-
]
7384-
},
7385-
{
7386-
"type": "CHOICE",
7387-
"members": [
7388-
{
7389-
"type": "STRING",
7390-
"value": "accessor"
73917382
},
73927383
{
7393-
"type": "BLANK"
7384+
"type": "CHOICE",
7385+
"members": [
7386+
{
7387+
"type": "STRING",
7388+
"value": "accessor"
7389+
},
7390+
{
7391+
"type": "BLANK"
7392+
}
7393+
]
73947394
}
73957395
]
73967396
},

0 commit comments

Comments
 (0)