string_scanner 0.1.0 string_scanner: ^0.1.0 copied to clipboard
A class for parsing strings using a sequence of patterns.
0.1.0 #
-
Switch from
source_maps
'Span
class tosource_span
'sSourceSpan
class. -
new StringScanner()
'ssourceUrl
parameter is now named to make it clear that it can be safelynull
. -
new StringScannerException()
takes different arguments in a different order to matchSpanFormatException
. -
StringScannerException.string
has been renamed toStringScannerException.source
to match theFormatException
interface.
0.0.3 #
- Make
StringScannerException
inherit from source_map's [SpanFormatException
][].
0.0.2 #
-
new StringScanner()
now takes an optionalsourceUrl
argument that provides the URL of the source file. This is used for error reporting. -
Add
StringScanner.readChar()
andStringScanner.peekChar()
methods for doing character-by-character scanning. -
Scanners now throw
StringScannerException
s which provide more detailed access to information about the errors that were thrown and can provide terminal-colored messages. -
Add a
LineScanner
subclass ofStringScanner
that automatically tracks line and column information of the text being scanned. -
Add a
SpanScanner
subclass ofLineScanner
that exposes matched ranges as [source map][]Span
objects.