aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMu Qiao <qiaomuf@gentoo.org>2011-07-21 18:07:57 +0800
committerMu Qiao <qiaomuf@gentoo.org>2011-08-02 15:46:29 +0800
commit81e8d87cad6f45db77cc8f0be9a382e6c44489a2 (patch)
treeaa407cbab6cc8d78b523ad8deb19de7c73b120f4
parentCore: raise exception when using local outside function (diff)
downloadlibbash-81e8d87cad6f45db77cc8f0be9a382e6c44489a2.tar.gz
libbash-81e8d87cad6f45db77cc8f0be9a382e6c44489a2.tar.bz2
libbash-81e8d87cad6f45db77cc8f0be9a382e6c44489a2.zip
Parser: support '@' in non-quoted string
-rw-r--r--bashast/bashast.g2
-rw-r--r--scripts/var_def.bash2
2 files changed, 3 insertions, 1 deletions
diff --git a/bashast/bashast.g b/bashast/bashast.g
index 6566a5b..b380379 100644
--- a/bashast/bashast.g
+++ b/bashast/bashast.g
@@ -660,7 +660,7 @@ ns_string_part
|OTHER|EQUALS|PCT|PCTPCT|PLUS|MINUS|DOT|DOTDOT|COLON|TEST_EXPR
|TILDE|MUL_ASSIGN|DIVIDE_ASSIGN|MOD_ASSIGN|PLUS_ASSIGN|MINUS_ASSIGN
|LSHIFT_ASSIGN|RSHIFT_ASSIGN|AND_ASSIGN|XOR_ASSIGN|LSQUARE|RSQUARE
- |OR_ASSIGN|CARET|POUND|POUNDPOUND|COMMA|EXPORT|LOCAL;
+ |OR_ASSIGN|CARET|POUND|POUNDPOUND|COMMA|EXPORT|LOCAL|AT;
escaped_character
: ESC
diff --git a/scripts/var_def.bash b/scripts/var_def.bash
index 6dc83dd..09c07c6 100644
--- a/scripts/var_def.bash
+++ b/scripts/var_def.bash
@@ -82,3 +82,5 @@ function foo() {
echo ${bar[@]}
}
foo
+bar=@
+echo $bar