From 8fe58c359817f57ba981f02ee62244ce1954a41b Mon Sep 17 00:00:00 2001 From: csmoe Date: Mon, 22 Jul 2019 20:43:55 +0800 Subject: fix: parse box syntax inside parentheses --- crates/ra_parser/src/grammar/expressions/atom.rs | 3 +++ 1 file changed, 3 insertions(+) (limited to 'crates/ra_parser/src/grammar/expressions') diff --git a/crates/ra_parser/src/grammar/expressions/atom.rs b/crates/ra_parser/src/grammar/expressions/atom.rs index 6bda04141..d98953a7e 100644 --- a/crates/ra_parser/src/grammar/expressions/atom.rs +++ b/crates/ra_parser/src/grammar/expressions/atom.rs @@ -43,6 +43,7 @@ pub(super) const ATOM_EXPR_FIRST: TokenSet = L_BRACK, PIPE, MOVE_KW, + BOX_KW, IF_KW, WHILE_KW, MATCH_KW, @@ -529,6 +530,8 @@ fn try_block_expr(p: &mut Parser, m: Option) -> CompletedMarker { // test box_expr // fn foo() { // let x = box 1i32; +// let y = (box 1i32, box 2i32); +// let z = Foo(box 1i32, box 2i32); // } fn box_expr(p: &mut Parser, m: Option) -> CompletedMarker { assert!(p.at(T![box])); -- cgit v1.2.3