about summary refs log tree commit diff
path: root/src/libsyntax/ext
diff options
context:
space:
mode:
Diffstat (limited to 'src/libsyntax/ext')
-rw-r--r--src/libsyntax/ext/tt/earley_parser.rs8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/libsyntax/ext/tt/earley_parser.rs b/src/libsyntax/ext/tt/earley_parser.rs
index 191da586ce5..f890661e239 100644
--- a/src/libsyntax/ext/tt/earley_parser.rs
+++ b/src/libsyntax/ext/tt/earley_parser.rs
@@ -272,7 +272,13 @@ fn parse_nt(p: parser, name: str) -> whole_nt {
                       + token::to_str(*p.reader.interner(), copy p.token)) }
       } }
       "path" { token::w_path(p.parse_path_with_tps(false)) }
-      "tt" { token::w_tt(@p.parse_token_tree()) }
+      "tt" {
+        p.quote_depth += 1u;
+        let res = token::w_tt(@p.parse_token_tree());
+        p.quote_depth -= 1u;
+        res
+      }
+      "mtcs" { token::w_mtcs(p.parse_matchers()) }
       _ { p.fatal("Unsupported builtin nonterminal parser: " + name)}
     }
 }