Implement a "token filter" layer or equivalent functionality for e.g. discarding whitespace
pczarn opened this issue · 0 comments
pczarn commented
Example
grammar! {
// ...
sub filter! {
// ...
discard: whitespace;
sub grammar! {
whitespace ::= r"\s+";
// ...
}
}
}
Perhaps sub-grammars could automatically wrap themselves in token filters. This would reduce annoying nesting.