grammar: some cleanup

This commit is contained in:
Dmitriy Pleshevskiy 2023-06-21 12:16:49 +03:00
parent 7b6ac61fa9
commit 8a9d50043d
Signed by: pleshevskiy
GPG key ID: 79C4487B44403985
3 changed files with 34 additions and 44 deletions

View file

@ -86,11 +86,9 @@ module.exports = grammar({
seq( seq(
$._connection_path, $._connection_path,
repeat1(seq($.arrow, $._connection_path)), repeat1(seq($.arrow, $._connection_path)),
optional( seq(
seq( optional(seq($._colon, optional($.label))),
optional(seq($._colon, optional($.label))), optional(seq(alias($._connection_block, $.block)))
optional(seq(alias($._connection_block, $.block)))
)
) )
), ),

View file

@ -89,66 +89,58 @@
} }
}, },
{ {
"type": "CHOICE", "type": "SEQ",
"members": [ "members": [
{ {
"type": "SEQ", "type": "CHOICE",
"members": [ "members": [
{ {
"type": "CHOICE", "type": "SEQ",
"members": [ "members": [
{ {
"type": "SEQ", "type": "SYMBOL",
"name": "_colon"
},
{
"type": "CHOICE",
"members": [ "members": [
{ {
"type": "SYMBOL", "type": "SYMBOL",
"name": "_colon" "name": "label"
}, },
{ {
"type": "CHOICE", "type": "BLANK"
"members": [
{
"type": "SYMBOL",
"name": "label"
},
{
"type": "BLANK"
}
]
} }
] ]
},
{
"type": "BLANK"
} }
] ]
}, },
{ {
"type": "CHOICE", "type": "BLANK"
"members": [
{
"type": "SEQ",
"members": [
{
"type": "ALIAS",
"content": {
"type": "SYMBOL",
"name": "_connection_block"
},
"named": true,
"value": "block"
}
]
},
{
"type": "BLANK"
}
]
} }
] ]
}, },
{ {
"type": "BLANK" "type": "CHOICE",
"members": [
{
"type": "SEQ",
"members": [
{
"type": "ALIAS",
"content": {
"type": "SYMBOL",
"name": "_connection_block"
},
"named": true,
"value": "block"
}
]
},
{
"type": "BLANK"
}
]
} }
] ]
} }

Binary file not shown.