From 3d44da65cd91a65603676bb2f2bc6b9bdc5775bf Mon Sep 17 00:00:00 2001 From: Matthew Tran <0e4ef622@gmail.com> Date: Sun, 5 Aug 2018 10:37:48 -0500 Subject: Enable macros to pass $:literal to another macro --- src/libsyntax/parse/token.rs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/libsyntax/parse') diff --git a/src/libsyntax/parse/token.rs b/src/libsyntax/parse/token.rs index c449cc0a652..1d0c6b5317a 100644 --- a/src/libsyntax/parse/token.rs +++ b/src/libsyntax/parse/token.rs @@ -302,6 +302,10 @@ impl Token { BinOp(Minus) => true, Ident(ident, false) if ident.name == keywords::True.name() => true, Ident(ident, false) if ident.name == keywords::False.name() => true, + Interpolated(ref nt) => match nt.0 { + NtLiteral(..) => true, + _ => false, + }, _ => false, } } -- cgit 1.4.1-3-g733a5