Skip to content

Commit d6aa8b5

Browse files
kemurphyBurntSushi
authored andcommitted
Expand macros before looking for string literal
1 parent 48f0604 commit d6aa8b5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/macro.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -651,7 +651,7 @@ impl ToTokens for bool {
651651
fn parse(cx: &mut ExtCtxt, tts: &[ast::TokenTree]) -> Option<~str> {
652652
let mut parser = parse::new_parser_from_tts(cx.parse_sess(), cx.cfg(),
653653
Vec::from_slice(tts));
654-
let entry = parser.parse_expr();
654+
let entry = cx.expand_expr(parser.parse_expr());
655655
let regex = match entry.node {
656656
ast::ExprLit(lit) => {
657657
match lit.node {

0 commit comments

Comments
 (0)