about summary refs log tree commit diff
path: root/src/comp
diff options
context:
space:
mode:
authorBrian Anderson <andersrb@gmail.com>2011-04-21 20:34:04 -0400
committerBrian Anderson <andersrb@gmail.com>2011-04-21 20:42:26 -0400
commit540344acb9ebaa0141e991217c9fd9e2a5ec717a (patch)
tree04633c069092e6f36617db6a3f40e73212bc0b1c /src/comp
parentc78b73b71d82e4f428c60daee892b9d30e0e1029 (diff)
downloadrust-540344acb9ebaa0141e991217c9fd9e2a5ec717a.tar.gz
rust-540344acb9ebaa0141e991217c9fd9e2a5ec717a.zip
Fix the signature of expr_ext
The extension body is just a string, not an expression.
Diffstat (limited to 'src/comp')
-rw-r--r--src/comp/front/ast.rs2
-rw-r--r--src/comp/front/extfmt.rs2
-rw-r--r--src/comp/front/parser.rs4
-rw-r--r--src/comp/middle/fold.rs4
-rw-r--r--src/comp/middle/typestate_check.rs4
5 files changed, 8 insertions, 8 deletions
diff --git a/src/comp/front/ast.rs b/src/comp/front/ast.rs
index 882b70a4280..95522c0ced7 100644
--- a/src/comp/front/ast.rs
+++ b/src/comp/front/ast.rs
@@ -275,7 +275,7 @@ tag expr_ {
     expr_field(@expr, ident, ann);
     expr_index(@expr, @expr, ann);
     expr_path(path, option.t[def], ann);
-    expr_ext(path, vec[@expr], option.t[@expr], @expr, ann);
+    expr_ext(path, vec[@expr], option.t[str], @expr, ann);
     expr_fail(ann);
     expr_break(ann);
     expr_cont(ann);
diff --git a/src/comp/front/extfmt.rs b/src/comp/front/extfmt.rs
index e8f0c2521a0..39c074c3ca1 100644
--- a/src/comp/front/extfmt.rs
+++ b/src/comp/front/extfmt.rs
@@ -46,7 +46,7 @@ export expand_syntax_ext;
 
 // FIXME: Need to thread parser through here to handle errors correctly
 fn expand_syntax_ext(vec[@ast.expr] args,
-                     option.t[@ast.expr] body) -> @ast.expr {
+                     option.t[str] body) -> @ast.expr {
 
     if (_vec.len[@ast.expr](args) == 0u) {
         log_err "malformed #fmt call";
diff --git a/src/comp/front/parser.rs b/src/comp/front/parser.rs
index 26d3b89d2ab..fdd41cf0ff7 100644
--- a/src/comp/front/parser.rs
+++ b/src/comp/front/parser.rs
@@ -794,7 +794,7 @@ fn parse_bottom_expr(parser p) -> @ast.expr {
                                            pf, p);
             hi = es.span.hi;
             ex = expand_syntax_ext(p, es.span, pth, es.node,
-                                   none[@ast.expr]);
+                                   none[str]);
         }
 
         case (token.FAIL) {
@@ -935,7 +935,7 @@ fn parse_bottom_expr(parser p) -> @ast.expr {
 
 fn expand_syntax_ext(parser p, ast.span sp,
                      &ast.path path, vec[@ast.expr] args,
-                     option.t[@ast.expr] body) -> ast.expr_ {
+                     option.t[str] body) -> ast.expr_ {
 
     check (_vec.len[ast.ident](path.node.idents) > 0u);
     auto extname = path.node.idents.(0);
diff --git a/src/comp/middle/fold.rs b/src/comp/middle/fold.rs
index 25617640734..a0f3bc93f95 100644
--- a/src/comp/middle/fold.rs
+++ b/src/comp/middle/fold.rs
@@ -173,7 +173,7 @@ type ast_fold[ENV] =
 
      (fn(&ENV e, &span sp,
          &path p, vec[@expr] args,
-         option.t[@expr] body,
+         option.t[str] body,
          @expr expanded,
          ann a) -> @expr)                         fold_expr_ext,
 
@@ -1343,7 +1343,7 @@ fn identity_fold_expr_path[ENV](&ENV env, &span sp,
 
 fn identity_fold_expr_ext[ENV](&ENV env, &span sp,
                                &path p, vec[@expr] args,
-                               option.t[@expr] body,
+                               option.t[str] body,
                                @expr expanded,
                                ann a) -> @expr {
     ret @respan(sp, ast.expr_ext(p, args, body, expanded, a));
diff --git a/src/comp/middle/typestate_check.rs b/src/comp/middle/typestate_check.rs
index 3e67cf2e109..8a6e840a428 100644
--- a/src/comp/middle/typestate_check.rs
+++ b/src/comp/middle/typestate_check.rs
@@ -1922,9 +1922,9 @@ fn annotate_expr(&fn_info_map fm, &@expr e) -> @expr {
         case (expr_path(_,_,_)) {
             /* no change */
         }
-        case (expr_ext(?p, ?es, ?e_opt, ?e, ?a)) {
+        case (expr_ext(?p, ?es, ?s_opt, ?e, ?a)) {
             e1 = expr_ext(p, annotate_exprs(fm, es),
-                          annotate_option_exp(fm, e_opt),
+                          s_opt,
                           annotate_expr(fm, e), a);
         }
         /* no change, next 3 cases */