about summary refs log tree commit diff
path: root/src/comp/syntax
diff options
context:
space:
mode:
authorBrian Anderson <banderson@mozilla.com>2011-10-18 20:22:46 -0700
committerBrian Anderson <banderson@mozilla.com>2011-10-20 18:23:48 -0700
commit4b30a06abe617f710b4d62aa134bc2af326b8f24 (patch)
tree49bcb1a3433ae60c242dc33773a744785bec004f /src/comp/syntax
parent29ad3bdb103bec8d45df6f015802668722af6a00 (diff)
Rename ast::proto_fn to ast::proto_shared
Diffstat (limited to 'src/comp/syntax')
-rw-r--r--src/comp/syntax/ast.rs5
-rw-r--r--src/comp/syntax/parse/parser.rs8
-rw-r--r--src/comp/syntax/print/pprust.rs2
3 files changed, 7 insertions, 8 deletions
diff --git a/src/comp/syntax/ast.rs b/src/comp/syntax/ast.rs
index a837dbdac24..8ec411cff5e 100644
--- a/src/comp/syntax/ast.rs
+++ b/src/comp/syntax/ast.rs
@@ -105,11 +105,10 @@ tag _auth { auth_unsafe; }
 
 tag proto {
     proto_iter;
-    proto_fn;
+    proto_shared;
     proto_block;
+    // FIXME: Merge with proto_shared
     proto_closure;
-    // Functions without an environment. Eventually, this will
-    // merge with proto_fn.
     proto_bare;
 }
 
diff --git a/src/comp/syntax/parse/parser.rs b/src/comp/syntax/parse/parser.rs
index 3846e9dc03b..0f2c93756b7 100644
--- a/src/comp/syntax/parse/parser.rs
+++ b/src/comp/syntax/parse/parser.rs
@@ -1901,7 +1901,7 @@ fn parse_item_res(p: parser, attrs: [ast::attribute]) -> @ast::item {
          il: ast::il_normal,
          cf: ast::return_val,
          constraints: []};
-    let f = {decl: decl, proto: ast::proto_fn, body: dtor};
+    let f = {decl: decl, proto: ast::proto_shared, body: dtor};
     ret mk_item(p, lo, dtor.span.hi, ident,
                 ast::item_res(f, p.get_id(), ty_params, p.get_id()), attrs);
 }
@@ -2140,7 +2140,7 @@ fn parse_fn_item_proto(p: parser) -> ast::proto {
         ast::proto_bare
     } else if p.peek() == token::AT {
         p.bump();
-        ast::proto_fn
+        ast::proto_shared
     } else {
         ast::proto_bare
     }
@@ -2152,7 +2152,7 @@ fn parse_fn_ty_proto(p: parser) -> ast::proto {
         ast::proto_bare
     } else if p.peek() == token::AT {
         p.bump();
-        ast::proto_fn
+        ast::proto_shared
     } else {
         ast::proto_bare
     }
@@ -2164,7 +2164,7 @@ fn parse_fn_anon_proto(p: parser) -> ast::proto {
         ast::proto_bare
     } else if p.peek() == token::AT {
         p.bump();
-        ast::proto_fn
+        ast::proto_shared
     } else {
         ast::proto_bare
     }
diff --git a/src/comp/syntax/print/pprust.rs b/src/comp/syntax/print/pprust.rs
index 008cbac0218..4c4b66c59fe 100644
--- a/src/comp/syntax/print/pprust.rs
+++ b/src/comp/syntax/print/pprust.rs
@@ -1643,7 +1643,7 @@ fn ast_fn_constrs_str(decl: ast::fn_decl, constrs: [@ast::constr]) -> str {
 
 fn proto_to_str(p: ast::proto) -> str {
     ret alt p {
-          ast::proto_fn. { "fn@" }
+          ast::proto_shared. { "fn@" }
           ast::proto_iter. { "iter" }
           ast::proto_block. { "block" }
           ast::proto_closure. { "lambda" }