diff options
-rw-r--r-- | eshtrans/frontend/lexer.esh | 7 | ||||
-rw-r--r-- | eshtrans/main.esh | 8 |
2 files changed, 13 insertions, 2 deletions
diff --git a/eshtrans/frontend/lexer.esh b/eshtrans/frontend/lexer.esh index 6775bbc..d274076 100644 --- a/eshtrans/frontend/lexer.esh +++ b/eshtrans/frontend/lexer.esh @@ -498,6 +498,13 @@ scan_word() ;; \') word="${word}${c}" + if ${quoted}; then + case "${prev_c}" in + '') lgetc;; + *) c="${tmp_c}"; prev_c='';; + esac + continue + fi while :; do case "${prev_c}" in '') lgetc;; diff --git a/eshtrans/main.esh b/eshtrans/main.esh index 0177774..b637695 100644 --- a/eshtrans/main.esh +++ b/eshtrans/main.esh @@ -102,6 +102,10 @@ main() #try '# foo' 'bar' #try '' 'foo' #try '\\ foo' -try '$(($foo + 1))' -try '$((1 + $foo))' +#try '$(($foo + 1))' +#try '$((1 + $foo))' +#try "foo '\`'" +#try 'foo "`"' +dbg=true +try "\"'\"" } |