about summary refs log tree commit diff
path: root/src/libsyntax/parse/token.rs
diff options
context:
space:
mode:
authorMatthew Tran <0e4ef622@gmail.com>2018-08-05 10:37:48 -0500
committerMatthew Tran <0e4ef622@gmail.com>2018-08-05 11:02:59 -0500
commit3d44da65cd91a65603676bb2f2bc6b9bdc5775bf (patch)
treeb83a34805a2140b559bd366cf5aee0dac3b059af /src/libsyntax/parse/token.rs
parent9f9ac89d11a2afaeaa029738b38142124684c89b (diff)
downloadrust-3d44da65cd91a65603676bb2f2bc6b9bdc5775bf.tar.gz
rust-3d44da65cd91a65603676bb2f2bc6b9bdc5775bf.zip
Enable macros to pass $:literal to another macro
Diffstat (limited to 'src/libsyntax/parse/token.rs')
-rw-r--r--src/libsyntax/parse/token.rs4
1 files changed, 4 insertions, 0 deletions
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,
         }
     }