Gentoo Archives: gentoo-commits

From: "Petteri Räty" <betelgeuse@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/libbash:master commit in: scripts/, bashast/
Date: Wed, 01 Jun 2011 12:20:10
Message-Id: 135a631da5c8f2a51539caa366d6d4ebb1582d34.betelgeuse@gentoo
1 commit: 135a631da5c8f2a51539caa366d6d4ebb1582d34
2 Author: Mu Qiao <qiaomuf <AT> gentoo <DOT> org>
3 AuthorDate: Tue May 31 08:22:31 2011 +0000
4 Commit: Petteri Räty <betelgeuse <AT> gentoo <DOT> org>
5 CommitDate: Wed Jun 1 12:15:21 2011 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/libbash.git;a=commit;h=135a631d
7
8 Walker: fix variable definition handling
9
10 As we ignore the exported variables that are not declared with values,
11 the variable definition rule has to handle empty variable definitions.
12
13 ---
14 bashast/libbashWalker.g | 2 +-
15 scripts/command_execution.bash | 1 +
16 2 files changed, 2 insertions(+), 1 deletions(-)
17
18 diff --git a/bashast/libbashWalker.g b/bashast/libbashWalker.g
19 index f53a2be..af19dcd 100644
20 --- a/bashast/libbashWalker.g
21 +++ b/bashast/libbashWalker.g
22 @@ -124,7 +124,7 @@ variable_definitions
23 @declarations {
24 bool local = false;
25 }
26 - :^(VARIABLE_DEFINITIONS (LOCAL { local = true; })? var_def[local]+);
27 + :^(VARIABLE_DEFINITIONS (LOCAL { local = true; })? var_def[local]*);
28
29 name_base returns[std::string libbash_value]
30 :NAME { $libbash_value = walker->get_string($NAME); }
31
32 diff --git a/scripts/command_execution.bash b/scripts/command_execution.bash
33 index 95401b4..8005a23 100644
34 --- a/scripts/command_execution.bash
35 +++ b/scripts/command_execution.bash
36 @@ -17,6 +17,7 @@ echo "end"
37 : ${DEFAULTED:="yes"}
38 FOO="abc" echo "command environment"
39 export FOO003=1 FOO004=abc FOO005=(1 2 3) FOO002
40 +export foo
41 abc=1 export foo
42 true > /dev/null