diff options
author | P. J. McDermott <pj@pehjota.net> | 2016-02-21 14:43:40 (EST) |
---|---|---|
committer | P. J. McDermott <pj@pehjota.net> | 2016-02-21 14:43:40 (EST) |
commit | 89ee6884b4d825d1d47b62380bdde93dd1842fa5 (patch) | |
tree | ef7da058f859fc54e7a83d3d1a11f4d024f0bd3e /eshtrans/backend | |
parent | 89268e7fae95bd6e215ca03f2b5276691ef31166 (diff) | |
download | eggshell-89ee6884b4d825d1d47b62380bdde93dd1842fa5.zip eggshell-89ee6884b4d825d1d47b62380bdde93dd1842fa5.tar.gz eggshell-89ee6884b4d825d1d47b62380bdde93dd1842fa5.tar.bz2 |
eshtrans/frontend: Handle T_IO_NUMBERs
Also fix a couple bugs in accept().
Diffstat (limited to 'eshtrans/backend')
-rw-r--r-- | eshtrans/backend/codegen.esh | 13 |
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 ' ' ;; |