AttemptBlock(TemplateElements attemptedSectionChildren, RecoveryBlock recoverySection) { TemplateElement attemptedSection = attemptedSectionChildren.asSingleElement(); this.attemptedSection = attemptedSection; this.recoverySection = recoverySection; setChildBufferCapacity(2); addChild(attemptedSection); // for backward compatibility addChild(recoverySection); }
/** * @param buffWithCnt Maybe {@code null} * * @since 2.3.24 */ final void setChildren(TemplateElements buffWithCnt) { TemplateElement[] childBuffer = buffWithCnt.getBuffer(); int childCount = buffWithCnt.getCount(); for (int i = 0; i < childCount; i++) { TemplateElement child = childBuffer[i]; child.index = i; child.parent = this; } this.childBuffer = childBuffer; this.childCount = childCount; }
final void setLocation(Template template, Token tagBegin, Token tagEnd, TemplateElements children) { TemplateElement lastChild = children.getLast(); if (lastChild != null) { // [<#if exp>children]<#else> setLocation(template, tagBegin, lastChild); } else { // [<#if exp>]<#else> setLocation(template, tagBegin, tagEnd); } }
{if ("" != null) return childBuffer != null ? new TemplateElements(childBuffer, childCount) : TemplateElements.EMPTY;} throw new Error("Missing return statement in function");
{if ("" != null) return childBuffer != null ? new TemplateElements(childBuffer, childCount) : TemplateElements.EMPTY;} throw new Error("Missing return statement in function");
/** * @param buffWithCnt Maybe {@code null} * * @since 2.3.24 */ final void setChildren(TemplateElements buffWithCnt) { TemplateElement[] childBuffer = buffWithCnt.getBuffer(); int childCount = buffWithCnt.getCount(); for (int i = 0; i < childCount; i++) { TemplateElement child = childBuffer[i]; child.index = i; child.parent = this; } this.childBuffer = childBuffer; this.childCount = childCount; }
/** * Used for some backward compatibility hacks. */ MixedContent asMixedContent() { MixedContent mixedContent = new MixedContent(); if (count != 0) { TemplateElement first = buffer[0]; mixedContent.setChildren(this); mixedContent.setLocation(first.getTemplate(), first, getLast()); } return mixedContent; }
/** * Root production to be used when parsing * an entire file. */ final public TemplateElement Root() throws ParseException {TemplateElements children; if (jj_2_15(2147483647)) { HeaderElement(); } else { ; } children = MixedContentElements(); jj_consume_token(0); TemplateElement root = children.asSingleElement(); root.setFieldsForRootElement(); if (!preventStrippings) { root = root.postParseCleanup(stripWhitespace); } // The cleanup result is possibly an element from deeper: root.setFieldsForRootElement(); {if ("" != null) return root;} throw new Error("Missing return statement in function"); }
{if ("" != null) return childBuffer != null ? new TemplateElements(childBuffer, childCount) : TemplateElements.EMPTY;} throw new Error("Missing return statement in function");
/** * @param buffWithCnt Maybe {@code null} * * @since 2.3.24 */ final void setChildren(TemplateElements buffWithCnt) { TemplateElement[] childBuffer = buffWithCnt.getBuffer(); int childCount = buffWithCnt.getCount(); for (int i = 0; i < childCount; i++) { TemplateElement child = childBuffer[i]; child.index = i; child.parent = this; } this.childBuffer = childBuffer; this.childCount = childCount; }
/** * Used for some backward compatibility hacks. */ TemplateElement asSingleElement() { if (count == 0) { return new TextBlock(CollectionUtils.EMPTY_CHAR_ARRAY, false); } else { TemplateElement first = buffer[0]; if (count == 1) { return first; } else { MixedContent mixedContent = new MixedContent(); mixedContent.setChildren(this); mixedContent.setLocation(first.getTemplate(), first, getLast()); return mixedContent; } } }
AttemptBlock(TemplateElements attemptedSectionChildren, RecoveryBlock recoverySection) { TemplateElement attemptedSection = attemptedSectionChildren.asSingleElement(); this.attemptedSection = attemptedSection; this.recoverySection = recoverySection; setChildBufferCapacity(2); addChild(attemptedSection); // for backward compatibility addChild(recoverySection); }
final void setLocation(Template template, Token tagBegin, Token tagEnd, TemplateElements children) { TemplateElement lastChild = children.getLast(); if (lastChild != null) { // [<#if exp>children]<#else> setLocation(template, tagBegin, lastChild); } else { // [<#if exp>]<#else> setLocation(template, tagBegin, tagEnd); } }
AttemptBlock(TemplateElements attemptedSectionChildren, RecoveryBlock recoverySection) { TemplateElement attemptedSection = attemptedSectionChildren.asSingleElement(); this.attemptedSection = attemptedSection; this.recoverySection = recoverySection; setChildBufferCapacity(2); addChild(attemptedSection); // for backward compatibility addChild(recoverySection); }
final void setLocation(Template template, Token tagBegin, Token tagEnd, TemplateElements children) { TemplateElement lastChild = children.getLast(); if (lastChild != null) { // [<#if exp>children]<#else> setLocation(template, tagBegin, lastChild); } else { // [<#if exp>]<#else> setLocation(template, tagBegin, tagEnd); } }
/** * Root production to be used when parsing * an entire file. */ final public TemplateElement Root() throws ParseException {TemplateElements children; if (jj_2_15(2147483647)) { HeaderElement(); } else { ; } children = MixedContentElements(); jj_consume_token(0); TemplateElement root = children.asSingleElement(); root.setFieldsForRootElement(); if (!preventStrippings) { root = root.postParseCleanup(stripWhitespace); } // The cleanup result is possibly an element from deeper: root.setFieldsForRootElement(); {if ("" != null) return root;} throw new Error("Missing return statement in function"); }
/** * Used for some backward compatibility hacks. */ MixedContent asMixedContent() { MixedContent mixedContent = new MixedContent(); if (count != 0) { TemplateElement first = buffer[0]; mixedContent.setChildren(this); mixedContent.setLocation(first.getTemplate(), first, getLast()); } return mixedContent; }
/** * Root production to be used when parsing * an entire file. */ final public TemplateElement Root() throws ParseException {TemplateElements children; if (jj_2_15(2147483647)) { HeaderElement(); } else { ; } children = MixedContentElements(); jj_consume_token(0); TemplateElement root = children.asSingleElement(); root.setFieldsForRootElement(); if (!preventStrippings) { root = root.postParseCleanup(stripWhitespace); } // The cleanup result is possibly an element from deeper: root.setFieldsForRootElement(); {if ("" != null) return root;} throw new Error("Missing return statement in function"); }
/** * Used for some backward compatibility hacks. */ MixedContent asMixedContent() { MixedContent mixedContent = new MixedContent(); if (count != 0) { TemplateElement first = buffer[0]; mixedContent.setChildren(this); mixedContent.setLocation(first.getTemplate(), first, getLast()); } return mixedContent; }
/** * Used for some backward compatibility hacks. */ TemplateElement asSingleElement() { if (count == 0) { return new TextBlock(CollectionUtils.EMPTY_CHAR_ARRAY, false); } else { TemplateElement first = buffer[0]; if (count == 1) { return first; } else { MixedContent mixedContent = new MixedContent(); mixedContent.setChildren(this); mixedContent.setLocation(first.getTemplate(), first, getLast()); return mixedContent; } } }