diff options
-rw-r--r-- | bashast/bashast.g | 2 | ||||
-rw-r--r-- | bashast/gunit/simp_prog.gunit | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/bashast/bashast.g b/bashast/bashast.g index c6d7f34..c836047 100644 --- a/bashast/bashast.g +++ b/bashast/bashast.g @@ -471,7 +471,7 @@ scope { : ( (LPAREN) => LPAREN { ++$builtin_variable_definition_item::parens; } |(RPAREN) => RPAREN { --$builtin_variable_definition_item::parens; } - |(~EOL) => expansion_base + |(~(EOL|SEMIC)) => expansion_base | {LA(1) == EOL && $builtin_variable_definition_item::parens > 0}? => EOL )+; diff --git a/bashast/gunit/simp_prog.gunit b/bashast/gunit/simp_prog.gunit index e765ab0..e44c1e5 100644 --- a/bashast/gunit/simp_prog.gunit +++ b/bashast/gunit/simp_prog.gunit @@ -36,3 +36,5 @@ hello () { hello quit echo foo" -> (LIST (COMMAND (FUNCTION (STRING quit) (CURRENT_SHELL (LIST (COMMAND (STRING exit)))))) (COMMAND (FUNCTION (STRING hello) (CURRENT_SHELL (LIST (COMMAND (STRING echo) (STRING Hello !)))))) (COMMAND (STRING hello)) (COMMAND (STRING quit)) (COMMAND (STRING echo) (STRING foo))) + +"export abc;echo" -> (LIST (COMMAND (STRING export) (STRING abc)) (COMMAND (STRING echo))) |