diff options
| author | Alexander Light <scialexlight@gmail.com> | 2014-11-30 09:51:15 -0500 |
|---|---|---|
| committer | Alexander Light <scialexlight@gmail.com> | 2014-11-30 09:51:15 -0500 |
| commit | 798da237725a8b1292dfbcee6847bb297586eb44 (patch) | |
| tree | da6fa459f994cd6b1972433e7b03670bfa9bb1ab /src/libsyntax/parse | |
| parent | 52888a7c47ce409fc80e56430056701d7349d27e (diff) | |
| download | rust-798da237725a8b1292dfbcee6847bb297586eb44.tar.gz rust-798da237725a8b1292dfbcee6847bb297586eb44.zip | |
allow macro expansions in attributes
Diffstat (limited to 'src/libsyntax/parse')
| -rw-r--r-- | src/libsyntax/parse/parser.rs | 6 |
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())), |
