From 45c4f620b1c5b8e462875b6e372db0e849bd6170 Mon Sep 17 00:00:00 2001 From: Edwin Cheng Date: Thu, 30 Apr 2020 22:07:46 +0800 Subject: Special-case try macro_rules --- .../parser/inline/ok/0160_try_macro_rules.rast | 27 ++++++++++++++++++++++ .../parser/inline/ok/0160_try_macro_rules.rs | 1 + 2 files changed, 28 insertions(+) create mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0160_try_macro_rules.rast create mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0160_try_macro_rules.rs (limited to 'crates/ra_syntax/test_data') diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0160_try_macro_rules.rast b/crates/ra_syntax/test_data/parser/inline/ok/0160_try_macro_rules.rast new file mode 100644 index 000000000..05b89d1c3 --- /dev/null +++ b/crates/ra_syntax/test_data/parser/inline/ok/0160_try_macro_rules.rast @@ -0,0 +1,27 @@ +SOURCE_FILE@0..30 + MACRO_CALL@0..29 + PATH@0..11 + PATH_SEGMENT@0..11 + NAME_REF@0..11 + IDENT@0..11 "macro_rules" + BANG@11..12 "!" + WHITESPACE@12..13 " " + NAME@13..16 + IDENT@13..16 "try" + WHITESPACE@16..17 " " + TOKEN_TREE@17..29 + L_CURLY@17..18 "{" + WHITESPACE@18..19 " " + TOKEN_TREE@19..21 + L_PAREN@19..20 "(" + R_PAREN@20..21 ")" + WHITESPACE@21..22 " " + EQ@22..23 "=" + R_ANGLE@23..24 ">" + WHITESPACE@24..25 " " + TOKEN_TREE@25..27 + L_CURLY@25..26 "{" + R_CURLY@26..27 "}" + WHITESPACE@27..28 " " + R_CURLY@28..29 "}" + WHITESPACE@29..30 "\n" diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0160_try_macro_rules.rs b/crates/ra_syntax/test_data/parser/inline/ok/0160_try_macro_rules.rs new file mode 100644 index 000000000..2e2ab6e60 --- /dev/null +++ b/crates/ra_syntax/test_data/parser/inline/ok/0160_try_macro_rules.rs @@ -0,0 +1 @@ +macro_rules! try { () => {} } -- cgit v1.2.3