public abstract class LetNode extends AbstractSoyNode implements SoyNode.StandaloneNode, SoyNode.StatementNode, SoyNode.LocalVarInlineNode
Important: Do not use outside of Soy code (treat as superpackage-private).
| Modifier and Type | Class and Description |
|---|---|
protected static class |
LetNode.CommandTextParseResult
Return value for
parseCommandTextHelper(). |
SoyNode.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 SoyErrorKind |
INVALID_COMMAND_TEXT |
protected LocalVar |
var
The local variable defined by this node.
|
SPACES| Modifier | Constructor and Description |
|---|---|
protected |
LetNode(int id,
SourceLocation sourceLocation,
String localVarName,
String commandText) |
protected |
LetNode(LetNode orig,
CopyState copyState)
Copy constructor.
|
| 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).
|
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.BlockNode |
getParent()
Gets this node's parent.
|
String |
getTagString()
Builds a Soy tag string that could be the Soy tag for this node.
|
String |
getUniqueVarName()
Gets a unique version of the local var name (e.g.
|
LocalVar |
getVar()
Get the local variable defined by this node.
|
protected static LetNode.CommandTextParseResult |
parseCommandTextHelper(String commandText,
SoyParsingContext context,
SourceLocation sourceLocation)
Helper used by subclass constructors to parse the command text.
|
String |
toSourceString()
Builds a Soy source string that could be the source for this node.
|
getId, getSourceLocation, setId, toStringcouldHaveSyntaxVersionAtLeast, equals, getNearestAncestor, getSyntaxVersionUpperBound, hasAncestor, hashCode, maybeSetSyntaxVersionUpperBound, setParentclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetVarNamecopy, getId, getKind, setIdcouldHaveSyntaxVersionAtLeast, getNearestAncestor, getSourceLocation, getSyntaxVersionUpperBound, hasAncestor, maybeSetSyntaxVersionUpperBound, setParent, toSourceStringpublic static final SoyErrorKind INVALID_COMMAND_TEXT
protected final LocalVar var
protected LetNode(int id,
SourceLocation sourceLocation,
String localVarName,
String commandText)
id - The id for this node.commandText - The command text.protected static LetNode.CommandTextParseResult parseCommandTextHelper(String commandText, SoyParsingContext context, SourceLocation sourceLocation)
commandText - The command text.public String getUniqueVarName()
public SoyNode.BlockNode getParent()
NodegetParent in interface NodegetParent in interface SoyNodegetParent in interface SoyNode.StandaloneNodegetParent in class AbstractSoyNodepublic final LocalVar getVar()
getVar in interface SoyNode.LocalVarNodepublic 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