Creating comments in parser

Hi all,

I usually handle the comments in my plugin using the lexer, but in some cases I need to return them from the parser since I need to parse an entire form to comment. This works, I mark the comment token in my PsiBuilder and I can see that a PsiComment is created. However it's not highlighted, presumably since the lexer has already highlighted the form. Currently I'm highlighting this type of comment in my annotator, is this the best way to handle this?

Cheers,
Colin

2 comments
Comment actions Permalink

Yes, this is the best way. Any highlighting which can't be done on the lexer level needs to be performed by an annotator.

0
Comment actions Permalink

Great, thanks Dmitry.


0

Please sign in to leave a comment.