Added recursive Templator logic

This commit is contained in:
Ziver Koc 2015-11-16 12:36:53 +01:00
parent ad04f622d3
commit b92465b62b
3 changed files with 20 additions and 12 deletions

5
src/zutil/parser/Templator.java Normal file → Executable file
View file

@ -411,7 +411,10 @@ public class Templator {
public void compile(StringBuilder str) {
Object obj = getObject();
if(obj != null)
str.append(obj.toString());
if(obj instanceof Templator)
str.append(((Templator) obj).compile());
else
str.append(obj.toString());
else
str.append("{{").append(tag).append("}}");
}