full range expr

This commit is contained in:
Aleksey Kladov 2018-08-14 11:46:46 +03:00
parent 2b828c68e8
commit de02d2891e
3 changed files with 34 additions and 1 deletions

View file

@ -174,10 +174,14 @@ fn lhs(p: &mut Parser, r: Restrictions) -> Option<CompletedMarker> {
p.bump();
PREFIX_EXPR
}
// test full_range_expr
// fn foo() { xs[..]; }
DOTDOT => {
m = p.start();
p.bump();
expr_bp(p, r, 2);
if EXPR_FIRST.contains(p.current()) {
expr_bp(p, r, 2);
}
return Some(m.complete(p, RANGE_EXPR));
}
_ => {