From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1QRkPC-000259-FS for garchives@archives.gentoo.org; Wed, 01 Jun 2011 12:20:10 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 944071C18E; Wed, 1 Jun 2011 12:19:53 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 47B9B1C18E for ; Wed, 1 Jun 2011 12:19:53 +0000 (UTC) Received: from pelican.gentoo.org (unknown [66.219.59.40]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id C2BFA1B4018 for ; Wed, 1 Jun 2011 12:19:52 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id 2CEDF80510 for ; Wed, 1 Jun 2011 12:19:52 +0000 (UTC) From: "Petteri Räty" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Petteri Räty" Message-ID: <135a631da5c8f2a51539caa366d6d4ebb1582d34.betelgeuse@gentoo> Subject: [gentoo-commits] proj/libbash:master commit in: scripts/, bashast/ X-VCS-Repository: proj/libbash X-VCS-Files: bashast/libbashWalker.g scripts/command_execution.bash X-VCS-Directories: scripts/ bashast/ X-VCS-Committer: betelgeuse X-VCS-Committer-Name: Petteri Räty X-VCS-Revision: 135a631da5c8f2a51539caa366d6d4ebb1582d34 Date: Wed, 1 Jun 2011 12:19:52 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: X-Archives-Hash: 45620d13181457768e0fbd8b542fbb26 commit: 135a631da5c8f2a51539caa366d6d4ebb1582d34 Author: Mu Qiao gentoo org> AuthorDate: Tue May 31 08:22:31 2011 +0000 Commit: Petteri R=C3=A4ty gentoo org> CommitDate: Wed Jun 1 12:15:21 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/libbash.git;a= =3Dcommit;h=3D135a631d Walker: fix variable definition handling As we ignore the exported variables that are not declared with values, the variable definition rule has to handle empty variable definitions. --- bashast/libbashWalker.g | 2 +- scripts/command_execution.bash | 1 + 2 files changed, 2 insertions(+), 1 deletions(-) diff --git a/bashast/libbashWalker.g b/bashast/libbashWalker.g index f53a2be..af19dcd 100644 --- a/bashast/libbashWalker.g +++ b/bashast/libbashWalker.g @@ -124,7 +124,7 @@ variable_definitions @declarations { bool local =3D false; } - :^(VARIABLE_DEFINITIONS (LOCAL { local =3D true; })? var_def[local]+); + :^(VARIABLE_DEFINITIONS (LOCAL { local =3D true; })? var_def[local]*); =20 name_base returns[std::string libbash_value] :NAME { $libbash_value =3D walker->get_string($NAME); } diff --git a/scripts/command_execution.bash b/scripts/command_execution.b= ash index 95401b4..8005a23 100644 --- a/scripts/command_execution.bash +++ b/scripts/command_execution.bash @@ -17,6 +17,7 @@ echo "end" : ${DEFAULTED:=3D"yes"} FOO=3D"abc" echo "command environment" export FOO003=3D1 FOO004=3Dabc FOO005=3D(1 2 3) FOO002 +export foo abc=3D1 export foo true > /dev/null =20