Comment support
Closed this issue · 1 comments
Bykiev commented
Hi, I need a comment support (like in C# /**/
and //
), is anybody tried to add support directly in NCalc? Of course I can prepare the data before passing to NCalc, but I believe antlr will be faster and more suitable for it.
david-brink-talogy commented
Something like this will work if you just want to throw them away.
SINGLE_LINE_COMMENT:
'//' .*? ('\r'? '\n' | '\r') -> channel(HIDDEN);
MULTI_LINE_COMMENT: '/*' .*? '*/' -> channel(HIDDEN);