about summary refs log tree commit diff
path: root/src/libsyntax/parse
diff options
context:
space:
mode:
authorAlexander Light <scialexlight@gmail.com>2014-11-30 09:51:15 -0500
committerAlexander Light <scialexlight@gmail.com>2014-11-30 09:51:15 -0500
commit798da237725a8b1292dfbcee6847bb297586eb44 (patch)
treeda6fa459f994cd6b1972433e7b03670bfa9bb1ab /src/libsyntax/parse
parent52888a7c47ce409fc80e56430056701d7349d27e (diff)
downloadrust-798da237725a8b1292dfbcee6847bb297586eb44.tar.gz
rust-798da237725a8b1292dfbcee6847bb297586eb44.zip
allow macro expansions in attributes
Diffstat (limited to 'src/libsyntax/parse')
-rw-r--r--src/libsyntax/parse/parser.rs6
1 files changed, 6 insertions, 0 deletions
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())),