Class NodeUtils
java.lang.Object
org.apache.velocity.runtime.parser.node.NodeUtils
Utilities for dealing with the AST node structure.
- Version:
- $Id$
- Author:
- Jason van Zyl, Geir Magnusson Jr.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidfixIndentation(SimpleNode parent, String parentIndentation) Fix children indentation in structured space gobbling mode.static StringBuildergetSpecialText(Parser parser, Token t) Collect all the <SPECIAL_TOKEN>s that are carried along with a token.static StringtokenLiteral(Parser parser, Token t) complete node literal
-
Constructor Details
-
NodeUtils
public NodeUtils()
-
-
Method Details
-
getSpecialText
Collect all the <SPECIAL_TOKEN>s that are carried along with a token. Special tokens do not participate in parsing but can still trigger certain lexical actions. In some cases you may want to retrieve these special tokens, this is simply a way to extract them.- Parameters:
t- the Token- Returns:
- StrBuilder with the special tokens.
- Since:
- 2.0.0
-
tokenLiteral
complete node literal- Parameters:
t-- Returns:
- A node literal.
-
fixIndentation
Fix children indentation in structured space gobbling mode.- Parameters:
parent-parentIndentation-
-