aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_parser
diff options
context:
space:
mode:
authorGeoffry Song <[email protected]>2019-10-06 00:30:10 +0100
committerGeoffry Song <[email protected]>2019-10-06 00:33:05 +0100
commitb4fe06bc17127b6007114a8ba8bf876fdef112e0 (patch)
tree6670bc0dacbc94a9b4258cd11ef9d1c4839017a2 /crates/ra_parser
parentb63f260bbcf89a2b40358f534b97f672468294fb (diff)
Move tests around
Diffstat (limited to 'crates/ra_parser')
-rw-r--r--crates/ra_parser/src/grammar/expressions.rs11
1 files changed, 5 insertions, 6 deletions
diff --git a/crates/ra_parser/src/grammar/expressions.rs b/crates/ra_parser/src/grammar/expressions.rs
index 448b87505..c2a2060eb 100644
--- a/crates/ra_parser/src/grammar/expressions.rs
+++ b/crates/ra_parser/src/grammar/expressions.rs
@@ -279,6 +279,10 @@ fn expr_bp(p: &mut Parser, r: Restrictions, bp: u8) -> (Option<CompletedMarker>,
279 if op_bp < bp { 279 if op_bp < bp {
280 break; 280 break;
281 } 281 }
282 // test as_precedence
283 // fn foo() {
284 // let _ = &1 as *const i32;
285 // }
282 if p.at(T![as]) { 286 if p.at(T![as]) {
283 lhs = cast_expr(p, lhs); 287 lhs = cast_expr(p, lhs);
284 continue; 288 continue;
@@ -301,7 +305,6 @@ fn lhs(p: &mut Parser, r: Restrictions) -> Option<(CompletedMarker, BlockLike)>
301 // fn foo() { 305 // fn foo() {
302 // let _ = &1; 306 // let _ = &1;
303 // let _ = &mut &f(); 307 // let _ = &mut &f();
304 // let _ = &1 as *const i32;
305 // } 308 // }
306 T![&] => { 309 T![&] => {
307 m = p.start(); 310 m = p.start();
@@ -311,13 +314,9 @@ fn lhs(p: &mut Parser, r: Restrictions) -> Option<(CompletedMarker, BlockLike)>
311 } 314 }
312 // test unary_expr 315 // test unary_expr
313 // fn foo() { 316 // fn foo() {
314 // **&1 + 1; 317 // **&1;
315 // !!true; 318 // !!true;
316 // --1; 319 // --1;
317 // *&1 as u64;
318 // *x(1);
319 // &x[1];
320 // -1..2;
321 // } 320 // }
322 T![*] | T![!] | T![-] => { 321 T![*] | T![!] | T![-] => {
323 m = p.start(); 322 m = p.start();