Postprocess psi elements?

In bash strings can contain variables and things like backquotes, e.g. "Hello $world, `echo echo hello again`" .
My lexer matches the whole string and I created a PSI element for the string.

Is it somehow possible to highlight substrings to mark the strings and backquotes in a string?
I couldn't find the right methods in PsiElement to create child elements for substrings.

Also, is it somehow possible to send the backquote command which is contained in a string to the parser?
(So that I get syntax highlighting for the embedded commands).

Or do I have to mess with my lexer to do this?

The things which I've got working so far were easy to implement with the OpenApi - I just can't find the right classes/methods now

Thanks a lot,
Wallaby

Please sign in to leave a comment.