remove unnecessary choice
This commit is contained in:
parent
03904d1cd3
commit
16d8b4c5f7
4 changed files with 43 additions and 49 deletions
14
grammar.js
14
grammar.js
|
@ -132,14 +132,12 @@ module.exports = grammar({
|
|||
),
|
||||
|
||||
text_block: ($) =>
|
||||
choice(
|
||||
seq(
|
||||
alias($._text_block_start, "|"),
|
||||
optional($.language),
|
||||
/\s/,
|
||||
alias($._text_block_raw_text, $.raw_text),
|
||||
alias($._text_block_end, "|")
|
||||
)
|
||||
seq(
|
||||
alias($._text_block_start, "|"),
|
||||
optional($.language),
|
||||
/\s/,
|
||||
alias($._text_block_raw_text, $.raw_text),
|
||||
alias($._text_block_end, "|")
|
||||
),
|
||||
|
||||
language: ($) => /\w+/,
|
||||
|
|
|
@ -9,5 +9,6 @@ if [ ! -z $(git diff --cached --name-only | grep -e "^grammar.js$") ]
|
|||
then
|
||||
make build
|
||||
make build-wasm
|
||||
git add src bindings *.wasm
|
||||
fi
|
||||
|
||||
|
|
|
@ -538,55 +538,50 @@
|
|||
]
|
||||
},
|
||||
"text_block": {
|
||||
"type": "CHOICE",
|
||||
"type": "SEQ",
|
||||
"members": [
|
||||
{
|
||||
"type": "SEQ",
|
||||
"type": "ALIAS",
|
||||
"content": {
|
||||
"type": "SYMBOL",
|
||||
"name": "_text_block_start"
|
||||
},
|
||||
"named": false,
|
||||
"value": "|"
|
||||
},
|
||||
{
|
||||
"type": "CHOICE",
|
||||
"members": [
|
||||
{
|
||||
"type": "ALIAS",
|
||||
"content": {
|
||||
"type": "SYMBOL",
|
||||
"name": "_text_block_start"
|
||||
},
|
||||
"named": false,
|
||||
"value": "|"
|
||||
"type": "SYMBOL",
|
||||
"name": "language"
|
||||
},
|
||||
{
|
||||
"type": "CHOICE",
|
||||
"members": [
|
||||
{
|
||||
"type": "SYMBOL",
|
||||
"name": "language"
|
||||
},
|
||||
{
|
||||
"type": "BLANK"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "PATTERN",
|
||||
"value": "\\s"
|
||||
},
|
||||
{
|
||||
"type": "ALIAS",
|
||||
"content": {
|
||||
"type": "SYMBOL",
|
||||
"name": "_text_block_raw_text"
|
||||
},
|
||||
"named": true,
|
||||
"value": "raw_text"
|
||||
},
|
||||
{
|
||||
"type": "ALIAS",
|
||||
"content": {
|
||||
"type": "SYMBOL",
|
||||
"name": "_text_block_end"
|
||||
},
|
||||
"named": false,
|
||||
"value": "|"
|
||||
"type": "BLANK"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "PATTERN",
|
||||
"value": "\\s"
|
||||
},
|
||||
{
|
||||
"type": "ALIAS",
|
||||
"content": {
|
||||
"type": "SYMBOL",
|
||||
"name": "_text_block_raw_text"
|
||||
},
|
||||
"named": true,
|
||||
"value": "raw_text"
|
||||
},
|
||||
{
|
||||
"type": "ALIAS",
|
||||
"content": {
|
||||
"type": "SYMBOL",
|
||||
"name": "_text_block_end"
|
||||
},
|
||||
"named": false,
|
||||
"value": "|"
|
||||
}
|
||||
]
|
||||
},
|
||||
|
|
Binary file not shown.
Loading…
Reference in a new issue