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?



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


Please sign in to leave a comment.