Language injection using a template language?

Answered

Is it possible to use language injection with a template language?

//language=mtl
String s =
"hello" +
"<% if(true) { %>" +
"foo" +
"<% } %>" +
"bye";

This example fails to fully engage language injection for the MTL template language (from the Manifold project), the inner scripting language (Java) appears to be ignored.  I tried a similar example with JSP and it throws a ClassCastException (which I reported to JetBrains).  Is there some API a template language can implement to make injection work properly?  Thanks.

0

Please sign in to leave a comment.