summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--eshtrans/frontend/lexer.esh4
-rw-r--r--eshtrans/main.esh5
2 files changed, 6 insertions, 3 deletions
diff --git a/eshtrans/frontend/lexer.esh b/eshtrans/frontend/lexer.esh
index d904aa0..6775bbc 100644
--- a/eshtrans/frontend/lexer.esh
+++ b/eshtrans/frontend/lexer.esh
@@ -783,8 +783,8 @@ scan_wordexp_arith()
arith=''
paren_lvl=0
+ lgetc
while :; do
- lgetc
case "${c}" in
'')
synerr 'end of file unexpected (%s)' \
@@ -823,11 +823,13 @@ scan_wordexp_arith()
# was run in a subshell.
lineno=$((${lineno} + ${ln_off}))
arith="${arith}${sub_wordexp}"
+ continue
;;
*)
arith="${arith}${c}"
;;
esac
+ lgetc
done
}
diff --git a/eshtrans/main.esh b/eshtrans/main.esh
index 46edd26..0177774 100644
--- a/eshtrans/main.esh
+++ b/eshtrans/main.esh
@@ -101,6 +101,7 @@ main()
#try 'foo' '#bar'
#try '# foo' 'bar'
#try '' 'foo'
-dbg=true
-try '\\ foo'
+#try '\\ foo'
+try '$(($foo + 1))'
+try '$((1 + $foo))'
}