/** * @see org.apache.velocity.runtime.parser.node.ParserVisitor#visit(org.apache.velocity.runtime.parser.node.ASTEscapedDirective, java.lang.Object) * @since 1.5 */ public Object visit(ASTEscapedDirective node, Object data) { data = node.childrenAccept(this, data); return data; }
/** * @see org.apache.velocity.runtime.parser.node.SimpleNode#render(org.apache.velocity.context.InternalContextAdapter, java.io.Writer) */ public boolean render(InternalContextAdapter context, Writer writer) throws IOException { writer.write(getFirstToken().image); return true; }
/** * @throws TemplateInitException * @see org.apache.velocity.runtime.parser.node.Node#init(org.apache.velocity.context.InternalContextAdapter, java.lang.Object) */ public Object init( InternalContextAdapter context, Object data) throws TemplateInitException { Object obj = super.init(context, data); saveTokenImages(); cleanupParserAndTokens(); // drop reference to Parser and all JavaCC Tokens return obj; } }
/** * used to separate the notion of a valid directive that has been * escaped, versus something that looks like a directive and * is just schmoo. This is important to do as a separate production * that creates a node, because we want this, in either case, to stop * the further parsing of the Directive() tree. */ final public void EscapedDirective() throws ParseException { /*@bgen(jjtree) EscapedDirective */ ASTEscapedDirective jjtn000 = new ASTEscapedDirective(this, JJTESCAPEDDIRECTIVE); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); try { Token t = null; t = jj_consume_token(ESCAPE_DIRECTIVE); jjtree.closeNodeScope(jjtn000, true); jjtc000 = false; /* * churn and burn.. */ t.image = escapedDirective( t.image ); } finally { if (jjtc000) { jjtree.closeNodeScope(jjtn000, true); } } }
/** * used to separate the notion of a valid directive that has been * escaped, versus something that looks like a directive and * is just schmoo. This is important to do as a separate production * that creates a node, because we want this, in either case, to stop * the further parsing of the Directive() tree. */ final public void EscapedDirective() throws ParseException { /*@bgen(jjtree) EscapedDirective */ ASTEscapedDirective jjtn000 = new ASTEscapedDirective(this, JJTESCAPEDDIRECTIVE); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); try { Token t = null; t = jj_consume_token(ESCAPE_DIRECTIVE); jjtree.closeNodeScope(jjtn000, true); jjtc000 = false; /* * churn and burn.. */ t.image = escapedDirective( t.image ); } finally { if (jjtc000) { jjtree.closeNodeScope(jjtn000, true); } } }
/** * used to separate the notion of a valid directive that has been * escaped, versus something that looks like a directive and * is just schmoo. This is important to do as a separate production * that creates a node, because we want this, in either case, to stop * the further parsing of the Directive() tree. */ final public void EscapedDirective() throws ParseException { /*@bgen(jjtree) EscapedDirective */ ASTEscapedDirective jjtn000 = new ASTEscapedDirective(this, JJTESCAPEDDIRECTIVE); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); try { Token t = null; t = jj_consume_token(ESCAPE_DIRECTIVE); jjtree.closeNodeScope(jjtn000, true); jjtc000 = false; /* * churn and burn.. */ t.image = escapedDirective( t.image ); } finally { if (jjtc000) { jjtree.closeNodeScope(jjtn000, true); } } }
/** * @see org.apache.velocity.runtime.parser.node.ParserVisitor#visit(org.apache.velocity.runtime.parser.node.ASTEscapedDirective, java.lang.Object) * @since 1.5 */ public Object visit(ASTEscapedDirective node, Object data) { data = node.childrenAccept(this, data); return data; }
/** * @see org.apache.velocity.runtime.parser.node.SimpleNode#render(org.apache.velocity.context.InternalContextAdapter, java.io.Writer) */ public boolean render(InternalContextAdapter context, Writer writer) throws IOException { if (context.getAllowRendering()) { writer.write(getFirstToken().image); } return true; }
/** * used to separate the notion of a valid directive that has been * escaped, versus something that looks like a directive and * is just schmoo. This is important to do as a separate production * that creates a node, because we want this, in either case, to stop * the further parsing of the Directive() tree. */ final public void EscapedDirective() throws ParseException { /*@bgen(jjtree) EscapedDirective */ ASTEscapedDirective jjtn000 = new ASTEscapedDirective(this, JJTESCAPEDDIRECTIVE); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); try { Token t = null; t = jj_consume_token(ESCAPE_DIRECTIVE); jjtree.closeNodeScope(jjtn000, true); jjtc000 = false; /* * churn and burn.. */ t.image = escapedDirective( t.image ); } finally { if (jjtc000) { jjtree.closeNodeScope(jjtn000, true); } } }
/** * @see org.apache.velocity.runtime.parser.node.ParserVisitor#visit(org.apache.velocity.runtime.parser.node.ASTEscapedDirective, java.lang.Object) * @since 1.5 */ public Object visit(ASTEscapedDirective node, Object data) { data = node.childrenAccept(this, data); return data; }