UseNewLine Property is useless?

Nov 30, 2013 at 8:21 PM

when I set UseNewLine to false in my grammar it is overridden in the Init Method of the NewLineTerminal. How can I set UseNewLine to false that this will be mentioned?

Dec 4, 2013 at 6:02 AM
it is not. The comment there in NewLineTerminal.Init method clearly explains that this flag, if set to true, tells scanner to treat new line char in input stream not as whitespace, like space char, but as meaningful character. This flag should be set to false in languages like c# and to true in languages like VB.NET. You are supposed to set this in your grammar. To make your life easier, Irony tries to detect the value automatically. If you used NewLine terminal anywhere in your grammar, it indicates that newLine char is a meaningful symbol, so NewLine's Init sets this flag. Simple automatic logic. Don't see any problem here.
PS sorry for later reply
Dec 4, 2013 at 10:52 AM
Ah ok, that make sense.

I was wondering that the UseNewLine property was overridden by the NewLineTerminal. Without the NewLineTerminal in the grammar it now works as expected.

Thanks for your answer