public static final class RawTextNode.SourceOffsets extends Object
Due to how Soy collapses whitespace and uses non-literal tokens for textual content (e.g.
literal commands and formatting commands like {\n}). It isn't possible to
reconstruct the source location of any given character within a sequence of raw text based
purely on start/end locations. This class fulfils the gap by tracking offsets where the
sourcelocation changes discontinuously.
| Modifier and Type | Class and Description |
|---|---|
static class |
RawTextNode.SourceOffsets.Builder
Builder for SourceOffsets.
|
static class |
RawTextNode.SourceOffsets.Reason
Records the reason there is an offset at a particular location.
|
| Modifier and Type | Method and Description |
|---|---|
SourceLocation |
getSourceLocation(String filePath)
Returns the sourcelocation for the whole span.
|
String |
toString() |
public SourceLocation getSourceLocation(String filePath)