blob: ad0d8eb4c4004f102c0bd57f1c24ee2b278f1f5b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
pub(super) fn process<'a, S: Sink<'a>>(builder: &mut S, tokens: &[Token], events: Vec<Event>) {
let mut next_tok_idx = 0;
let eat_ws = |idx: &mut usize, &mut | {
while let Some(token) = tokens.get(*idx) {
if !token.kind.is_trivia() {
break;
}
builder.leaf(token.kind, token.len);
*idx += 1
}
};
}
|