From e858b7b8330ec9e7b7f91a810ed9b30674299c2a Mon Sep 17 00:00:00 2001 From: P. J. McDermott Date: Sun, 21 Feb 2016 13:02:45 -0500 Subject: eshtrans/frontend: Count singly quoted newlines --- (limited to 'eshtrans') 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' &&" } -- cgit v0.9.1