SourceText class final

The source after normalization, with a map back to the original string.

Normalization turns \r\n and lone \r into \n, so every line ending is one code unit, and puts the text in Unicode NFC (so é typed as e + a combining accent matches the precomposed letter). Spans point into text; originalSpan maps them back.

Constructors

SourceText(String original)
Normalizes original.
factory

Properties

hashCode → int
The hash code for this object.
no setterinherited
original → String
The string as given by the caller.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
text → String
The normalized string every span points into.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
originalOffset(int offset) → int
Maps an offset in text to the matching offset in original.
originalSpan(SourceSpan span) → SourceSpan
Maps a span in text to the matching span in original.
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited