diff options
Diffstat (limited to 'eshtrans/frontend/lexer.esh')
-rw-r--r-- | eshtrans/frontend/lexer.esh | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/eshtrans/frontend/lexer.esh b/eshtrans/frontend/lexer.esh index 46ba310..92c806c 100644 --- a/eshtrans/frontend/lexer.esh +++ b/eshtrans/frontend/lexer.esh @@ -458,6 +458,7 @@ scan_word() # We must advance lineno because scan_wordexp() # was run in a subshell. lineno=$((${lineno} + ${ln_off})) + lines=$((${lines} + ${ln_off})) word="${word}${res}" # scan_wordexp() leaves behind an unused # character, so we should skip the lgetc() call @@ -583,7 +584,8 @@ scan_wordexp() res="${res#*${RS}}" c="${res%%${RS}*}" res="${res#*${RS}}" - lineno=${ln_off} + ln_off=$((${ln_off} - ${lineno})) + lineno=$((${lineno} + ${ln_off})) wordexp="\$(${SOH}C${STX}${res}" wordexp="${wordexp}${ETX})" # ")" is recognized in run_sublexer(). |