PsiLanguageInjectionHost with custom language variables?

Hi,
in Bash there is the concept of a heredoc, i.e. a range of text which might be of another language which may be evaluated with Bash variable replacements.
For example:

export VAR="hello word"
cat - << XML
     <tag>
          This is the value of a bash var: $VAR
     </tag>
XML


I've implemented a PsiLanguageInjectionHost for the heredoc psi element.
But that way I lose my references to the bash variable $VAR.

How can I inject another language and still insert my own variables / PSI elements at certain places without breaking the parsing of the injected language?

Thanks!
Wallaby

Please sign in to leave a comment.