Smarter string escaping. Fixes #114
authorOwen Rodley <Strigoides@gmail.com>
Tue, 4 Jun 2013 04:42:44 +0000 (16:42 +1200)
committerOwen Rodley <Strigoides@gmail.com>
Tue, 4 Jun 2013 04:52:51 +0000 (16:52 +1200)
commit41f31884e0be58584c3ec47f78e32f305833d3a0
treefe951519a9954eb3c3e57f6e8b0d6049e37f3c27
parent6ec52a68fd2a26e18593f189b35722a3ca1011d8
Smarter string escaping. Fixes #114
If the string contains no single quotes, use a single-quoted string.
If the string contains no double quotes, use a double-quoted string.
If it contains both, single-quote it and escape the single-quotes.
In all cases backslashes and newlines are escaped.
src/compiler.lisp
src/print.lisp