aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_parser/src/grammar/expressions
diff options
context:
space:
mode:
authorcsmoe <[email protected]>2019-07-22 13:43:55 +0100
committercsmoe <[email protected]>2019-07-22 13:52:10 +0100
commit8fe58c359817f57ba981f02ee62244ce1954a41b (patch)
tree0d95a3eccbcb8db3f80aad651b177a93cf0c9952 /crates/ra_parser/src/grammar/expressions
parentd690249bc81bc265cb3d1836c2922325f4fdb8af (diff)
fix: parse box syntax inside parentheses
Diffstat (limited to 'crates/ra_parser/src/grammar/expressions')
-rw-r--r--crates/ra_parser/src/grammar/expressions/atom.rs3
1 files changed, 3 insertions, 0 deletions
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 =
43 L_BRACK, 43 L_BRACK,
44 PIPE, 44 PIPE,
45 MOVE_KW, 45 MOVE_KW,
46 BOX_KW,
46 IF_KW, 47 IF_KW,
47 WHILE_KW, 48 WHILE_KW,
48 MATCH_KW, 49 MATCH_KW,
@@ -529,6 +530,8 @@ fn try_block_expr(p: &mut Parser, m: Option<Marker>) -> CompletedMarker {
529// test box_expr 530// test box_expr
530// fn foo() { 531// fn foo() {
531// let x = box 1i32; 532// let x = box 1i32;
533// let y = (box 1i32, box 2i32);
534// let z = Foo(box 1i32, box 2i32);
532// } 535// }
533fn box_expr(p: &mut Parser, m: Option<Marker>) -> CompletedMarker { 536fn box_expr(p: &mut Parser, m: Option<Marker>) -> CompletedMarker {
534 assert!(p.at(T![box])); 537 assert!(p.at(T![box]));