mirror of
https://github.com/irmen/prog8.git
synced 2024-11-29 17:50:35 +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;
|
package prog8.parser;
|
||||||
}
|
}
|
||||||
|
|
||||||
//FIXME: why isn't testWindowsAndMacNewlinesAreAlsoFine *failing* with this old stuff?!
|
LINECOMMENT : ('\r'? '\n' | '\r') [ \t]* COMMENT -> channel(HIDDEN);
|
||||||
// note: when we build the whole thing with it, then non-Unix newlines actually DO NOT work with it...?!
|
COMMENT : ';' ~[\r\n]* -> channel(HIDDEN) ;
|
||||||
LINECOMMENT : '\n' [ \t]* COMMENT -> channel(HIDDEN);
|
EOL : ('\r'? '\n' | '\r')+ ;
|
||||||
COMMENT : ';' ~[\n]* -> channel(HIDDEN) ;
|
|
||||||
EOL : '\n'+ ;
|
|
||||||
|
|
||||||
//LINECOMMENT : ('\r'? '\n' | '\r') [ \t]* COMMENT -> channel(HIDDEN);
|
|
||||||
//COMMENT : ';' ~[\r\n]* -> channel(HIDDEN) ;
|
|
||||||
//EOL : ('\r'? '\n' | '\r')+ ;
|
|
||||||
|
|
||||||
WS : [ \t] -> skip ;
|
WS : [ \t] -> skip ;
|
||||||
// WS2 : '\\' EOL -> skip;
|
// WS2 : '\\' EOL -> skip;
|
||||||
|
Loading…
Reference in New Issue
Block a user