Currently, the external syntax checkers are only checked after evaluation of the heredoc expression because a heredoc may include interpolations. It should be possible to check the syntax of a heredoc that has static content at validation time (and then skip this check at evaluation time).
In order to achieve this the external_syntax_support must be modified since it now requires scope to get to the compiler to get the injector to get the bound syntax checkers. (This should be refactored for other reasons as well).
The benefit of doing static validation of a heredoc is that static Json, Yaml, etc. or indeed inline EPP can be validated e.g. by writing: {code:puppet} inline_epp(@(END:epp)) Hello <%= $name %> END {code}