| Commit message (Collapse) | Author | Age |
|
|
|
|
|
|
| |
The eat_until method of Tokeniser has been renamed to track_until, and
it no longer consumes characters by itself. The predicate closure is no
longer limited to checking one character at a time, it can look ahead
for multi-character sequences when used with the new eat_if method.
|
|
|
|
|
| |
This method is used for consuming a multi-character sequence only if
that sequence matches a passed string.
|
|
|
|
| |
This is a clearer and more descriptive name for the method.
|
|
|
|
|
|
|
|
|
| |
The eat_to_delimiter method on Tokeniser has been renamed to eat_until,
and it now consumes characters until a predicate returns true, not just
until a particular character is reached. This means that the method
can now be passed a closure that keeps track of nesting depth, and only
returns true when a matching delimiter is found at the same level as
the opening delimiter.
|
|
|
|
|
| |
This commit adds a subtokenise method that creates a child tokeniser
over all characters between the start and end marks.
|
|
|
|
|
|
| |
This enables a parsing technique where characters can be marked as
the start of a token after they've been eaten, instead of having to
determine ahead of time via defensively peeking.
|
| |
|
|
|
|
|
|
| |
This better matches the naming convention of the other source locator
types, and better differentiates a SourcePosition from other kinds of
position.
|
|
|
|
|
|
|
|
|
|
| |
This library can now carry out all stages of assembly from collecting
source fragments to resolving symbols to pruning unused libraries to
generating a single compiled source file.
Pretty-printing of state has also been implemented in this library.
The source tree hierarchy, symbol resolution errors, and file read
errors can all be printed in a tidy format.
|
|
This is a struct that provides various methods for consuming characters
from a character stream and for tracking the provenance of each parsed
token.
|