Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Provides an interface for _lexing_ PartiQL. Traditionally we would factor this as the low-level interface for the parser, but with the PEG based implementation, we just surface the relevant parts of the parser as a rule to parse with. This commit helps explore how to effectively integrate with the somewhat low-level APIs for parsing that Pest provides. * Adds `scanner` module. * Adds `Scanner` trait to the prelude. * Makes `PartiQLParser` public to crate. * Refactors `LineAndColumn` as a tuple for `Position::At`. - Adds this to the `prelude`. * Changes entry point for PEG to `Query` and added `Scanner` as the entry point rules for implementing the `Scanner` API. * Adds `PairsExt`/`PairExt` trait/impl to add utility methods for working with Pest `Pairs`/`Pair`. * Adds `LineAndColumn::move_relative` and cleans up some doc/doc tests.
- Loading branch information
Showing
6 changed files
with
457 additions
and
19 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
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
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
Oops, something went wrong.