| Package | Description |
|---|---|
| com.google.template.soy.exprparse |
Parser for Soy expressions.
|
| com.google.template.soy.exprtree |
Expression parse tree.
|
| com.google.template.soy.passes | |
| com.google.template.soy.soytree |
Soy parse tree.
|
| Modifier and Type | Method and Description |
|---|---|
ExprNode |
ExpressionParser.parseExpression()
Parses the input as an expression.
|
| Modifier and Type | Method and Description |
|---|---|
List<ExprNode> |
ExpressionParser.parseExpressionList()
Parses the input as a comma-separated list of expressions.
|
| Modifier and Type | Interface and Description |
|---|---|
static interface |
ExprNode.ConstantNode
A node representing a constant.
|
static interface |
ExprNode.OperatorNode
A node representing an operator (with operands as children).
|
static interface |
ExprNode.ParentExprNode
A node in an expression parse tree that may be a parent.
|
static interface |
ExprNode.PrimitiveNode
A node representing a primitive literal.
|
| Modifier and Type | Class and Description |
|---|---|
class |
AbstractExprNode
Abstract implementation of an ExprNode.
|
class |
AbstractOperatorNode
Abstract implementation of an OperatorNode.
|
class |
AbstractParentExprNode
Abstract implementation of a ParentExprNode.
|
class |
BooleanNode
Node representing a boolean value.
|
class |
DataAccessNode
Base class which represents access to a field or element of an aggregate value,
such as an object or collection.
|
class |
ExprRootNode
Dummy node that serves as the root of an expression tree so that the tree can be arbitrarily
changed without needing to change the reference to the tree.
|
class |
FieldAccessNode
Reference to a named field.
|
class |
FloatNode
Node representing a float value.
|
class |
FunctionNode
A node representing a function (with args as children).
|
class |
GlobalNode
Node representing a global.
|
class |
IntegerNode
Node representing an integer value.
|
class |
ItemAccessNode
Represents the bracket [] operation, which can either be used to access an
array element by index, or a map value by key.
|
class |
ListLiteralNode
A node representing a list literal (with items as children).
|
class |
MapLiteralNode
A node representing a map literal (with keys and values as alternating children).
|
class |
NullNode
Node representing a null value.
|
static class |
OperatorNodes.AndOpNode
Node representing the 'and' operator.
|
static class |
OperatorNodes.ConditionalOpNode
Node representing the ternary '? :' (conditional) operator.
|
static class |
OperatorNodes.DivideByOpNode
Node representing the '/' (divde by) operator.
|
static class |
OperatorNodes.EqualOpNode
Node representing the '==' (equal) operator.
|
static class |
OperatorNodes.GreaterThanOpNode
Node representing the '>' (greater than) operator.
|
static class |
OperatorNodes.GreaterThanOrEqualOpNode
Node representing the '>=' (greater than or equal) operator.
|
static class |
OperatorNodes.LessThanOpNode
Node representing the '<' (less than) operator.
|
static class |
OperatorNodes.LessThanOrEqualOpNode
Node representing the '<=' (less than or equal) operator.
|
static class |
OperatorNodes.MinusOpNode
Node representing the binary '-' (minus) operator.
|
static class |
OperatorNodes.ModOpNode
Node representing the '%' (mod) operator.
|
static class |
OperatorNodes.NegativeOpNode
Node representing the unary '-' (negative) operator.
|
static class |
OperatorNodes.NotEqualOpNode
Node representing the '!=' (not equal) operator.
|
static class |
OperatorNodes.NotOpNode
Node representing the 'not' operator.
|
static class |
OperatorNodes.NullCoalescingOpNode
Node representing the '?:' (null-coalescing) operator.
|
static class |
OperatorNodes.OrOpNode
Node representing the 'or' operator.
|
static class |
OperatorNodes.PlusOpNode
Node representing the '+' (plus) operator.
|
static class |
OperatorNodes.TimesOpNode
Node representing the '*' (times) operator.
|
class |
StringNode
Node representing a string value.
|
class |
VarNode
Node representing a variable.
|
class |
VarRefNode
Expression representing an unqualified variable name, e.g.
|
| Modifier and Type | Method and Description |
|---|---|
ExprNode |
ExprNode.copy(CopyState copyState)
See
Node.copy(CopyState) for a description of the copy contract. |
ExprNode |
DataAccessNode.getBaseExprChild()
Returns the base expression from which we're looking up the named field.
|
ExprNode |
ExprRootNode.getChild(int index) |
ExprNode |
AbstractParentExprNode.getChild(int index) |
ExprNode |
ItemAccessNode.getKeyExprChild()
Returns the key expression.
|
ExprNode |
OperatorNodes.NullCoalescingOpNode.getLeftChild() |
ExprNode |
OperatorNodes.NullCoalescingOpNode.getRightChild() |
ExprNode |
ExprRootNode.getRoot() |
| Modifier and Type | Method and Description |
|---|---|
List<ExprNode> |
AbstractParentExprNode.getChildren() |
static List<ExprNode> |
ExprRootNode.unwrap(Iterable<ExprRootNode> exprs) |
| Modifier and Type | Method and Description |
|---|---|
void |
AbstractParentExprNode.addChild(ExprNode child) |
void |
AbstractParentExprNode.addChild(int index,
ExprNode child) |
ExprNode.OperatorNode |
Operator.createNode(ExprNode... children)
Creates a node representing this operator, with the given children.
|
protected boolean |
ExprEquivalence.doEquivalent(ExprNode a,
ExprNode b) |
protected int |
ExprEquivalence.doHash(ExprNode t) |
int |
AbstractParentExprNode.getChildIndex(ExprNode child) |
void |
AbstractParentExprNode.removeChild(ExprNode child) |
void |
AbstractParentExprNode.replaceChild(ExprNode currChild,
ExprNode newChild) |
void |
AbstractParentExprNode.replaceChild(int index,
ExprNode newChild) |
protected R |
AbstractReturningExprNodeVisitor.visit(ExprNode node) |
protected void |
AbstractExprNodeVisitor.visit(ExprNode node) |
protected R |
AbstractReturningExprNodeVisitor.visitExprNode(ExprNode node) |
protected void |
AbstractExprNodeVisitor.visitExprNode(ExprNode node) |
| Modifier and Type | Method and Description |
|---|---|
void |
AbstractParentExprNode.addChildren(int index,
List<? extends ExprNode> children) |
void |
AbstractParentExprNode.addChildren(List<? extends ExprNode> children) |
static List<ExprRootNode> |
ExprRootNode.wrap(Iterable<? extends ExprNode> exprs) |
| Constructor and Description |
|---|
DataAccessNode(ExprNode base,
SourceLocation sourceLocation,
boolean isNullSafe) |
ExprRootNode(ExprNode child)
Creates a new instance with the given node as the child.
|
FieldAccessNode(ExprNode base,
String fieldName,
boolean isNullSafe) |
ItemAccessNode(ExprNode base,
ExprNode key,
boolean isNullSafe) |
| Constructor and Description |
|---|
ListLiteralNode(List<ExprNode> items,
SourceLocation sourceLocation) |
MapLiteralNode(List<ExprNode> alternatingKeysAndValues,
SourceLocation sourceLocation) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
ResolveFunctionsVisitor.visitExprNode(ExprNode node) |
| Modifier and Type | Method and Description |
|---|---|
static String |
MsgSubstUnitBaseVarNameUtils.genNaiveBaseNameForExpr(ExprNode exprNode,
String fallbackBaseName)
Helper function to generate a base placeholder (or plural/select var) name from an expression,
using the naive algorithm.
|
static String |
MsgSubstUnitBaseVarNameUtils.genShortestBaseNameForExpr(ExprNode exprNode,
String fallbackBaseName)
The equivalent of
genNaiveBaseNameForExpr() in our new algorithm for generating base
name. |
| Modifier and Type | Method and Description |
|---|---|
static <R> void |
SoytreeUtils.execOnAllV2Exprs(SoyNode node,
AbstractNodeVisitor<ExprNode,R> exprNodeVisitor)
Given a Soy node and a visitor for expression trees, traverses the subtree of the node and
executes the visitor on all expressions held by nodes in the subtree.
|
static List<String> |
MsgSubstUnitBaseVarNameUtils.genNoncollidingBaseNamesForExprs(List<ExprNode> exprNodes,
String fallbackBaseName,
ErrorReporter errorReporter)
Generates base names for all the expressions in a list, where for each expression, we use the
shortest candidate base name that does not collide with any of the candidate base names
generated from other expressions in the list.
|
| Constructor and Description |
|---|
ExprUnion(ExprNode expr)
Constructor for an instance that represents a V2 expression.
|