aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_parser/src/grammar/items.rs
diff options
context:
space:
mode:
authorBenjamin Coenen <[email protected]>2020-05-02 19:27:02 +0100
committerBenjamin Coenen <[email protected]>2020-05-02 19:27:02 +0100
commit4613497a7714c6cd87166e6525d764d75f8acefd (patch)
tree2527ae2c0ef2ef100efee3fcb8899f8e34d0d573 /crates/ra_parser/src/grammar/items.rs
parent19e28888aa41b2845b47adb7314aed99d3c48679 (diff)
parent89e1f97515c36ab97bd378d972cabec0feb6d77e (diff)
Merge branch 'master' of github.com:rust-analyzer/rust-analyzer into fix_4202
Diffstat (limited to 'crates/ra_parser/src/grammar/items.rs')
-rw-r--r--crates/ra_parser/src/grammar/items.rs13
1 files changed, 12 insertions, 1 deletions
diff --git a/crates/ra_parser/src/grammar/items.rs b/crates/ra_parser/src/grammar/items.rs
index 433ed6812..67a924de5 100644
--- a/crates/ra_parser/src/grammar/items.rs
+++ b/crates/ra_parser/src/grammar/items.rs
@@ -329,7 +329,7 @@ fn fn_def(p: &mut Parser) {
329 if p.at(T![;]) { 329 if p.at(T![;]) {
330 p.bump(T![;]); 330 p.bump(T![;]);
331 } else { 331 } else {
332 expressions::block(p) 332 expressions::block_expr(p)
333 } 333 }
334} 334}
335 335
@@ -415,6 +415,17 @@ pub(super) fn macro_call_after_excl(p: &mut Parser) -> BlockLike {
415 if p.at(IDENT) { 415 if p.at(IDENT) {
416 name(p); 416 name(p);
417 } 417 }
418 // Special-case `macro_rules! try`.
419 // This is a hack until we do proper edition support
420
421 // test try_macro_rules
422 // macro_rules! try { () => {} }
423 if p.at(T![try]) {
424 let m = p.start();
425 p.bump_remap(IDENT);
426 m.complete(p, NAME);
427 }
428
418 match p.current() { 429 match p.current() {
419 T!['{'] => { 430 T!['{'] => {
420 token_tree(p); 431 token_tree(p);