4

I'm using the C# version of the StringTemplate library (http://www.stringtemplate.org/) to generate C++ code. My templates work fine, until I started using the

<attribute:template(argument-list)>

syntax to apply templates to multiple values in a 'list' ('multi-valued-argument' if I'm correct in the StringTemplate lingo). From that moment on, the EOL character switched from \n to \r\n, which cause Visual Studio and other editors to pop a 'convert end of line characters to \n' warning every time I open generated files.

So, my question is: how do I force StringTemplate to always output \n as EOL marker?

Roel
  • 19,338
  • 6
  • 61
  • 90

1 Answers1

1

You can try to use an Output Filter (http://www.antlr.org/wiki/display/ST/Output+Filters) to replace all \r\n with \n

mathieu
  • 30,974
  • 4
  • 64
  • 90