summaryrefslogtreecommitdiffstats
path: root/eshtrans/backend
diff options
context:
space:
mode:
Diffstat (limited to 'eshtrans/backend')
-rw-r--r--eshtrans/backend/codegen.esh13
1 files changed, 13 insertions, 0 deletions
diff --git a/eshtrans/backend/codegen.esh b/eshtrans/backend/codegen.esh
index 1b2d168..8d77ce9 100644
--- a/eshtrans/backend/codegen.esh
+++ b/eshtrans/backend/codegen.esh
@@ -30,9 +30,19 @@ codegen_sub()
{
local array="${1}"
shift 1
+ local ionum=
+ ionum=false
IFS="${RS}"
for t in ${array}; do
+ if ${ionum}; then
+ case "${t%${US}*}" in
+ T_WORD|T_CMDNAME|T_FNAME)
+ printf ' '
+ ;;
+ esac
+ ionum=false
+ fi
toktext "${t}"
case "${t%${US}*}" in
T_NEWLINE|T_LPAREN)
@@ -41,6 +51,9 @@ codegen_sub()
# definitions (on zsh at least, while other
# shells accept the space).
;;
+ T_IO_NUMBER)
+ ionum=true
+ ;;
*)
printf ' '
;;