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: Sun, 03 Jun 2012 09:10:37
Message-Id: 1330676749.6b1bcb401a25727bea39066cfe7d16fe3536e981.betelgeuse@gentoo
1 commit: 6b1bcb401a25727bea39066cfe7d16fe3536e981
2 Author: Mu Qiao <qiaomuf <AT> gentoo <DOT> org>
3 AuthorDate: Fri Mar 2 08:25:49 2012 +0000
4 Commit: Petteri Räty <betelgeuse <AT> gentoo <DOT> org>
5 CommitDate: Fri Mar 2 08:25:49 2012 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/libbash.git;a=commit;h=6b1bcb40
7
8 Walker: allow empty case command
9
10 ---
11 bashast/libbashWalker.g | 3 ++-
12 scripts/compound_command.bash | 12 ++++++++++++
13 2 files changed, 14 insertions(+), 1 deletions(-)
14
15 diff --git a/bashast/libbashWalker.g b/bashast/libbashWalker.g
16 index f57f403..95f8a90 100644
17 --- a/bashast/libbashWalker.g
18 +++ b/bashast/libbashWalker.g
19 @@ -1068,7 +1068,8 @@ case_clause[const std::string& target] returns[bool matched]
20 else
21 {
22 $matched = false;
23 - seek_to_next_tree(ctx);
24 + if(LA(1) == CASE_COMMAND)
25 + seek_to_next_tree(ctx);
26 }
27 })
28 |CASE_PATTERN;
29
30 diff --git a/scripts/compound_command.bash b/scripts/compound_command.bash
31 index 0d3321e..36161fe 100644
32 --- a/scripts/compound_command.bash
33 +++ b/scripts/compound_command.bash
34 @@ -361,3 +361,15 @@ for ((i = "${#python_versions[@]}"; i >= 0; i--))
35 do
36 echo $i
37 done
38 +EAPI="4"
39 +case ${EAPI} in
40 + 0|1)
41 + echo "Unsupported EAPI=${EAPI} (too old) for ruby-ng.eclass" ;;
42 + 2|3);;
43 + 4)
44 + # S is no longer automatically assigned when it doesn't exist.
45 + S="${WORKDIR}"
46 + ;;
47 + *)
48 + echo "Unknown EAPI=${EAPI} for ruby-ng.eclass"
49 +esac