aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_parser/src/grammar
diff options
context:
space:
mode:
authorEdwin Cheng <[email protected]>2020-04-30 15:07:46 +0100
committerEdwin Cheng <[email protected]>2020-04-30 15:07:46 +0100
commit45c4f620b1c5b8e462875b6e372db0e849bd6170 (patch)
tree8a93100ea90090fe613e9be6fc02b56a0fee4640 /crates/ra_parser/src/grammar
parentfec1e7c8e10e1c592642fac0c497cd57bd3f003c (diff)
Special-case try macro_rules
Diffstat (limited to 'crates/ra_parser/src/grammar')
-rw-r--r--crates/ra_parser/src/grammar/items.rs11
1 files changed, 11 insertions, 0 deletions
diff --git a/crates/ra_parser/src/grammar/items.rs b/crates/ra_parser/src/grammar/items.rs
index 433ed6812..1503a8730 100644
--- a/crates/ra_parser/src/grammar/items.rs
+++ b/crates/ra_parser/src/grammar/items.rs
@@ -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);