summary refs log tree commit diff
path: root/src/libsyntax/parse/token.rs
diff options
context:
space:
mode:
authorPaul Stansifer <paul.stansifer@gmail.com>2012-07-06 14:48:01 -0700
committerPaul Stansifer <paul.stansifer@gmail.com>2012-07-09 17:44:46 -0700
commitcaa83b41bba2b63c8b55193d176d40f5eb0fa9a8 (patch)
tree050763eab3982b739251cda7ca3c404c9dd8542e /src/libsyntax/parse/token.rs
parentcabee6391d599be867b80f81de219d9f982585f5 (diff)
downloadrust-caa83b41bba2b63c8b55193d176d40f5eb0fa9a8.tar.gz
rust-caa83b41bba2b63c8b55193d176d40f5eb0fa9a8.zip
Add support for matchers nonterminals.
Diffstat (limited to 'src/libsyntax/parse/token.rs')
-rw-r--r--src/libsyntax/parse/token.rs10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/libsyntax/parse/token.rs b/src/libsyntax/parse/token.rs
index 6416fafd6ad..a0abec5c437 100644
--- a/src/libsyntax/parse/token.rs
+++ b/src/libsyntax/parse/token.rs
@@ -96,10 +96,8 @@ enum whole_nt {
     w_ty(  @ast::ty),
     w_ident(str_num, bool),
     w_path(@ast::path),
-    // TODO: this seems to cause infinite recursion in
-    // type_structually_contains if it's not an @-box. We should at least get
-    // failure instead.
-    w_tt(@ast::token_tree),
+    w_tt(  @ast::token_tree), //needs @ed to break a circularity
+    w_mtcs(~[ast::matcher])
 }
 
 fn binop_to_str(o: binop) -> str {
@@ -193,8 +191,8 @@ fn to_str(in: interner<@str>, t: token) -> str {
               w_stmt(*) { "statement" } w_pat(*) { "pattern" }
               w_expr(*) { "expression" } w_ty(*) { "type" }
               w_ident(*) { "identifier" } w_path(*) { "path" }
-              w_tt(*) { "tt" }
-        }
+              w_tt(*) { "tt" } w_mtcs(*) { "matcher sequence" }
+            }
       }
     }
 }