|
|
|
|
|
by tofflos
2098 days ago
|
|
Thank you for making this. Have you considered an approach based on annotations and multi-line strings? I'm not sure string constants are valid targets for annotations but maybe that could be added to the language? @Language(name="Javascript")
"""
function callBark(aBarker) {
aBarker.bark();
}
"""
|
|
Yes, Manifold already supports Java 15 multi-line strings (aka text blocks) like this:
You can embed a resource fragment as either a declaration or a value. You use a string to embed a value fragment as with the JS example above. Note the [>.js<] header indicates the resource type for the string, similar to your annotation. As you surmised, an expression such as a string literal cannot be annotated.