Hacker News new | ask | show | jobs
by jnellis 2106 days ago
You can write other languages like this in Groovy using Intellij. Intellij allows you to annotate a multiline string as another language, then it will parse and syntax color, autoformat for you. The use case would be when you are templating frontend code snippets on the server side. I'm not sure if its just Groovy though, I'm betting Intellij can probably do this with other languages that have multiline strings.
1 comments

Right, but that is just syntax highlighting. This is resolving the content of the string type-safely, at compile-time.