diff options
author | Mu Qiao <qiaomuf@gentoo.org> | 2012-03-26 16:09:47 +0800 |
---|---|---|
committer | Mu Qiao <qiaomuf@gentoo.org> | 2012-03-26 16:35:47 +0800 |
commit | 7442b34889d4bfc6feca9cdc6d4bc5c881488053 (patch) | |
tree | 7fd87c09d7ef631536bdca20765d79059af2c8cc | |
parent | Builtin: fix argument handling of printf builtin (diff) | |
download | libbash-7442b34889d4bfc6feca9cdc6d4bc5c881488053.tar.gz libbash-7442b34889d4bfc6feca9cdc6d4bc5c881488053.tar.bz2 libbash-7442b34889d4bfc6feca9cdc6d4bc5c881488053.zip |
Walker: fix single quoted argument handling
-rw-r--r-- | bashast/libbashWalker.g | 1 | ||||
-rw-r--r-- | scripts/command_execution.bash | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/bashast/libbashWalker.g b/bashast/libbashWalker.g index 95f8a90..5e3fd6e 100644 --- a/bashast/libbashWalker.g +++ b/bashast/libbashWalker.g @@ -282,6 +282,7 @@ string_part returns[std::string libbash_value, bool quoted, bool is_raw_string] })*) |(SINGLE_QUOTED_STRING) => ^(SINGLE_QUOTED_STRING node=SINGLE_QUOTED_STRING_TOKEN) { $libbash_value = get_single_quoted_string(node); + $quoted = true; } |(ARITHMETIC_EXPRESSION) => ^(ARITHMETIC_EXPRESSION value=arithmetics { diff --git a/scripts/command_execution.bash b/scripts/command_execution.bash index 0927642..89a0ed7 100644 --- a/scripts/command_execution.bash +++ b/scripts/command_execution.bash @@ -64,6 +64,7 @@ printf "%s %s\n" abc def printf "%s %s\n" $FOO001, def printf "123-%s" 456 789 printf "\n" +printf 'debug-%s ' dvc kbd nla printf "123-%s" ((FOO010=1)) echo $FOO010 |