Skip to content

Commit 0012d38

Browse files
committed
Use only a single seq
1 parent 9b04a3f commit 0012d38

File tree

3 files changed

+33
-43
lines changed

3 files changed

+33
-43
lines changed

common/define-grammar.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ module.exports = function defineGrammar(dialect) {
122122
optional('declare'),
123123
optional($.accessibility_modifier),
124124
choice(
125-
seq(optional('static'), seq(optional($.override_modifier), optional('readonly'))),
125+
seq(optional('static'), optional($.override_modifier), optional('readonly')),
126126
seq(optional('abstract'), optional('readonly')),
127127
seq(optional('readonly'), optional('abstract')),
128128
),

tsx/src/grammar.json

Lines changed: 16 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -6855,31 +6855,26 @@
68556855
]
68566856
},
68576857
{
6858-
"type": "SEQ",
6858+
"type": "CHOICE",
68596859
"members": [
68606860
{
6861-
"type": "CHOICE",
6862-
"members": [
6863-
{
6864-
"type": "SYMBOL",
6865-
"name": "override_modifier"
6866-
},
6867-
{
6868-
"type": "BLANK"
6869-
}
6870-
]
6861+
"type": "SYMBOL",
6862+
"name": "override_modifier"
68716863
},
68726864
{
6873-
"type": "CHOICE",
6874-
"members": [
6875-
{
6876-
"type": "STRING",
6877-
"value": "readonly"
6878-
},
6879-
{
6880-
"type": "BLANK"
6881-
}
6882-
]
6865+
"type": "BLANK"
6866+
}
6867+
]
6868+
},
6869+
{
6870+
"type": "CHOICE",
6871+
"members": [
6872+
{
6873+
"type": "STRING",
6874+
"value": "readonly"
6875+
},
6876+
{
6877+
"type": "BLANK"
68836878
}
68846879
]
68856880
}

typescript/src/grammar.json

Lines changed: 16 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -6851,31 +6851,26 @@
68516851
]
68526852
},
68536853
{
6854-
"type": "SEQ",
6854+
"type": "CHOICE",
68556855
"members": [
68566856
{
6857-
"type": "CHOICE",
6858-
"members": [
6859-
{
6860-
"type": "SYMBOL",
6861-
"name": "override_modifier"
6862-
},
6863-
{
6864-
"type": "BLANK"
6865-
}
6866-
]
6857+
"type": "SYMBOL",
6858+
"name": "override_modifier"
68676859
},
68686860
{
6869-
"type": "CHOICE",
6870-
"members": [
6871-
{
6872-
"type": "STRING",
6873-
"value": "readonly"
6874-
},
6875-
{
6876-
"type": "BLANK"
6877-
}
6878-
]
6861+
"type": "BLANK"
6862+
}
6863+
]
6864+
},
6865+
{
6866+
"type": "CHOICE",
6867+
"members": [
6868+
{
6869+
"type": "STRING",
6870+
"value": "readonly"
6871+
},
6872+
{
6873+
"type": "BLANK"
68796874
}
68806875
]
68816876
}

0 commit comments

Comments
 (0)