@Override TemplateElement postParseCleanup(boolean stripWhitespace) throws ParseException { if (getChildCount() == 1) { ConditionalBlock cblock = (ConditionalBlock) getChild(0); cblock.setLocation(getTemplate(), cblock, this); return cblock.postParseCleanup(stripWhitespace); } else { return super.postParseCleanup(stripWhitespace); } }
children = MixedContentElements(); cblock = new ConditionalBlock(condition, children, ConditionalBlock.TYPE_IF); cblock.setLocation(template, start, end, children); ifBlock = new IfBlock(cblock); label_8: children = MixedContentElements(); cblock = new ConditionalBlock(condition, children, ConditionalBlock.TYPE_ELSE_IF); cblock.setLocation(template, t, end, children); ifBlock.addBlock(cblock); children = MixedContentElements(); cblock = new ConditionalBlock(null, children, ConditionalBlock.TYPE_ELSE); cblock.setLocation(template, t, t, children); ifBlock.addBlock(cblock); break;
TemplateElement postParseCleanup(boolean stripWhitespace) throws ParseException { if (nestedElements.size() == 1) { ConditionalBlock cblock = (ConditionalBlock) nestedElements.get(0); cblock.isSimple = true; cblock.setLocation(getTemplate(), cblock, this); return cblock.postParseCleanup(stripWhitespace); } else { return super.postParseCleanup(stripWhitespace); } }
@Override TemplateElement postParseCleanup(boolean stripWhitespace) throws ParseException { if (getChildCount() == 1) { ConditionalBlock cblock = (ConditionalBlock) getChild(0); cblock.setLocation(getTemplate(), cblock, this); return cblock.postParseCleanup(stripWhitespace); } else { return super.postParseCleanup(stripWhitespace); } }
@Override TemplateElement postParseCleanup(boolean stripWhitespace) throws ParseException { if (getChildCount() == 1) { ConditionalBlock cblock = (ConditionalBlock) getChild(0); cblock.setLocation(getTemplate(), cblock, this); return cblock.postParseCleanup(stripWhitespace); } else { return super.postParseCleanup(stripWhitespace); } }
children = MixedContentElements(); cblock = new ConditionalBlock(condition, children, ConditionalBlock.TYPE_IF); cblock.setLocation(template, start, end, children); ifBlock = new IfBlock(cblock); label_8: children = MixedContentElements(); cblock = new ConditionalBlock(condition, children, ConditionalBlock.TYPE_ELSE_IF); cblock.setLocation(template, t, end, children); ifBlock.addBlock(cblock); children = MixedContentElements(); cblock = new ConditionalBlock(null, children, ConditionalBlock.TYPE_ELSE); cblock.setLocation(template, t, t, children); ifBlock.addBlock(cblock); break;
children = MixedContentElements(); cblock = new ConditionalBlock(condition, children, ConditionalBlock.TYPE_IF); cblock.setLocation(template, start, end, children); ifBlock = new IfBlock(cblock); label_8: children = MixedContentElements(); cblock = new ConditionalBlock(condition, children, ConditionalBlock.TYPE_ELSE_IF); cblock.setLocation(template, t, end, children); ifBlock.addBlock(cblock); children = MixedContentElements(); cblock = new ConditionalBlock(null, children, ConditionalBlock.TYPE_ELSE); cblock.setLocation(template, t, t, children); ifBlock.addBlock(cblock); break;
block = OptionalBlock(); cblock = new ConditionalBlock(condition, block, true); cblock.setLocation(template, start, block); ifBlock = new IfBlock(cblock); label_8: block = OptionalBlock(); cblock = new ConditionalBlock(condition, block, false); cblock.setLocation(template, t, block); ifBlock.addBlock(cblock); block = OptionalBlock(); cblock = new ConditionalBlock(null, block, false); cblock.setLocation(template, t, block); ifBlock.addBlock(cblock); break;