From 8387896ddaa5fbe2ba39b9ad06fd02e1bfcb76e7 Mon Sep 17 00:00:00 2001 From: Graydon Hoare Date: Mon, 9 Jan 2012 16:12:37 -0800 Subject: Remove proto_sugar and 'lambda' as keyword, commit to fn@. --- src/comp/syntax/parse/parser.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/comp/syntax/parse') 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 { 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 } -- cgit 1.4.1-3-g733a5