rust/crates/libsyntax2/tests/data/parser/err/0012_broken_lambda.rs
Aleksey Kladov 7c67612b8a organizize
2018-08-10 22:33:29 +03:00

13 lines
389 B
Rust

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
}
};
}