Allow ;; at end of line of case item
This commit is contained in:
parent
27b4b7835e
commit
c7484ad85f
|
@ -109,8 +109,7 @@ case "opt" in
|
|||
;;
|
||||
|
||||
b)
|
||||
echo b
|
||||
;;
|
||||
echo b;;
|
||||
esac
|
||||
|
||||
case "$Z" in
|
||||
|
|
14
grammar.js
14
grammar.js
|
@ -133,16 +133,22 @@ module.exports = grammar({
|
|||
$._expression,
|
||||
repeat(seq('|', $._expression)),
|
||||
')',
|
||||
repeat($._terminated_statement),
|
||||
';;'
|
||||
optional(seq(
|
||||
repeat($._terminated_statement),
|
||||
optional($._statement)
|
||||
)),
|
||||
prec(1, ';;')
|
||||
),
|
||||
|
||||
last_case_item: $ => seq(
|
||||
$._expression,
|
||||
repeat(seq('|', $._expression)),
|
||||
')',
|
||||
repeat($._terminated_statement),
|
||||
optional(';;')
|
||||
optional(seq(
|
||||
repeat($._terminated_statement),
|
||||
optional($._statement)
|
||||
)),
|
||||
optional(prec(1, ';;'))
|
||||
),
|
||||
|
||||
function_definition: $ => seq(
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
examples/bash-it/plugins/available/git.plugin.bash
|
||||
examples/bash-it/plugins/available/fasd.plugin.bash
|
||||
examples/bash-it/plugins/available/fzf.plugin.bash
|
||||
examples/bash-it/plugins/available/z.plugin.bash
|
||||
examples/bash-it/plugins/available/extract.plugin.bash
|
||||
examples/bash-it/plugins/available/less-pretty-cat.plugin.bash
|
||||
examples/bash-it/plugins/available/z_autoenv.plugin.bash
|
||||
|
@ -38,7 +36,6 @@ examples/bash-it/completion/available/projects.completion.bash
|
|||
examples/bash-it/completion/available/virsh.completion.bash
|
||||
examples/bash-it/completion/available/apm.completion.bash
|
||||
examples/bash-it/completion/available/git_flow.completion.bash
|
||||
examples/bash-it/lib/helpers.bash
|
||||
examples/bash-it/lib/preexec.bash
|
||||
examples/bash-it/lib/composure.bash
|
||||
examples/bash-it/lib/search.bash
|
||||
|
@ -53,7 +50,6 @@ examples/bash-it/themes/dulcie/dulcie.theme.bash
|
|||
examples/bash-it/themes/colors.theme.bash
|
||||
examples/bash-it/themes/rana/rana.theme.bash
|
||||
examples/bash-it/themes/morris/morris.theme.bash
|
||||
examples/bash-it/themes/atomic/atomic.theme.bash
|
||||
examples/bash-it/themes/powerline/powerline.base.bash
|
||||
examples/bash-it/themes/base.theme.bash
|
||||
examples/bash-it/themes/brainy/brainy.theme.bash
|
||||
|
|
|
@ -2,5 +2,4 @@
|
|||
|
||||
tree-sitter parse $(find examples/bash-it -name '*.bash' -or -name '*.sh') -q -t \
|
||||
| egrep 'ERROR|undefined' \
|
||||
| cut -d' ' -f1 \
|
||||
> script/known-failures.txt
|
||||
| tee >(cut -d' ' -f1 > script/known-failures.txt)
|
||||
|
|
|
@ -348,15 +348,44 @@
|
|||
"value": ")"
|
||||
},
|
||||
{
|
||||
"type": "REPEAT",
|
||||
"content": {
|
||||
"type": "SYMBOL",
|
||||
"name": "_terminated_statement"
|
||||
}
|
||||
"type": "CHOICE",
|
||||
"members": [
|
||||
{
|
||||
"type": "SEQ",
|
||||
"members": [
|
||||
{
|
||||
"type": "REPEAT",
|
||||
"content": {
|
||||
"type": "SYMBOL",
|
||||
"name": "_terminated_statement"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "CHOICE",
|
||||
"members": [
|
||||
{
|
||||
"type": "SYMBOL",
|
||||
"name": "_statement"
|
||||
},
|
||||
{
|
||||
"type": "BLANK"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "BLANK"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "STRING",
|
||||
"value": ";;"
|
||||
"type": "PREC",
|
||||
"value": 1,
|
||||
"content": {
|
||||
"type": "STRING",
|
||||
"value": ";;"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
|
@ -388,18 +417,47 @@
|
|||
"value": ")"
|
||||
},
|
||||
{
|
||||
"type": "REPEAT",
|
||||
"content": {
|
||||
"type": "SYMBOL",
|
||||
"name": "_terminated_statement"
|
||||
}
|
||||
"type": "CHOICE",
|
||||
"members": [
|
||||
{
|
||||
"type": "SEQ",
|
||||
"members": [
|
||||
{
|
||||
"type": "REPEAT",
|
||||
"content": {
|
||||
"type": "SYMBOL",
|
||||
"name": "_terminated_statement"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "CHOICE",
|
||||
"members": [
|
||||
{
|
||||
"type": "SYMBOL",
|
||||
"name": "_statement"
|
||||
},
|
||||
{
|
||||
"type": "BLANK"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "BLANK"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "CHOICE",
|
||||
"members": [
|
||||
{
|
||||
"type": "STRING",
|
||||
"value": ";;"
|
||||
"type": "PREC",
|
||||
"value": 1,
|
||||
"content": {
|
||||
"type": "STRING",
|
||||
"value": ";;"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "BLANK"
|
||||
|
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue