diff options
Diffstat (limited to 'parsing/lexer.sh')
-rw-r--r-- | parsing/lexer.sh | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/parsing/lexer.sh b/parsing/lexer.sh index aa72ec1..c856d99 100644 --- a/parsing/lexer.sh +++ b/parsing/lexer.sh @@ -109,7 +109,7 @@ next() continue ;; esac - next_word + next_word \\ return ;; '#') @@ -172,7 +172,7 @@ next() return ;; *) - next_word + next_word '' return ;; esac @@ -327,6 +327,8 @@ next_io() next_word() { + local prev_c="${1}" + shift 1 local res= local word= @@ -337,7 +339,7 @@ next_word() res="${res#*${RS}}" c="${res%%${RS}*}" res="${res#*${RS}}" - word="${res%%${RS}*}" + word="${prev_c}${res%%${RS}*}" # We must advance lineno because scan_word() was run in a subshell. lineno=$((${lineno} + ${ln_off})) |