public final class LetValueNode extends LetNode implements SoyNode.ExprHolderNode
Important: Do not use outside of Soy code (treat as superpackage-private).
| Modifier and Type | Class and Description |
|---|---|
static class |
LetValueNode.Builder
Builder for
LetValueNode. |
LetNode.CommandTextParseResultSoyNode.BlockCommandNode, SoyNode.BlockNode, SoyNode.CommandNode, SoyNode.ConditionalBlockNode, SoyNode.ExprHolderNode, SoyNode.Kind, SoyNode.LocalVarBlockNode, SoyNode.LocalVarInlineNode, SoyNode.LocalVarNode, SoyNode.LoopNode, SoyNode.MsgBlockNode, SoyNode.MsgPlaceholderInitialNode, SoyNode.MsgSubstUnitNode, SoyNode.ParentSoyNode<N extends SoyNode>, SoyNode.RenderUnitNode, SoyNode.SplitLevelTopNode<N extends SoyNode>, SoyNode.StandaloneNode, SoyNode.StatementNode| Modifier and Type | Field and Description |
|---|---|
static SoyError |
SELF_ENDING_WITHOUT_VALUE |
INVALID_COMMAND_TEXT, varSPACES| Modifier and Type | Method and Description |
|---|---|
protected String |
buildTagStringHelper(boolean isSelfEnding)
Helper to build the source tag string (usually for testing/debugging).
|
protected String |
buildTagStringHelper(boolean isSelfEnding,
boolean isImplicitCommandName)
Helper to build the source tag string (usually for testing/debugging).
|
LetValueNode |
clone()
Copies this node.
|
List<ExprUnion> |
getAllExprUnions()
Returns the list of expressions in this node.
|
String |
getCommandName()
May be overridden by subclasses to keep consistent with tree modifications.
|
String |
getCommandText()
May be overridden by subclasses to keep consistent with tree modifications.
|
SoyNode.Kind |
getKind()
Returns this node's kind (corresponding to this node's specific type).
|
String |
getTagString()
Builds a Soy tag string that could be the Soy tag for this node.
|
ExprRootNode |
getValueExpr()
Returns the value expression that the variable is set to.
|
String |
getVarName()
Return The local variable name (without preceding '$').
|
String |
toSourceString()
Builds a Soy source string that could be the source for this node.
|
getParent, getUniqueVarName, getVar, parseCommandTextHelpergetId, getSourceLocation, setId, toStringcouldHaveSyntaxVersionAtLeast, getNearestAncestor, getSyntaxVersionBound, hasAncestor, maybeSetSyntaxVersionBound, setParent, toTreeStringequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitcouldHaveSyntaxVersionAtLeast, getNearestAncestor, getSourceLocation, getSyntaxVersionBound, hasAncestor, maybeSetSyntaxVersionBound, setParent, toSourceString, toTreeStringpublic static final SoyError SELF_ENDING_WITHOUT_VALUE
public SoyNode.Kind getKind()
SoyNodepublic final String getVarName()
getVarName in interface SoyNode.LocalVarNodepublic ExprRootNode getValueExpr()
public List<ExprUnion> getAllExprUnions()
SoyNode.ExprHolderNodegetAllExprUnions in interface SoyNode.ExprHolderNodepublic LetValueNode 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.
public String getCommandName()
getCommandName in interface SoyNode.CommandNodepublic String getCommandText()
getCommandText in interface SoyNode.CommandNodepublic String getTagString()
SoyNode.CommandNodegetTagString in interface SoyNode.CommandNodeprotected String buildTagStringHelper(boolean isSelfEnding)
isSelfEnding - Whether the tag is self-ending, i.e. { ... /}.protected String buildTagStringHelper(boolean isSelfEnding, boolean isImplicitCommandName)
isSelfEnding - Whether the tag is self-ending, i.e. { ... /}.isImplicitCommandName - Whether the command name is implicit, e.g. a 'print' tag without
the explicit 'print'.public String toSourceString()
NodetoSourceString in interface Node