| 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.basetree |
Classes shared by Soy parse trees and expression parse trees.
|
| com.google.template.soy.error | |
| com.google.template.soy.exprparse |
Parser for Soy expressions.
|
| com.google.template.soy.exprtree |
Expression parse tree.
|
| com.google.template.soy.html | |
| com.google.template.soy.msgs.restricted | |
| com.google.template.soy.soytree |
Soy parse tree.
|
| com.google.template.soy.types.parse |
Parser for Soy type expressions.
|
| Modifier and Type | Method and Description |
|---|---|
void |
ErrorReporterImpl.report(SourceLocation sourceLocation,
SoyErrorKind error,
Object... args) |
| Modifier and Type | Field and Description |
|---|---|
static SourceLocation |
SourceLocation.UNKNOWN
Deprecated.
There is no reason to use this other than laziness. Soy has complete source
location information.
|
| Modifier and Type | Method and Description |
|---|---|
SourceLocation |
SourceLocation.extend(SourceLocation other)
Returns a new SourceLocation that starts where this SourceLocation starts
and ends where
other ends. |
| Modifier and Type | Method and Description |
|---|---|
SourceLocation |
SourceLocation.extend(SourceLocation other)
Returns a new SourceLocation that starts where this SourceLocation starts
and ends where
other ends. |
| Modifier and Type | Field and Description |
|---|---|
protected SourceLocation |
LegacyInternalSyntaxException.srcLoc
The location in the soy file at which the error occurred.
|
| Modifier and Type | Method and Description |
|---|---|
SourceLocation |
LegacyInternalSyntaxException.getSourceLocation()
The source location at which the error occurred or
UNKNOWN. |
| Modifier and Type | Method and Description |
|---|---|
LegacyInternalSyntaxException |
LegacyInternalSyntaxException.associateMetaInfo(SourceLocation srcLoc,
String filePath,
String templateName) |
static LegacyInternalSyntaxException |
LegacyInternalSyntaxException.createWithMetaInfo(String message,
SourceLocation srcLoc)
Important: Do not use outside of Soy code (treat as superpackage-private).
|
static LegacyInternalSyntaxException |
LegacyInternalSyntaxException.createWithMetaInfo(String message,
SourceLocation srcLoc,
String filePath,
String templateName)
Important: Do not use outside of Soy code (treat as superpackage-private).
|
| Modifier and Type | Method and Description |
|---|---|
SourceLocation |
Node.getSourceLocation()
Returns the source location (file path and line number) for this node.
|
| Modifier and Type | Method and Description |
|---|---|
abstract SourceLocation |
SoyError.location()
The location where the error occured.
|
| Modifier and Type | Method and Description |
|---|---|
SoyError |
SoyError.Factory.create(SourceLocation location,
SoyErrorKind kind,
Object... args) |
SoyError |
PrettyErrorFactory.create(SourceLocation location,
SoyErrorKind kind,
Object... args) |
com.google.common.base.Optional<String> |
SnippetFormatter.getSnippet(SourceLocation sourceLocation)
Returns a snippet of source code surrounding the given
SourceLocation,
or Optional.absent() if source code is unavailable. |
void |
FormattingErrorReporter.report(SourceLocation sourceLocation,
SoyErrorKind error,
Object... args) |
void |
ExplodingErrorReporter.report(SourceLocation sourceLocation,
SoyErrorKind error,
Object... args) |
void |
ErrorReporter.report(SourceLocation sourceLocation,
SoyErrorKind error,
Object... args)
Reports the given
error, formatted according to args and associated with
the given sourceLocation. |
| Modifier and Type | Method and Description |
|---|---|
void |
SoyParsingContext.report(SourceLocation sourceLocation,
SoyErrorKind error,
Object... args)
Reports the given
error, formatted according to args and associated with
the given sourceLocation. |
| Constructor and Description |
|---|
ExpressionParser(String input,
SourceLocation parentSourceLocation,
SoyParsingContext context)
Constructor that takes a string input.
|
| Modifier and Type | Method and Description |
|---|---|
SourceLocation |
AbstractExprNode.getSourceLocation()
TODO(user): The quality of source locations in expression nodes is not great.
|
| Modifier and Type | Method and Description |
|---|---|
abstract ExprNode.OperatorNode |
Operator.createNode(SourceLocation location)
Creates a node representing this operator.
|
| Constructor and Description |
|---|
HtmlAttributeNode(int id,
String name,
SourceLocation sourceLocation) |
HtmlCloseTagNode(int id,
String tagName,
SourceLocation sourceLocation) |
HtmlOpenTagEndNode(int id,
String tagName,
InferredElementNamespace namespace,
SourceLocation sourceLocation) |
HtmlOpenTagNode(int id,
String tagName,
SourceLocation sourceLocation) |
HtmlOpenTagStartNode(int id,
String tagName,
SourceLocation sourceLocation) |
HtmlVoidTagNode(int id,
String tagName,
SourceLocation sourceLocation) |
| Modifier and Type | Method and Description |
|---|---|
com.google.common.collect.ImmutableSet<SourceLocation> |
SoyMsg.getSourceLocations()
Returns the location(s) of the source file(s) that this message comes from.
|
| Modifier and Type | Method and Description |
|---|---|
void |
SoyMsg.addSourceLocation(SourceLocation sourceLocation) |
| Constructor and Description |
|---|
SoyMsg(long id,
long altId,
String localeString,
String meaning,
String desc,
boolean isHidden,
String contentType,
SourceLocation sourceLocation,
boolean isPlrselMsg,
Iterable<? extends SoyMsgPart> parts) |
SoyMsg(long id,
String localeString,
String meaning,
String desc,
boolean isHidden,
String contentType,
SourceLocation sourceLocation,
Iterable<? extends SoyMsgPart> parts) |
| Modifier and Type | Method and Description |
|---|---|
SourceLocation |
NameAttributePair.getLocation() |
SourceLocation |
AliasDeclaration.getLocation() |
SourceLocation |
AbstractSoyNode.getSourceLocation()
The location in the file from which this node was parsed or derived.
|
SourceLocation |
TemplateNodeBuilder.DeclInfo.location() |
| Modifier and Type | Method and Description |
|---|---|
StackTraceElement |
TemplateNode.createStackTraceElement(SourceLocation srcLocation)
Construct a StackTraceElement that will point to the given source location of the current
template.
|
static IfCondNode.Builder |
IfCondNode.elseifBuilder(int id,
String commandText,
SourceLocation sourceLocation) |
static MsgNode.Builder |
MsgNode.fallbackmsg(int id,
String commandText,
SourceLocation sourceLocation)
Returns a new
MsgNode.Builder representing a fallbackmsg MsgNode. |
static LetContentNode |
LetContentNode.forVariable(int id,
SourceLocation sourceLocation,
String varName,
SanitizedContent.ContentKind contentKind)
Creates a LetContentNode for a compiler-generated variable.
|
static IfCondNode.Builder |
IfCondNode.ifBuilder(int id,
String commandText,
SourceLocation sourceLocation) |
static MsgNode.Builder |
MsgNode.msg(int id,
String commandText,
SourceLocation sourceLocation)
Returns a new
MsgNode.Builder representing a msg MsgNode. |
protected static LetNode.CommandTextParseResult |
LetNode.parseCommandTextHelper(String commandText,
SoyParsingContext context,
SourceLocation sourceLocation)
Helper used by subclass constructors to parse the command text.
|
protected static CallNode.DataAttribute |
CallNode.parseDataAttributeHelper(String dataAttr,
SourceLocation sourceLocation,
SoyParsingContext context)
Private helper function for subclass constructors to parse the 'data' attribute.
|
| Constructor and Description |
|---|
TypeParser(String input,
SourceLocation sourceLocation,
SoyTypeRegistry typeRegistry)
Constructor that takes a string input.
|