string_scanner: ^0.1.5 copied to clipboard
A class for parsing strings using a sequence of patterns.
new SpanScanner.within(), which scans within a existing
- Remove the dependency on
path, since we don't actually import it.
new SpanScanner.eager()for creating a
SpanScannerthat eagerly computes its current line and column numbers.
LineScanner's handling of carriage returns to match that of
- Fixed the homepage URL.
- Add an optional
StringScanner.substring, which returns a substring of the source string.
SourceLocations to be
FileLocations. They always were underneath, but callers may now rely on it.
SpanScanner.location, which returns the scanner's current
sourceUrlparameter is now named to make it clear that it can be safely
new StringScannerException()takes different arguments in a different order to match
StringScannerException.stringhas been renamed to
StringScannerException.sourceto match the
StringScannerExceptioninherit from source_map's [
new StringScanner()now takes an optional
sourceUrlargument that provides the URL of the source file. This is used for error reporting.
StringScanner.peekChar()methods for doing character-by-character scanning.
Scanners now throw
StringScannerExceptions which provide more detailed access to information about the errors that were thrown and can provide terminal-colored messages.
StringScannerthat automatically tracks line and column information of the text being scanned.
LineScannerthat exposes matched ranges as [source map]