notepad4 icon indicating copy to clipboard operation
notepad4 copied to clipboard

bas : line extend character _ in comments

Open meteorquake opened this issue 2 years ago • 1 comments

In vba type languages a comment ending in (space)_ continues the comment on the next line (as with any use of the _ ending) So the line(s) that follow need to be colourised as comment. Currently this doesn't happen. Practically speaking, this becomes relevant when you have a line that's extended using _ and comment it off with a ' in front of its opening.

Example :-

' Comment _ comment not a comment

David

meteorquake avatar Sep 07 '23 10:09 meteorquake

Line continuation is not handled: https://github.com/zufuliu/notepad2/blob/12c61ddcf384c8b45505f42f65c62c6c08fe55f8/scintilla/lexers/LexVB.cxx#L184-L189

https://learn.microsoft.com/en-us/dotnet/visual-basic/reference/language-specification/lexical-grammar#line-continuation

LineContinuation
    : WhiteSpace '_' WhiteSpace* LineTerminator
    ;

zufuliu avatar Sep 07 '23 10:09 zufuliu