| Package | Description |
|---|---|
| com.google.template.soy.basicdirectives |
Plugin package for basic print directives.
|
| com.google.template.soy.basicfunctions |
Plugin package for basic functions.
|
| com.google.template.soy.coredirectives |
Plugin package for core print directives.
|
| com.google.template.soy.incrementaldomsrc | |
| com.google.template.soy.jssrc.internal | |
| com.google.template.soy.jssrc.restricted |
| Modifier and Type | Method and Description |
|---|---|
JsExpr |
InsertWordBreaksDirective.applyForJsSrc(JsExpr value,
List<JsExpr> args) |
JsExpr |
BasicEscapeDirective.applyForJsSrc(JsExpr value,
List<JsExpr> args) |
| Modifier and Type | Method and Description |
|---|---|
JsExpr |
InsertWordBreaksDirective.applyForJsSrc(JsExpr value,
List<JsExpr> args) |
JsExpr |
BasicEscapeDirective.applyForJsSrc(JsExpr value,
List<JsExpr> args) |
| Modifier and Type | Method and Description |
|---|---|
JsExpr |
InsertWordBreaksDirective.applyForJsSrc(JsExpr value,
List<JsExpr> args) |
JsExpr |
BasicEscapeDirective.applyForJsSrc(JsExpr value,
List<JsExpr> args) |
| Modifier and Type | Method and Description |
|---|---|
JsExpr |
RoundFunction.computeForJsSrc(List<JsExpr> args) |
JsExpr |
RandomIntFunction.computeForJsSrc(List<JsExpr> args) |
JsExpr |
MinFunction.computeForJsSrc(List<JsExpr> args) |
JsExpr |
MaxFunction.computeForJsSrc(List<JsExpr> args) |
JsExpr |
KeysFunction.computeForJsSrc(List<JsExpr> args) |
JsExpr |
FloorFunction.computeForJsSrc(List<JsExpr> args) |
JsExpr |
CeilingFunction.computeForJsSrc(List<JsExpr> args) |
JsExpr |
AugmentMapFunction.computeForJsSrc(List<JsExpr> args) |
| Modifier and Type | Method and Description |
|---|---|
JsExpr |
RoundFunction.computeForJsSrc(List<JsExpr> args) |
JsExpr |
RandomIntFunction.computeForJsSrc(List<JsExpr> args) |
JsExpr |
MinFunction.computeForJsSrc(List<JsExpr> args) |
JsExpr |
MaxFunction.computeForJsSrc(List<JsExpr> args) |
JsExpr |
KeysFunction.computeForJsSrc(List<JsExpr> args) |
JsExpr |
FloorFunction.computeForJsSrc(List<JsExpr> args) |
JsExpr |
CeilingFunction.computeForJsSrc(List<JsExpr> args) |
JsExpr |
AugmentMapFunction.computeForJsSrc(List<JsExpr> args) |
| Modifier and Type | Method and Description |
|---|---|
JsExpr |
NoAutoescapeDirective.applyForJsSrc(JsExpr value,
List<JsExpr> args) |
JsExpr |
IdDirective.applyForJsSrc(JsExpr value,
List<JsExpr> args) |
JsExpr |
EscapeHtmlDirective.applyForJsSrc(JsExpr value,
List<JsExpr> args) |
| Modifier and Type | Method and Description |
|---|---|
JsExpr |
NoAutoescapeDirective.applyForJsSrc(JsExpr value,
List<JsExpr> args) |
JsExpr |
IdDirective.applyForJsSrc(JsExpr value,
List<JsExpr> args) |
JsExpr |
EscapeHtmlDirective.applyForJsSrc(JsExpr value,
List<JsExpr> args) |
| Modifier and Type | Method and Description |
|---|---|
JsExpr |
NoAutoescapeDirective.applyForJsSrc(JsExpr value,
List<JsExpr> args) |
JsExpr |
IdDirective.applyForJsSrc(JsExpr value,
List<JsExpr> args) |
JsExpr |
EscapeHtmlDirective.applyForJsSrc(JsExpr value,
List<JsExpr> args) |
| Modifier and Type | Method and Description |
|---|---|
protected CodeBuilder<JsExpr> |
GenIncrementalDomCodeVisitor.createCodeBuilder() |
List<JsExpr> |
GenIncrementalDomExprsVisitor.exec(SoyNode node) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
IncrementalDomCodeBuilder.addToOutput(List<? extends JsExpr> jsExprs)
Emits a series of
JsExprs at the current location in the generated code. |
void |
IncrementalDomCodeBuilder.addToOutputVar(List<? extends JsExpr> jsExprs)
In Incremental DOM, the tags, attributes and print statements correspond to function calls
or arguments.
|
| Constructor and Description |
|---|
GenIncrementalDomExprsVisitor(Map<String,SoyJsSrcPrintDirective> soyJsSrcDirectivesMap,
JsExprTranslator jsExprTranslator,
com.google.template.soy.incrementaldomsrc.IncrementalDomGenCallCodeUtils genCallCodeUtils,
com.google.template.soy.incrementaldomsrc.IsComputableAsIncrementalDomExprsVisitor isComputableAsJsExprsVisitor,
GenIncrementalDomExprsVisitor.GenIncrementalDomExprsVisitorFactory genIncrementalDomExprsVisitorFactory,
ErrorReporter errorReporter,
Deque<Map<String,JsExpr>> localVarTranslations,
TemplateAliases templateAliases) |
| Modifier and Type | Field and Description |
|---|---|
protected CodeBuilder<JsExpr> |
GenJsCodeVisitorAssistantForMsgs.jsCodeBuilder
The JsCodeBuilder to build the current JS file being generated (during a run).
|
protected List<JsExpr> |
GenJsExprsVisitor.jsExprs
List to collect the results.
|
protected Deque<Map<String,JsExpr>> |
GenJsCodeVisitor.localVarTranslations
The current stack of replacement JS expressions for the local variables (and foreach-loop
special functions) current in scope.
|
| Modifier and Type | Method and Description |
|---|---|
JsExpr |
GenCallCodeUtils.genCallExpr(CallNode callNode,
Deque<Map<String,JsExpr>> localVarTranslations,
TemplateAliases templateAliases,
ErrorReporter errorReporter)
Generates the JS expression for a given call.
|
protected JsExpr |
GenJsCodeVisitorAssistantForMsgs.genGoogMsgPlaceholderExpr(MsgPlaceholderNode msgPhNode)
Generates the JS expr for a given placeholder.
|
JsExpr |
GenCallCodeUtils.genObjToPass(CallNode callNode,
Deque<Map<String,JsExpr>> localVarTranslations,
TemplateAliases templateAliases,
ErrorReporter errorReporter)
Generates the JS expression for the object to pass in a given call.
|
protected JsExpr |
GenCallCodeUtils.maybeWrapContent(CallParamContentNode node,
JsExpr valueJsExpr)
If the param node had a content kind specified, it was autoescaped in the
corresponding context.
|
protected JsExpr |
TranslateToJsExprVisitor.visitAndOpNode(OperatorNodes.AndOpNode node) |
protected JsExpr |
TranslateToJsExprVisitor.visitDataAccessNode(DataAccessNode node) |
protected JsExpr |
TranslateToJsExprVisitor.visitExprRootNode(ExprRootNode node) |
protected JsExpr |
TranslateToJsExprVisitor.visitFunctionNode(FunctionNode node) |
protected JsExpr |
TranslateToJsExprVisitor.visitGlobalNode(GlobalNode node) |
protected JsExpr |
TranslateToJsExprVisitor.visitListLiteralNode(ListLiteralNode node) |
protected JsExpr |
TranslateToJsExprVisitor.visitMapLiteralNode(MapLiteralNode node) |
protected JsExpr |
TranslateToJsExprVisitor.visitNotOpNode(OperatorNodes.NotOpNode node) |
protected JsExpr |
TranslateToJsExprVisitor.visitNullCoalescingOpNode(OperatorNodes.NullCoalescingOpNode node) |
protected JsExpr |
TranslateToJsExprVisitor.visitOperatorNode(ExprNode.OperatorNode node) |
protected JsExpr |
TranslateToJsExprVisitor.visitOrOpNode(OperatorNodes.OrOpNode node) |
protected JsExpr |
TranslateToJsExprVisitor.visitPrimitiveNode(ExprNode.PrimitiveNode node) |
protected JsExpr |
TranslateToJsExprVisitor.visitStringNode(StringNode node) |
protected JsExpr |
TranslateToJsExprVisitor.visitVarRefNode(VarRefNode node) |
| Modifier and Type | Method and Description |
|---|---|
protected CodeBuilder<JsExpr> |
GenJsCodeVisitor.createCodeBuilder() |
List<JsExpr> |
GenJsExprsVisitor.exec(SoyNode node) |
List<JsExpr> |
GenJsExprsVisitor.execOnChildren(SoyNode.ParentSoyNode<?> node)
Executes this visitor on the children of the given node, without visiting the given node
itself.
|
protected CodeBuilder<JsExpr> |
GenJsCodeVisitor.getJsCodeBuilder() |
| Modifier and Type | Method and Description |
|---|---|
static String |
TranslateToJsExprVisitor.genMaybeProtect(JsExpr expr,
int minSafePrecedence) |
protected JsExpr |
GenCallCodeUtils.maybeWrapContent(CallParamContentNode node,
JsExpr valueJsExpr)
If the param node had a content kind specified, it was autoescaped in the
corresponding context.
|
| Modifier and Type | Method and Description |
|---|---|
TranslateToJsExprVisitor |
TranslateToJsExprVisitor.TranslateToJsExprVisitorFactory.create(Deque<Map<String,JsExpr>> localVarTranslations,
ErrorReporter errorReporter) |
GenJsExprsVisitor |
GenJsExprsVisitor.GenJsExprsVisitorFactory.create(Deque<Map<String,JsExpr>> localVarTranslations,
TemplateAliases templateAliases,
ErrorReporter errorReporter) |
JsExpr |
GenCallCodeUtils.genCallExpr(CallNode callNode,
Deque<Map<String,JsExpr>> localVarTranslations,
TemplateAliases templateAliases,
ErrorReporter errorReporter)
Generates the JS expression for a given call.
|
JsExpr |
GenCallCodeUtils.genObjToPass(CallNode callNode,
Deque<Map<String,JsExpr>> localVarTranslations,
TemplateAliases templateAliases,
ErrorReporter errorReporter)
Generates the JS expression for the object to pass in a given call.
|
static String |
JsSrcUtils.getVariableName(String identity,
Deque<Map<String,JsExpr>> localVarTranslations)
Traverses up the stack of local variable name mappings to get the generated local variable
name for the given variable.
|
| Constructor and Description |
|---|
GenJsCodeVisitorAssistantForMsgs(GenJsCodeVisitor master,
SoyJsSrcOptions jsSrcOptions,
JsExprTranslator jsExprTranslator,
GenCallCodeUtils genCallCodeUtils,
IsComputableAsJsExprsVisitor isComputableAsJsExprsVisitor,
CodeBuilder<JsExpr> jsCodeBuilder,
Deque<Map<String,JsExpr>> localVarTranslations,
TemplateAliases functionAliases,
GenJsExprsVisitor genJsExprsVisitor,
ErrorReporter errorReporter) |
GenJsCodeVisitorAssistantForMsgs(GenJsCodeVisitor master,
SoyJsSrcOptions jsSrcOptions,
JsExprTranslator jsExprTranslator,
GenCallCodeUtils genCallCodeUtils,
IsComputableAsJsExprsVisitor isComputableAsJsExprsVisitor,
CodeBuilder<JsExpr> jsCodeBuilder,
Deque<Map<String,JsExpr>> localVarTranslations,
TemplateAliases functionAliases,
GenJsExprsVisitor genJsExprsVisitor,
ErrorReporter errorReporter) |
GenJsExprsVisitor(Map<String,SoyJsSrcPrintDirective> soyJsSrcDirectivesMap,
JsExprTranslator jsExprTranslator,
GenCallCodeUtils genCallCodeUtils,
IsComputableAsJsExprsVisitor isComputableAsJsExprsVisitor,
GenJsExprsVisitor.GenJsExprsVisitorFactory genJsExprsVisitorFactory,
ErrorReporter errorReporter,
Deque<Map<String,JsExpr>> localVarTranslations,
TemplateAliases templateAliases) |
| Modifier and Type | Method and Description |
|---|---|
JsExpr |
SoyJsSrcPrintDirective.applyForJsSrc(JsExpr value,
List<JsExpr> args)
Applies this directive on the given string value.
|
JsExpr |
SoyJsSrcFunction.computeForJsSrc(List<JsExpr> args)
Computes this function on the given arguments for the JS Source backend.
|
static JsExpr |
JsExprUtils.concatJsExprs(List<? extends JsExpr> jsExprs)
Builds one JS expression that computes the concatenation of the given JS expressions.
|
static JsExpr |
JsExprUtils.concatJsExprsForceString(List<? extends JsExpr> jsExprs)
Builds a JS expression which is the string concatenation of individual expressions.
|
static JsExpr |
SoyJsCodeUtils.genJsExprUsingSoySyntax(Operator op,
List<JsExpr> operandJsExprs)
Generates a JS expression for the given operator and operands assuming that the JS expression
for the operator uses the same syntax format as the Soy operator.
|
static JsExpr |
SoyJsCodeUtils.genJsExprUsingSoySyntaxWithNewToken(Operator op,
List<JsExpr> operandJsExprs,
String newToken)
Generates a JS expression for the given operator and operands assuming that the JS expression
for the operator uses the same syntax format as the Soy operator, with the exception that the
JS operator uses a different token (e.g.
|
static JsExpr |
JsExprUtils.maybeWrapAsSanitizedContent(SanitizedContent.ContentKind contentKind,
JsExpr jsExpr)
Wraps with the proper SanitizedContent constructor if contentKind is non-null.
|
static JsExpr |
JsExprUtils.maybeWrapAsSanitizedContentForInternalBlocks(SanitizedContent.ContentKind contentKind,
JsExpr jsExpr)
Wraps with the proper SanitizedContent constructor if contentKind is non-null, in a way
specific for let/param blocks.
|
static JsExpr |
JsExprUtils.toString(JsExpr expr) |
| Modifier and Type | Method and Description |
|---|---|
JsExpr |
SoyJsSrcPrintDirective.applyForJsSrc(JsExpr value,
List<JsExpr> args)
Applies this directive on the given string value.
|
static JsExpr |
JsExprUtils.maybeWrapAsSanitizedContent(SanitizedContent.ContentKind contentKind,
JsExpr jsExpr)
Wraps with the proper SanitizedContent constructor if contentKind is non-null.
|
static JsExpr |
JsExprUtils.maybeWrapAsSanitizedContentForInternalBlocks(SanitizedContent.ContentKind contentKind,
JsExpr jsExpr)
Wraps with the proper SanitizedContent constructor if contentKind is non-null, in a way
specific for let/param blocks.
|
static JsExpr |
JsExprUtils.toString(JsExpr expr) |
| Modifier and Type | Method and Description |
|---|---|
JsExpr |
SoyJsSrcPrintDirective.applyForJsSrc(JsExpr value,
List<JsExpr> args)
Applies this directive on the given string value.
|
JsExpr |
SoyJsSrcFunction.computeForJsSrc(List<JsExpr> args)
Computes this function on the given arguments for the JS Source backend.
|
static JsExpr |
JsExprUtils.concatJsExprs(List<? extends JsExpr> jsExprs)
Builds one JS expression that computes the concatenation of the given JS expressions.
|
static JsExpr |
JsExprUtils.concatJsExprsForceString(List<? extends JsExpr> jsExprs)
Builds a JS expression which is the string concatenation of individual expressions.
|
static JsExpr |
SoyJsCodeUtils.genJsExprUsingSoySyntax(Operator op,
List<JsExpr> operandJsExprs)
Generates a JS expression for the given operator and operands assuming that the JS expression
for the operator uses the same syntax format as the Soy operator.
|
static JsExpr |
SoyJsCodeUtils.genJsExprUsingSoySyntaxWithNewToken(Operator op,
List<JsExpr> operandJsExprs,
String newToken)
Generates a JS expression for the given operator and operands assuming that the JS expression
for the operator uses the same syntax format as the Soy operator, with the exception that the
JS operator uses a different token (e.g.
|