From 1a3076a9494635c0273f6361d347d5a5f8f55e1a Mon Sep 17 00:00:00 2001 From: greg Date: Wed, 13 Sep 2017 22:47:25 -0700 Subject: [PATCH] Change syntax of rc macro --- src/schala_lang/parsing.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/schala_lang/parsing.rs b/src/schala_lang/parsing.rs index abe9a9d..e296c45 100644 --- a/src/schala_lang/parsing.rs +++ b/src/schala_lang/parsing.rs @@ -648,7 +648,7 @@ mod parse_tests { use super::ParseError; macro_rules! rc { - ($string:expr) => { Rc::new($string.to_string()) } + ($string:tt) => { Rc::new(stringify!($string).to_string()) } } macro_rules! parse_test { @@ -707,6 +707,6 @@ mod parse_tests { #[test] fn parsing_types() { - parse_test!("type Yolo = Yolo", AST(vec![Declaration(TypeDecl(rc!("Yolo"), TypeBody(vec![Variant::Singleton(rc!("Yolo"))])))])); + parse_test!("type Yolo = Yolo", AST(vec![Declaration(TypeDecl(rc!(Yolo), TypeBody(vec![Variant::Singleton(rc!(Yolo))])))])); } }