break&continue

This commit is contained in:
Aleksey Kladov 2018-08-24 11:21:13 +03:00
parent a66c94af1b
commit 719710a132
8 changed files with 156 additions and 13 deletions

View file

@ -1,12 +0,0 @@
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
}
};
}