Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Keep a master offset in Match instead of slicing.
Instead of successively slicing strings in matches, we keep the parsed text under @source, and an offset in the later in @offset. Btw, that @offset might be very useful for keeping trace of the localisation of the match in the source text (e.g. for subsequent semantic passes; semantic error detection for instance).
- Loading branch information
Showing
2 changed files
with
41 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters