I have an issue with a lexer/parser and PsiBuilder.remapCurrentToken.
The lexer returns a token, e.g. FOR_KEYWORD . The parser changes this to WORD using PsiBuilder.remapCurrentToken . PsiViewer displays that the psi tree contains the token "WORD" as leaf element, which is fine IMHO.
The highlighter has a configuration for the FOR_KEYWORD and another one for WORD. The token WORD (i.e. the remapped token) is still highlighted using the colors of the FOR_KEYWORD and not as WORD token.
Is there any way to fix this?
Changing the lexer is not possible, because the language (Bash) interprets keywords (e.g. for) as normal string literals depending on the context (e.g. echo for).
Thanks a lot for any hints!