From 41c1a639c392355c4f36c555e022f7d4423cace3 Mon Sep 17 00:00:00 2001 From: Edwin Cheng Date: Sat, 20 Apr 2019 02:19:46 +0800 Subject: Disable tt matcher --- crates/ra_mbe/src/mbe_expander.rs | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'crates/ra_mbe') diff --git a/crates/ra_mbe/src/mbe_expander.rs b/crates/ra_mbe/src/mbe_expander.rs index 01e29b556..86867111f 100644 --- a/crates/ra_mbe/src/mbe_expander.rs +++ b/crates/ra_mbe/src/mbe_expander.rs @@ -171,10 +171,14 @@ fn match_lhs(pattern: &crate::Subtree, input: &mut TtCursor) -> Result { - let token = input.eat().ok_or(ExpandError::UnexpectedToken)?.clone(); - res.inner.insert(text.clone(), Binding::Simple(token.into())); - } + // FIXME: + // Enable followiing code when everything is fixed + // At least we can dogfood itself to not stackoverflow + // + // "tt" => { + // let token = input.eat().ok_or(ExpandError::UnexpectedToken)?.clone(); + // res.inner.insert(text.clone(), Binding::Simple(token.into())); + // } "item" => { let item = input.eat_item().ok_or(ExpandError::UnexpectedToken)?.clone(); -- cgit v1.2.3 From 210c762fe6edbe8382289ac71804bcfd82b251d4 Mon Sep 17 00:00:00 2001 From: Edwin Cheng Date: Sat, 20 Apr 2019 02:41:13 +0800 Subject: Disable test_tt_xx --- crates/ra_mbe/src/lib.rs | 46 +++++++++++++++++++++++----------------------- 1 file changed, 23 insertions(+), 23 deletions(-) (limited to 'crates/ra_mbe') diff --git a/crates/ra_mbe/src/lib.rs b/crates/ra_mbe/src/lib.rs index 814586fd6..d2115bd67 100644 --- a/crates/ra_mbe/src/lib.rs +++ b/crates/ra_mbe/src/lib.rs @@ -763,29 +763,29 @@ MACRO_ITEMS@[0; 40) ); } - #[test] - fn test_tt_block() { - let rules = create_rules( - r#" - macro_rules! foo { - ($ i:tt) => { fn foo() $ i } - } -"#, - ); - assert_expansion(&rules, r#"foo! { { 1; } }"#, r#"fn foo () {1 ;}"#); - } - - #[test] - fn test_tt_group() { - let rules = create_rules( - r#" - macro_rules! foo { - ($($ i:tt)*) => { $($ i)* } - } -"#, - ); - assert_expansion(&rules, r#"foo! { fn foo() {} }"#, r#"fn foo () {}"#); - } + // #[test] + // fn test_tt_block() { + // let rules = create_rules( + // r#" + // macro_rules! foo { + // ($ i:tt) => { fn foo() $ i } + // } + // "#, + // ); + // assert_expansion(&rules, r#"foo! { { 1; } }"#, r#"fn foo () {1 ;}"#); + // } + + // #[test] + // fn test_tt_group() { + // let rules = create_rules( + // r#" + // macro_rules! foo { + // ($($ i:tt)*) => { $($ i)* } + // } + // "#, + // ); + // assert_expansion(&rules, r#"foo! { fn foo() {} }"#, r#"fn foo () {}"#); + // } #[test] fn test_lifetime() { -- cgit v1.2.3