From 89ee6884b4d825d1d47b62380bdde93dd1842fa5 Mon Sep 17 00:00:00 2001 From: P. J. McDermott Date: Sun, 21 Feb 2016 14:43:40 -0500 Subject: eshtrans/frontend: Handle T_IO_NUMBERs Also fix a couple bugs in accept(). --- (limited to 'eshtrans/backend/codegen.esh') 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 ' ' ;; -- cgit v0.9.1