diff options
Diffstat (limited to 'crates/libsyntax2/src/grammar')
-rw-r--r-- | crates/libsyntax2/src/grammar/expressions/mod.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/crates/libsyntax2/src/grammar/expressions/mod.rs b/crates/libsyntax2/src/grammar/expressions/mod.rs index e56f3d30e..feef5f1d6 100644 --- a/crates/libsyntax2/src/grammar/expressions/mod.rs +++ b/crates/libsyntax2/src/grammar/expressions/mod.rs | |||
@@ -174,10 +174,14 @@ fn lhs(p: &mut Parser, r: Restrictions) -> Option<CompletedMarker> { | |||
174 | p.bump(); | 174 | p.bump(); |
175 | PREFIX_EXPR | 175 | PREFIX_EXPR |
176 | } | 176 | } |
177 | // test full_range_expr | ||
178 | // fn foo() { xs[..]; } | ||
177 | DOTDOT => { | 179 | DOTDOT => { |
178 | m = p.start(); | 180 | m = p.start(); |
179 | p.bump(); | 181 | p.bump(); |
180 | expr_bp(p, r, 2); | 182 | if EXPR_FIRST.contains(p.current()) { |
183 | expr_bp(p, r, 2); | ||
184 | } | ||
181 | return Some(m.complete(p, RANGE_EXPR)); | 185 | return Some(m.complete(p, RANGE_EXPR)); |
182 | } | 186 | } |
183 | _ => { | 187 | _ => { |