summaryrefslogtreecommitdiffstats
path: root/eshtrans
diff options
context:
space:
mode:
authorP. J. McDermott <pj@pehjota.net>2016-02-21 13:02:45 (EST)
committer P. J. McDermott <pj@pehjota.net>2016-02-21 13:02:45 (EST)
commite858b7b8330ec9e7b7f91a810ed9b30674299c2a (patch)
tree3cdd1fef353eb248d782ff4d8368ee78a27fbd91 /eshtrans
parentd14f6d59b6765c99203be0213c6d265a102e1eb4 (diff)
downloadeggshell-e858b7b8330ec9e7b7f91a810ed9b30674299c2a.zip
eggshell-e858b7b8330ec9e7b7f91a810ed9b30674299c2a.tar.gz
eggshell-e858b7b8330ec9e7b7f91a810ed9b30674299c2a.tar.bz2
eshtrans/frontend: Count singly quoted newlines
Diffstat (limited to 'eshtrans')
-rw-r--r--eshtrans/frontend/lexer.esh4
-rw-r--r--eshtrans/main.esh5
2 files changed, 7 insertions, 2 deletions
diff --git a/eshtrans/frontend/lexer.esh b/eshtrans/frontend/lexer.esh
index 552be45..31670c1 100644
--- a/eshtrans/frontend/lexer.esh
+++ b/eshtrans/frontend/lexer.esh
@@ -518,6 +518,10 @@ scan_word()
'Unterminated' \
'quoted string'
;;
+ "${LF}")
+ lineno=$((${lineno} +1))
+ lines=$((${lines} + 1))
+ ;;
\')
break
;;
diff --git a/eshtrans/main.esh b/eshtrans/main.esh
index b637695..9373ff6 100644
--- a/eshtrans/main.esh
+++ b/eshtrans/main.esh
@@ -106,6 +106,7 @@ main()
#try '$((1 + $foo))'
#try "foo '\`'"
#try 'foo "`"'
-dbg=true
-try "\"'\""
+#dbg=true
+#try "\"'\""
+try "foo 'bar" "baz' &&"
}