diff options
| author | bors <bors@rust-lang.org> | 2014-12-02 07:22:02 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2014-12-02 07:22:02 +0000 |
| commit | 8dbe63200d56cfb848e7a58107c93a4f7a48f45c (patch) | |
| tree | 1cfc1148b51084b5c67960d05f8afeda14c82588 /src/libsyntax/parse | |
| parent | 8a210af7e56a7ad25310b482c84bdcba0e65666b (diff) | |
| parent | d3bbfb48bd44b578d5ad4a14f82d8066e21a008a (diff) | |
| download | rust-8dbe63200d56cfb848e7a58107c93a4f7a48f45c.tar.gz rust-8dbe63200d56cfb848e7a58107c93a4f7a48f45c.zip | |
auto merge of #19427 : scialex/rust/doc-attr-macros, r=sfackler
this allows one to, for example, use #[doc = $macro_var ] in macros.
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 fe9c5494517..920bcc3a951 100644 --- a/src/libsyntax/parse/parser.rs +++ b/src/libsyntax/parse/parser.rs @@ -1648,6 +1648,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())), |
