Python: wheezy.template
@def indent(lines, sep):
@sep.join(lines.split('\n'))
@end
@def body():
function body;
statement2;
@end
@def func(name):
func @name {
@body()
@indent('1\n2\n3\n', '\n ')
@indent(body(), '\n ')
}
@end
@func('hello')
Java: StringTemplate4
No comments:
Post a Comment