From 358a1aeec99ba6bf3c3f6bc5886e4dddf647a75a Mon Sep 17 00:00:00 2001 From: Marijn Haverbeke Date: Thu, 12 May 2011 13:25:18 +0200 Subject: Keep resolve data in external hash table, rather than embedded defs One step closer to removing fold and having a single, immutable AST. Resolve still uses fold, because it has to detect and transform expr_field expressions. If we go through on our plan of moving to a different syntax for module dereferencing, the parser can spit out expr_field expressions, and resolve can move to walk. (I am truly sorry for the things I did in typestate_check.rs. I expect we'll want to change that to walk as well in the near future, at which point it should probably pass around a context record, which could hold the def_map.) --- src/comp/pretty/pprust.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/comp/pretty') diff --git a/src/comp/pretty/pprust.rs b/src/comp/pretty/pprust.rs index 3c417eff..d380f0b7 100644 --- a/src/comp/pretty/pprust.rs +++ b/src/comp/pretty/pprust.rs @@ -613,7 +613,7 @@ fn print_expr(ps s, &@ast.expr expr) { print_expr(s, index); pclose(s); } - case (ast.expr_path(?path,_,_)) { + case (ast.expr_path(?path,_)) { print_path(s, path); } case (ast.expr_fail(_)) { @@ -768,7 +768,7 @@ fn print_pat(ps s, &@ast.pat pat) { case (ast.pat_wild(_)) {wrd(s.s, "_");} case (ast.pat_bind(?id,_,_)) {wrd(s.s, "?" + id);} case (ast.pat_lit(?lit,_)) {print_literal(s, lit);} - case (ast.pat_tag(?path,?args,_,_)) { + case (ast.pat_tag(?path,?args,_)) { print_path(s, path); if (Vec.len[@ast.pat](args) > 0u) { popen_h(s); -- cgit v1.2.3