From fa4134611dfc54e117f196644d30948a75b7b9eb Mon Sep 17 00:00:00 2001 From: Eric Holk Date: Thu, 5 Jul 2012 23:04:56 -0700 Subject: Fixing an infinite type, updating code to match new Early parser, remembering to add protocol parser. --- src/libsyntax/parse/token.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/libsyntax/parse') diff --git a/src/libsyntax/parse/token.rs b/src/libsyntax/parse/token.rs index ef1d0f4bc47..dbc1e8b34e3 100644 --- a/src/libsyntax/parse/token.rs +++ b/src/libsyntax/parse/token.rs @@ -96,7 +96,10 @@ enum whole_nt { w_ty( @ast::ty), w_ident(str_num, bool), w_path(@ast::path), - w_tt(ast::token_tree), + // 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), } fn binop_to_str(o: binop) -> str { @@ -190,6 +193,7 @@ 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" } } } } -- cgit 1.4.1-3-g733a5