From 798da237725a8b1292dfbcee6847bb297586eb44 Mon Sep 17 00:00:00 2001 From: Alexander Light Date: Sun, 30 Nov 2014 09:51:15 -0500 Subject: allow macro expansions in attributes --- src/libsyntax/parse/parser.rs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/libsyntax/parse/parser.rs') diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs index 447f2a376e1..b9fd28ecfc8 100644 --- a/src/libsyntax/parse/parser.rs +++ b/src/libsyntax/parse/parser.rs @@ -1669,6 +1669,12 @@ impl<'a> Parser<'a> { /// Matches token_lit = LIT_INTEGER | ... pub fn lit_from_token(&mut self, tok: &token::Token) -> Lit_ { match *tok { + token::Interpolated(token::NtExpr(ref v)) => { + match v.node { + ExprLit(ref lit) => { lit.node.clone() } + _ => { self.unexpected_last(tok); } + } + } token::Literal(lit, suf) => { let (suffix_illegal, out) = match lit { token::Byte(i) => (true, LitByte(parse::byte_lit(i.as_str()).val0())), -- cgit 1.4.1-3-g733a5