internal: move ws attachment logic to the parser crate
This has to re-introduce the `sink` pattern, because doing this purely with iterators is awkward :( Maaaybe the event vector was a false start? But, anyway, I like the current factoring more -- it sort-of obvious that we do want to keep ws-attachment business in the parser, and that we also don't want that to depend on the particular tree structure. I think `shortcuts` module achieves that.
This commit is contained in:
@@ -26,6 +26,7 @@ mod parser;
|
||||
mod grammar;
|
||||
mod input;
|
||||
mod output;
|
||||
mod shortcuts;
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests;
|
||||
@@ -36,6 +37,7 @@ pub use crate::{
|
||||
input::Input,
|
||||
lexed_str::LexedStr,
|
||||
output::{Output, Step},
|
||||
shortcuts::StrStep,
|
||||
syntax_kind::SyntaxKind,
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user