diff options
author | P. J. McDermott <pj@pehjota.net> | 2016-02-27 21:56:21 (EST) |
---|---|---|
committer | P. J. McDermott <pj@pehjota.net> | 2016-02-27 21:56:21 (EST) |
commit | 39854f9aa993ef08a49d5ad5d3b6d69d3371e8e3 (patch) | |
tree | c9d3ae858d0167e97adb8e8ddc78ed7ba18700fe /eshtrans/frontend | |
parent | caa19db7c11ee3c53833614e66a2b8d1a0d31668 (diff) | |
download | eggshell-39854f9aa993ef08a49d5ad5d3b6d69d3371e8e3.zip eggshell-39854f9aa993ef08a49d5ad5d3b6d69d3371e8e3.tar.gz eggshell-39854f9aa993ef08a49d5ad5d3b6d69d3371e8e3.tar.bz2 |
eshtrans/frontend: Fix lungetc()
Diffstat (limited to 'eshtrans/frontend')
-rw-r--r-- | eshtrans/frontend/lexer.esh | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/eshtrans/frontend/lexer.esh b/eshtrans/frontend/lexer.esh index f43b47d..6120128 100644 --- a/eshtrans/frontend/lexer.esh +++ b/eshtrans/frontend/lexer.esh @@ -92,14 +92,16 @@ lgetc() c='' else eval "c=\${lbufv_${lbufi}}" + #echo "LGETC:$lineno: $lbufi '$c'" >&2 lbufi=$((${lbufi} + 1)) fi } lungetc() { - lbufi=$((${lbufi} - 2)) + lbufi=$((${lbufi} - 1)) eval "c=\${lbufv_${lbufi}}" + #echo "LUNGETC:$lineno: $lbufi '$c'" >&2 lbufi=$((${lbufi} + 1)) } @@ -110,6 +112,7 @@ lsetc() else lbufi=$((${lbufi} - 1)) eval "c=\${lbufv_${lbufi}}" + #echo "LSETC:$lineno: $lbufi '$c'" >&2 lbufi=$((${lbufi} + 1)) fi } |