aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'bashast/libbashWalker.g')
-rw-r--r--bashast/libbashWalker.g5
1 files changed, 3 insertions, 2 deletions
diff --git a/bashast/libbashWalker.g b/bashast/libbashWalker.g
index 648dd53..42a8917 100644
--- a/bashast/libbashWalker.g
+++ b/bashast/libbashWalker.g
@@ -637,7 +637,8 @@ simple_command
std::vector<std::string> libbash_args;
bool split;
}
- :string_expr{ split = ($string_expr.libbash_value != "local" && $string_expr.libbash_value != "export"); }
+ :string_expr{ split = ($string_expr.libbash_value != "local" && $string_expr.libbash_value != "export"
+ && $string_expr.libbash_value != "declare"); }
(argument[libbash_args, split])* execute_command[$string_expr.libbash_value, libbash_args];
execute_command[std::string& name, std::vector<std::string>& libbash_args]
@@ -649,7 +650,7 @@ execute_command[std::string& name, std::vector<std::string>& libbash_args]
bool redirection = false;
}
@init {
- if(name != "local" && name != "set")
+ if(name != "local" && name != "set" && name != "declare")
current_scope.reset(new interpreter::local_scope(*walker));
}
:var_def[true]* (redirect[out, err, in]{ redirection = true; })* {