Skip to content

Commit 81ba26f

Browse files
committed
fix: parse decorators on properties
1 parent afab377 commit 81ba26f

File tree

5 files changed

+24901
-24526
lines changed

5 files changed

+24901
-24526
lines changed

grammar.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1032,6 +1032,7 @@ module.exports = grammar({
10321032
),
10331033

10341034
public_field_definition: $ => seq(
1035+
repeat(field('decorator', $.decorator)),
10351036
optional('static'),
10361037
field('property', $._property_name),
10371038
optional($._initializer)

src/grammar.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5802,6 +5802,17 @@
58025802
"public_field_definition": {
58035803
"type": "SEQ",
58045804
"members": [
5805+
{
5806+
"type": "REPEAT",
5807+
"content": {
5808+
"type": "FIELD",
5809+
"name": "decorator",
5810+
"content": {
5811+
"type": "SYMBOL",
5812+
"name": "decorator"
5813+
}
5814+
}
5815+
},
58055816
{
58065817
"type": "CHOICE",
58075818
"members": [

src/node-types.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2163,6 +2163,16 @@
21632163
"type": "public_field_definition",
21642164
"named": true,
21652165
"fields": {
2166+
"decorator": {
2167+
"multiple": true,
2168+
"required": false,
2169+
"types": [
2170+
{
2171+
"type": "decorator",
2172+
"named": true
2173+
}
2174+
]
2175+
},
21662176
"property": {
21672177
"multiple": false,
21682178
"required": true,

0 commit comments

Comments
 (0)