This PR is a more complete fix to the string encoder than #14 and based on that work from @jreinert
It fixes the issue that string literals generated for macro code could contain macro expressions or string interpolation which would lead to unexpected behaviour or mostly just fail to compile.
The string encoder now escapes all relevant characters and also adds a few simplifications for ASCII control characters. I also added some unit test for StringEncoder to ensure it works properly.
This PR is a more complete fix to the string encoder than #14 and based on that work from @jreinert
It fixes the issue that string literals generated for macro code could contain macro expressions or string interpolation which would lead to unexpected behaviour or mostly just fail to compile. The string encoder now escapes all relevant characters and also adds a few simplifications for ASCII control characters. I also added some unit test for
StringEncoder
to ensure it works properly./cc @jreinert @schovi