| Package | Description |
|---|---|
| com.google.template.soy |
Root package with main API entry point and
Guice module.
|
| com.google.template.soy.base |
Base classes.
|
| com.google.template.soy.base.internal | |
| com.google.template.soy.conformance | |
| com.google.template.soy.jssrc.internal | |
| com.google.template.soy.parsepasses.contextautoesc |
A pass that modifies a SoyFile to add escape directives where necessary based on a contextual
examination of template
print commands. |
| com.google.template.soy.pysrc.internal | |
| com.google.template.soy.shared.internal | |
| com.google.template.soy.soyparse |
Parser for Soy files and templates.
|
| com.google.template.soy.soytree |
Soy parse tree.
|
| Modifier and Type | Method and Description |
|---|---|
SoyTofu |
SoyFileSet.compileToJavaObj()
Deprecated.
|
List<String> |
SoyFileSet.compileToJsSrc(SoyJsSrcOptions jsSrcOptions,
SoyMsgBundle msgBundle)
Compiles this Soy file set into JS source code files and returns these JS files as a list of
strings, one per file.
|
SoyTofu |
SoyFileSet.compileToTofu()
Compiles this Soy file set into a Java object (type
SoyTofu) capable of rendering the
compiled templates. |
SoyTofu |
SoyFileSet.compileToTofu(SoyTofuOptions tofuOptions)
Compiles this Soy file set into a Java object (type
SoyTofu) capable of rendering the
compiled templates. |
SoyMsgBundle |
SoyFileSet.extractMsgs()
Extracts all messages from this Soy file set into a SoyMsgBundle (which can then be turned
into an extracted messages file with the help of a SoyMsgBundleHandler).
|
static void |
SoyMsgPruner.main(String[] args)
Prunes messages from XTB files, given a set of Soy files as reference for which messages to
keep.
|
static void |
SoyToJsSrcCompiler.main(String[] args)
Compiles a set of Soy files into corresponding JS source files.
|
static void |
SoyToPySrcCompiler.main(String[] args)
Compiles a set of Soy files into corresponding Python source files.
|
static com.google.common.collect.ImmutableMap<String,PrimitiveData> |
SoyUtils.parseCompileTimeGlobals(com.google.common.io.CharSource inputSource)
Parses a globals file in the format created by
SoyUtils.generateCompileTimeGlobalsFile(java.util.Map<java.lang.String, ?>, java.lang.Appendable) into a
map from global name to primitive value. |
SoyMsgBundle |
SoyFileSet.pruneTranslatedMsgs(SoyMsgBundle origTransMsgBundle)
Prunes messages from a given message bundle, keeping only messages used in this Soy file set.
|
| Modifier and Type | Method and Description |
|---|---|
SoySyntaxException |
SoySyntaxException.associateMetaInfo(SourceLocation srcLoc,
String filePath,
String templateName)
Important: Do not use outside of Soy code (treat as superpackage-private).
|
static SoySyntaxException |
SoySyntaxException.createCausedWithoutMetaInfo(String message,
Throwable cause)
Deprecated.
Prefer
#createCausedWithMetaInfo. There's no good reason for not knowing
where an error came from. |
static SoySyntaxException |
SoySyntaxException.createWithMetaInfo(String message,
SourceLocation srcLoc)
Important: Do not use outside of Soy code (treat as superpackage-private).
|
static SoySyntaxException |
SoySyntaxException.createWithMetaInfo(String message,
SourceLocation srcLoc,
String filePath,
String templateName)
Important: Do not use outside of Soy code (treat as superpackage-private).
|
static SoySyntaxException |
SoySyntaxException.createWithoutMetaInfo(String message)
Deprecated.
Prefer
createWithMetaInfo(java.lang.String, com.google.template.soy.base.SourceLocation). There's no good reason for not knowing
where an error comes from. |
| Modifier and Type | Method and Description |
|---|---|
void |
ErrorPrettyPrinter.print(SoySyntaxException e,
PrintStream err)
Displays
e on the given PrintStream in a useful way, with a snippet
of Soy source code containing the error and a caret pointing at the exact place where the error
was found. |
| Modifier and Type | Method and Description |
|---|---|
com.google.common.collect.ImmutableList<SoySyntaxException> |
CheckConformance.getViolations(SoyFileSetNode root)
Runs the conformance checks from the given AST root.
|
| Modifier and Type | Method and Description |
|---|---|
void |
JsSrcMain.genJsFiles(SoyFileSetNode soyTree,
SoyJsSrcOptions jsSrcOptions,
String locale,
SoyMsgBundle msgBundle,
String outputPathFormat,
String inputPathsPrefix)
Generates JS source files given a Soy parse tree, an options object, an optional bundle of
translated messages, and information on where to put the output files.
|
List<String> |
JsSrcMain.genJsSrc(SoyFileSetNode soyTree,
SoyJsSrcOptions jsSrcOptions,
SoyMsgBundle msgBundle)
Generates JS source code given a Soy parse tree, an options object, and an optional bundle of
translated messages.
|
| Modifier and Type | Class and Description |
|---|---|
class |
SoyAutoescapeException
Indicates failure to propagate contexts through a template or an existing escaping directive on a
'print' tag that is inconsistent with the contexts in which it appears.
|
| Modifier and Type | Method and Description |
|---|---|
void |
PySrcMain.genPyFiles(SoyFileSetNode soyTree,
SoyPySrcOptions pySrcOptions,
String outputPathFormat,
String inputPathsPrefix)
Generates Python source files given a Soy parse tree, an options object, and information on
where to put the output files.
|
List<String> |
PySrcMain.genPySrc(SoyFileSetNode soyTree,
SoyPySrcOptions pySrcOptions)
Generates Python source code given a Soy parse tree and an options object.
|
| Modifier and Type | Method and Description |
|---|---|
void |
CodeBuilder.decreaseIndent()
Decreases the current indent.
|
void |
CodeBuilder.decreaseIndentTwice()
Decreases the current indent twice.
|
void |
CodeBuilder.increaseIndent()
Increases the current indent.
|
void |
CodeBuilder.increaseIndentTwice()
Increases the current indent twice.
|
| Modifier and Type | Field and Description |
|---|---|
protected List<SoySyntaxException> |
ErrorReporterImpl.errors |
| Modifier and Type | Method and Description |
|---|---|
com.google.common.collect.ImmutableCollection<? extends SoySyntaxException> |
ErrorReporterImpl.getErrors()
Returns the full list of errors reported to this error reporter.
|
| Modifier and Type | Method and Description |
|---|---|
static SoySyntaxException |
SoySyntaxExceptionUtils.associateNode(SoySyntaxException sse,
SoyNode node)
Adds meta info to an existing SoySyntaxException.
|
static SoySyntaxException |
SoySyntaxExceptionUtils.createCausedWithNode(String message,
Throwable cause,
SoyNode node)
Creates a SoySyntaxException, with meta info filled in based on the given Soy node.
|
static SoySyntaxException |
SoySyntaxExceptionUtils.createWithNode(String message,
SoyNode node)
Creates a SoySyntaxException, with meta info filled in based on the given Soy node.
|
| Modifier and Type | Method and Description |
|---|---|
static SoySyntaxException |
SoySyntaxExceptionUtils.associateNode(SoySyntaxException sse,
SoyNode node)
Adds meta info to an existing SoySyntaxException.
|
| Modifier and Type | Method and Description |
|---|---|
static List<String> |
MsgSubstUnitBaseVarNameUtils.genNoncollidingBaseNamesForExprs(List<ExprNode> exprNodes,
String fallbackBaseName)
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 |
|---|
CaseOrDefaultNode(int id,
SourceLocation sourceLocation,
String commandName,
String commandText) |
SoyFileNode(int id,
String filePath,
SoyFileKind soyFileKind,
String delpackageCmdText,
String namespaceCmdText,
List<String> aliasCmdTexts) |