summaryrefslogtreecommitdiffstats
path: root/eshtrans/frontend
diff options
context:
space:
mode:
authorP. J. McDermott <pj@pehjota.net>2016-02-28 01:28:15 (EST)
committer P. J. McDermott <pj@pehjota.net>2016-02-28 01:28:15 (EST)
commit5ee168e734cc0d91e171f22e1269825df7d3cdfa (patch)
tree5418804d8f548cf59da65900198633fbfc16518b /eshtrans/frontend
parent18ace1fbd610396467a41927d12c5b2ce6511b66 (diff)
downloadeggshell-5ee168e734cc0d91e171f22e1269825df7d3cdfa.zip
eggshell-5ee168e734cc0d91e171f22e1269825df7d3cdfa.tar.gz
eggshell-5ee168e734cc0d91e171f22e1269825df7d3cdfa.tar.bz2
eshtrans/frontend: Fix lungetc()
It needn't be called for non-backslash word characters.
Diffstat (limited to 'eshtrans/frontend')
-rw-r--r--eshtrans/frontend/lexer.esh3
1 files changed, 1 insertions, 2 deletions
diff --git a/eshtrans/frontend/lexer.esh b/eshtrans/frontend/lexer.esh
index 75f02c8..8bba0e0 100644
--- a/eshtrans/frontend/lexer.esh
+++ b/eshtrans/frontend/lexer.esh
@@ -99,7 +99,7 @@ lgetc()
lungetc()
{
- lbufi=$((${lbufi} - 1))
+ lbufi=$((${lbufi} - 2))
eval "c=\${lbufv_${lbufi}}"
#echo "LUNGETC:$lineno: $lbufi '$c'" >&2
lbufi=$((${lbufi} + 1))
@@ -222,7 +222,6 @@ next()
return
;;
*)
- lungetc
next_word
return
;;