-
Notifications
You must be signed in to change notification settings - Fork 631
Fix jdbc-v2: nest /* */ block comments in the ANTLR4 lexer #3022
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 4 commits
696d810
3aa9c9b
32ec30a
8924961
e82bf5b
be5c96c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -507,6 +507,17 @@ UNDERSCORE : '_'; | |
|
|
||
| // Comments and whitespace | ||
|
|
||
| MULTI_LINE_COMMENT : '/*' -> skip, pushMode(IN_MULTI_LINE_COMMENT); | ||
| SINGLE_LINE_COMMENT : ('--' | '#!' | '#') ~('\n' | '\r')* ('\n' | '\r' | EOF) -> skip; | ||
| WHITESPACE : [ \u000B\u000C\t\r\n] -> skip; // '\n' can be part of multiline single query | ||
|
|
||
| // Block comments nest, as they do on the server: the mode stack holds the nesting level, so only the | ||
| // closer matching the outermost '/*' ends the comment. | ||
| mode IN_MULTI_LINE_COMMENT; | ||
|
|
||
| NESTED_MULTI_LINE_COMMENT : '/*' -> skip, pushMode(IN_MULTI_LINE_COMMENT); | ||
| MULTI_LINE_COMMENT_END : '*/' -> skip, popMode; | ||
| MULTI_LINE_COMMENT_BODY : . -> skip; | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Unterminated comment lacks EOF ruleLow Severity
Reviewed by Cursor Bugbot for commit be5c96c. Configure here. |
||
| MULTI_LINE_COMMENT : '/*' .*? '*/' -> skip; | ||
| SINGLE_LINE_COMMENT : ('--' | '//' | '#!' | '#') ~('\n' | '\r')* ('\n' | '\r' | EOF) -> skip; | ||
| WHITESPACE : [ \u000B\u000C\t\r\n] -> skip; // '\n' can be part of multiline single query | ||
| WHITESPACE : [ \u000B\u000C\t\r\n] -> skip; // '\n' can be part of multiline single query | ||


Uh oh!
There was an error while loading. Please reload this page.