fix: remove space character in line comment rule (#69)

* fix: remove space character in line comment rule

* build: recompile grammars

* test: add cases for line comment
This commit is contained in:
Ziv
2023-01-09 11:01:10 +08:00
committed by GitHub
parent 93b1c5141a
commit 14c2534de7
30 changed files with 8485 additions and 8450 deletions

View File

@ -5,7 +5,7 @@ lexer grammar FlinkSqlLexer;
SPACE: [ \t\r\n]+ -> channel(HIDDEN);
COMMENT_INPUT: '/*' .*? '*/' -> channel(HIDDEN);
LINE_COMMENT: (
('-- ' | '#') ~[\r\n]* ('\r'? '\n' | EOF)
('--' | '#') ~[\r\n]* ('\r'? '\n' | EOF)
| '--' ('\r'? '\n' | EOF)
) -> channel(HIDDEN);

View File

@ -33,7 +33,7 @@ SPACE: [ \t\r\n]+ -> channel(HIDDEN);
SPEC_MYSQL_COMMENT: '/*!' .+? '*/' -> channel(MYSQLCOMMENT);
COMMENT_INPUT: '/*' .*? '*/' -> channel(HIDDEN);
LINE_COMMENT: (
('-- ' | '#') ~[\r\n]* ('\r'? '\n' | EOF)
('--' | '#') ~[\r\n]* ('\r'? '\n' | EOF)
| '--' ('\r'? '\n' | EOF)
) -> channel(HIDDEN);