about summary refs log tree commit diff
path: root/src/comp/syntax/parse/parser.rs
diff options
context:
space:
mode:
authorGraydon Hoare <graydon@mozilla.com>2012-01-09 16:12:37 -0800
committerGraydon Hoare <graydon@mozilla.com>2012-01-09 16:12:48 -0800
commit8387896ddaa5fbe2ba39b9ad06fd02e1bfcb76e7 (patch)
treed326dd79d45136f7cd2960491e89607d671172e5 /src/comp/syntax/parse/parser.rs
parentf6ecbe88ca67769ccb9def337ada9ae25235e00e (diff)
downloadrust-8387896ddaa5fbe2ba39b9ad06fd02e1bfcb76e7.tar.gz
rust-8387896ddaa5fbe2ba39b9ad06fd02e1bfcb76e7.zip
Remove proto_sugar and 'lambda' as keyword, commit to fn@.
Diffstat (limited to 'src/comp/syntax/parse/parser.rs')
-rw-r--r--src/comp/syntax/parse/parser.rs12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/comp/syntax/parse/parser.rs b/src/comp/syntax/parse/parser.rs
index 2b45115f5b9..2eeb5cbf136 100644
--- a/src/comp/syntax/parse/parser.rs
+++ b/src/comp/syntax/parse/parser.rs
@@ -168,7 +168,7 @@ fn bad_expr_word_table() -> hashmap<str, ()> {
     let words = new_str_hash();
     for word in ["mod", "if", "else", "while", "do", "alt", "for", "break",
                  "cont", "ret", "be", "fail", "type", "resource", "check",
-                 "assert", "claim", "native", "fn", "lambda", "pure",
+                 "assert", "claim", "native", "fn", "fn@", "pure",
                  "unsafe", "block", "import", "export", "let", "const",
                  "log", "tag", "obj", "copy", "sendfn", "impl", "iface"] {
         words.insert(word, ());
@@ -514,8 +514,8 @@ fn parse_ty(p: parser, colons_before_params: bool) -> @ast::ty {
         t = parse_ty_fn(proto, p);
     } else if eat_word(p, "block") {
         t = parse_ty_fn(ast::proto_block, p);
-    } else if eat_word(p, "lambda") {
-        t = parse_ty_fn(ast::proto_shared(ast::sugar_sexy), p);
+    } else if eat_word(p, "fn@") {
+        t = parse_ty_fn(ast::proto_shared, p);
     } else if eat_word(p, "sendfn") {
         t = parse_ty_fn(ast::proto_send, p);
     } else if eat_word(p, "obj") {
@@ -821,8 +821,8 @@ fn parse_bottom_expr(p: parser) -> pexpr {
         ret pexpr(parse_fn_expr(p, proto));
     } else if eat_word(p, "block") {
         ret pexpr(parse_fn_expr(p, ast::proto_block));
-    } else if eat_word(p, "lambda") {
-        ret pexpr(parse_fn_expr(p, ast::proto_shared(ast::sugar_sexy)));
+    } else if eat_word(p, "fn@") {
+        ret pexpr(parse_fn_expr(p, ast::proto_shared));
     } else if eat_word(p, "sendfn") {
         ret pexpr(parse_fn_expr(p, ast::proto_send));
     } else if eat_word(p, "unchecked") {
@@ -2117,7 +2117,7 @@ fn parse_item_tag(p: parser, attrs: [ast::attribute]) -> @ast::item {
 fn parse_fn_ty_proto(p: parser) -> ast::proto {
     if p.peek() == token::AT {
         p.bump();
-        ast::proto_shared(ast::sugar_normal)
+        ast::proto_shared
     } else {
         ast::proto_bare
     }