public abstract class AbstractExprNode extends AbstractNode implements ExprNode
Important: Do not use outside of Soy code (treat as superpackage-private).
ExprNode.ConstantNode, ExprNode.Kind, ExprNode.OperatorNode, ExprNode.ParentExprNode, ExprNode.PrimitiveNodeSPACES| Modifier | Constructor and Description |
|---|---|
protected |
AbstractExprNode(AbstractExprNode orig)
Copy constructor.
|
protected |
AbstractExprNode(SourceLocation sourceLocation) |
| Modifier and Type | Method and Description |
|---|---|
abstract ExprNode |
clone()
Copies this node.
|
ExprNode.ParentExprNode |
getParent()
Gets this node's parent.
|
SourceLocation |
getSourceLocation()
TODO(user): The quality of source locations in expression nodes is not great.
|
couldHaveSyntaxVersionAtLeast, getNearestAncestor, getSyntaxVersionBound, hasAncestor, maybeSetSyntaxVersionBound, setParent, toString, toTreeStringequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitcouldHaveSyntaxVersionAtLeast, getNearestAncestor, getSyntaxVersionBound, hasAncestor, maybeSetSyntaxVersionBound, setParent, toSourceString, toTreeStringprotected AbstractExprNode(SourceLocation sourceLocation)
protected AbstractExprNode(AbstractExprNode orig)
orig - The node to copy.public ExprNode.ParentExprNode getParent()
Nodepublic SourceLocation getSourceLocation()
CallParamNode.Builder#parseCommandTextHelper), which implies that the
parentSourceLocation passed along with the munged text is inaccurate.
Until this is fixed, source locations obtained from expression nodes should be treated as best-effort only.
getSourceLocation in interface Nodepublic abstract ExprNode clone()
NodeAll clone() overrides should follow this contract:
{@literal @}Override public T clone() {
return new T(this);
}
NOTE: this means we do not ultimately delegate to Object.clone(), ever.
TODO(lukes): The usecases for a clone method are few and far between. Making the AST nodes immutable (or at least unmodifiable) would be preferable to maintaining our clone() methods.