super(ctx, "Type declaration not allowed in current dialect[%s]", ctx.getDialect());
}
}
void parse() {
DialectManager dm = engine.dialectManager();
while (true) {
this.breakStack.clear();
this.codeTypeStack.clear();
this.pushCodeType(cb.templateDefLang);
this.inBodyStack.clear();
this.inBodyStack2.clear();
this.compactStack.clear();
this.continueStack.clear();
this.localeStack.clear();
this.insideDirectiveComment = false;
this.blocks.clear();
cursor = 0;
cb.rewind();
dm.beginParse(this);
TemplateResourceManager.setUpTmpBlackList();
try {
TemplateTokenizer tt = new TemplateTokenizer(this);
for (Token builder : tt) {
cb.addBuilder(builder);
}
dm.endParse(this);
break;
} catch (ExitInstruction e) {
dm.endParse(this);
break;
} catch (RewindableException e) {
dm.endParse(this);
if (null != cb.requiredDialect) {
throw e;
}
} catch (RuntimeException e) {
dm.endParse(this);
throw e;
}
}
}