summaryrefslogtreecommitdiffstats
path: root/parsing
diff options
context:
space:
mode:
authorP. J. McDermott <pj@pehjota.net>2016-02-20 12:39:46 (EST)
committer P. J. McDermott <pj@pehjota.net>2016-02-20 12:39:46 (EST)
commit8b3b14a4b57ef8e2dabfcf1a8af0de8126e4b080 (patch)
tree422b8a7e4b0adbc871f4cd2dcf47bd78ff9d669c /parsing
parentac6cc6b2405bb6d3775344a873fb1172f38f1c7e (diff)
downloadeggshell-8b3b14a4b57ef8e2dabfcf1a8af0de8126e4b080.zip
eggshell-8b3b14a4b57ef8e2dabfcf1a8af0de8126e4b080.tar.gz
eggshell-8b3b14a4b57ef8e2dabfcf1a8af0de8126e4b080.tar.bz2
Fix command substitution (warning: still ugly)
Diffstat (limited to 'parsing')
-rw-r--r--parsing/parse.sh7
1 files changed, 6 insertions, 1 deletions
diff --git a/parsing/parse.sh b/parsing/parse.sh
index 4d4b9ea..da9b2e5 100644
--- a/parsing/parse.sh
+++ b/parsing/parse.sh
@@ -603,7 +603,11 @@ parse_sub()
get_lineno
printf '%c' "${RS}"
- get_lexer_char
+ if accept T_RPAREN; then
+ printf ')'
+ else
+ get_lexer_char
+ fi
printf '%c' "${RS}"
get_tokens
@@ -631,6 +635,7 @@ try()
printf 'Trying script:\n'
printf '\t%s\n' "${@}"
if tokens="$(printf '%s\n' "${@}" | parse -)"; then
+ printf 'Tokens: %s\n' "${tokens}"
IFS="${RS}"
for t in ${tokens}; do
printf 'Token: %s\n' "$(tokname "${t}")"