Allow semicolon before block in c-style for loop

Fixes #33
This commit is contained in:
Max Brunsfeld 2018-10-01 12:48:50 -07:00
parent 628c64cb29
commit 0123b9559f
4 changed files with 66543 additions and 78328 deletions

View File

@ -100,6 +100,7 @@ module.exports = grammar({
$._terminator, $._terminator,
optional($._expression), optional($._expression),
'))', '))',
optional(';'),
choice( choice(
$.do_group, $.do_group,
$.compound_statement $.compound_statement

View File

@ -2,26 +2,21 @@ examples/bash-it/plugins/available/git.plugin.bash
examples/bash-it/plugins/available/extract.plugin.bash examples/bash-it/plugins/available/extract.plugin.bash
examples/bash-it/plugins/available/go.plugin.bash examples/bash-it/plugins/available/go.plugin.bash
examples/bash-it/install.sh examples/bash-it/install.sh
examples/bash-it/completion/available/go.completion.bash
examples/bash-it/completion/available/svn.completion.bash examples/bash-it/completion/available/svn.completion.bash
examples/bash-it/completion/available/docker-compose.completion.bash examples/bash-it/completion/available/docker-compose.completion.bash
examples/bash-it/completion/available/jboss7.completion.bash examples/bash-it/completion/available/jboss7.completion.bash
examples/bash-it/completion/available/gh.completion.bash examples/bash-it/completion/available/gh.completion.bash
examples/bash-it/completion/available/bundler.completion.bash
examples/bash-it/completion/available/drush.completion.bash examples/bash-it/completion/available/drush.completion.bash
examples/bash-it/completion/available/hub.completion.bash examples/bash-it/completion/available/hub.completion.bash
examples/bash-it/completion/available/docker-machine.completion.bash examples/bash-it/completion/available/docker-machine.completion.bash
examples/bash-it/completion/available/git.completion.bash examples/bash-it/completion/available/git.completion.bash
examples/bash-it/completion/available/vagrant.completion.bash
examples/bash-it/completion/available/defaults.completion.bash examples/bash-it/completion/available/defaults.completion.bash
examples/bash-it/completion/available/packer.completion.bash examples/bash-it/completion/available/packer.completion.bash
examples/bash-it/completion/available/vault.completion.bash examples/bash-it/completion/available/vault.completion.bash
examples/bash-it/completion/available/docker.completion.bash examples/bash-it/completion/available/docker.completion.bash
examples/bash-it/completion/available/tmux.completion.bash examples/bash-it/completion/available/tmux.completion.bash
examples/bash-it/completion/available/apm.completion.bash
examples/bash-it/lib/preexec.bash examples/bash-it/lib/preexec.bash
examples/bash-it/lib/composure.bash examples/bash-it/lib/composure.bash
examples/bash-it/test_lib/bats-support/src/lang.bash
examples/bash-it/test_lib/bats-support/src/output.bash examples/bash-it/test_lib/bats-support/src/output.bash
examples/bash-it/test_lib/bats-assert/src/assert.bash examples/bash-it/test_lib/bats-assert/src/assert.bash
examples/bash-it/themes/hawaii50/hawaii50.theme.bash examples/bash-it/themes/hawaii50/hawaii50.theme.bash

12
src/grammar.json vendored
View File

@ -224,6 +224,18 @@
"type": "STRING", "type": "STRING",
"value": "))" "value": "))"
}, },
{
"type": "CHOICE",
"members": [
{
"type": "STRING",
"value": ";"
},
{
"type": "BLANK"
}
]
},
{ {
"type": "CHOICE", "type": "CHOICE",
"members": [ "members": [

144853
src/parser.c vendored

File diff suppressed because it is too large Load Diff