Open NamTranHong opened 7 years ago
@NamTranHong What is the error? Maybe use a {...}
subtemplate
@NamTranHong maybe you want something like this?
type(type) ::= <%
<(typeTemplate(type))(type)>
%>
typeTemplate(type) ::= <%
type_<type.class.simpleName>
%>
type_NamedType(type) ::= <%
...
%>
type_ArrayType(type) ::= <%
...
%>
type_ListType(type) ::= <%
...
%>
type_MapType(type) ::= <%
...
%>
type_OptionalType(type) ::= <%
...
%>
I have a template like this MethodBlock(block) ::= << <block.elements:{e|<e:(e.class.simpleName)()>}; separator="\n">
But I want to add prefix to template name, like this MethodBlock(block) ::= << <block.elements:{e|<e:(temp_(e.class.simpleName))()>}; separator="\n">
I like to call temp_MethodDeclaration
But it fires error. How can I fix it?
Thnks Alex