diff options
author | André Aparício <aparicio99@gmail.com> | 2012-08-03 04:03:28 +0100 |
---|---|---|
committer | André Aparício <aparicio99@gmail.com> | 2012-08-03 04:07:32 +0100 |
commit | 4b0cb9bdc2981094bb94e210a3bf080c303da832 (patch) | |
tree | fc12d2827b298efa9a31ccfacbec45803ed5ae0b | |
parent | Parser: Multiline string declaration (diff) | |
download | libbash-4b0cb9bdc2981094bb94e210a3bf080c303da832.tar.gz libbash-4b0cb9bdc2981094bb94e210a3bf080c303da832.tar.bz2 libbash-4b0cb9bdc2981094bb94e210a3bf080c303da832.zip |
Parser: Accept semicolons inside builtin variable definitions
-rw-r--r-- | bashast/bashast.g | 1 | ||||
-rw-r--r-- | scripts/command_execution.bash | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/bashast/bashast.g b/bashast/bashast.g index 0d59e8c..55c469a 100644 --- a/bashast/bashast.g +++ b/bashast/bashast.g @@ -481,6 +481,7 @@ scope { |(RPAREN) => RPAREN { --$builtin_variable_definition_item::parens; } |(DQUOTE) => DQUOTE { $builtin_variable_definition_item::dquotes = ! $builtin_variable_definition_item::dquotes; } |(~(EOL|SEMIC)) => expansion_base + | {LA(1) == SEMIC && $builtin_variable_definition_item::dquotes}? => SEMIC | {LA(1) == EOL && $builtin_variable_definition_item::parens > 0 || $builtin_variable_definition_item::dquotes}? => EOL )+; diff --git a/scripts/command_execution.bash b/scripts/command_execution.bash index ca8a4e5..df6275b 100644 --- a/scripts/command_execution.bash +++ b/scripts/command_execution.bash @@ -109,6 +109,7 @@ echo "${!variable// /$'\n'}" eval abc+=\( \"\$@\" \) declare MOZILLA_FIVE_HOME="/usr/share/${PN}" declare foo=23 empty bar=42 +declare var=";; ; foobar"; echo yay echo $MOZILLA_FIVE_HOME $foo $lol $bar echo \(\)\[\]\$\"\>\' |