mirror of
https://github.com/irmen/prog8.git
synced 2024-12-24 16:29:21 +00:00
* #40: fix grammar wrt line endings - tests pass
This commit is contained in:
parent
7c1de81861
commit
ce76a7dfa5
@ -14,15 +14,9 @@ grammar prog8;
|
||||
package prog8.parser;
|
||||
}
|
||||
|
||||
//FIXME: why isn't testWindowsAndMacNewlinesAreAlsoFine *failing* with this old stuff?!
|
||||
// note: when we build the whole thing with it, then non-Unix newlines actually DO NOT work with it...?!
|
||||
LINECOMMENT : '\n' [ \t]* COMMENT -> channel(HIDDEN);
|
||||
COMMENT : ';' ~[\n]* -> channel(HIDDEN) ;
|
||||
EOL : '\n'+ ;
|
||||
|
||||
//LINECOMMENT : ('\r'? '\n' | '\r') [ \t]* COMMENT -> channel(HIDDEN);
|
||||
//COMMENT : ';' ~[\r\n]* -> channel(HIDDEN) ;
|
||||
//EOL : ('\r'? '\n' | '\r')+ ;
|
||||
LINECOMMENT : ('\r'? '\n' | '\r') [ \t]* COMMENT -> channel(HIDDEN);
|
||||
COMMENT : ';' ~[\r\n]* -> channel(HIDDEN) ;
|
||||
EOL : ('\r'? '\n' | '\r')+ ;
|
||||
|
||||
WS : [ \t] -> skip ;
|
||||
// WS2 : '\\' EOL -> skip;
|
||||
|
Loading…
Reference in New Issue
Block a user