diff options
| author | Niko Matsakis <niko@alum.mit.edu> | 2012-01-10 06:49:15 -0800 |
|---|---|---|
| committer | Niko Matsakis <niko@alum.mit.edu> | 2012-01-10 13:31:06 -0800 |
| commit | 8b911587dfed1cc1973b361865c3632a2e2cffde (patch) | |
| tree | 7a0be45d1690d5ccc80a23e80243f20076bf93eb /src/comp/syntax/parse/parser.rs | |
| parent | af086aa8ef0628cc21d4dc5831258bf45c9bb872 (diff) | |
| download | rust-8b911587dfed1cc1973b361865c3632a2e2cffde.tar.gz rust-8b911587dfed1cc1973b361865c3632a2e2cffde.zip | |
rename sendfn to fn~, lambda to fn@
Diffstat (limited to 'src/comp/syntax/parse/parser.rs')
| -rw-r--r-- | src/comp/syntax/parse/parser.rs | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/src/comp/syntax/parse/parser.rs b/src/comp/syntax/parse/parser.rs index 77a1df8d437..92efa7bbd82 100644 --- a/src/comp/syntax/parse/parser.rs +++ b/src/comp/syntax/parse/parser.rs @@ -514,10 +514,10 @@ 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, "fn@") { - t = parse_ty_fn(ast::proto_shared, p); + } else if eat_word(p, "lambda") { + t = parse_ty_fn(ast::proto_box, p); } else if eat_word(p, "sendfn") { - t = parse_ty_fn(ast::proto_send, p); + t = parse_ty_fn(ast::proto_uniq, p); } else if eat_word(p, "obj") { t = ast::ty_obj(parse_ty_methods(p, false)); } else if p.peek() == token::MOD_SEP || is_ident(p.peek()) { @@ -821,10 +821,10 @@ 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, "fn@") { - ret pexpr(parse_fn_expr(p, ast::proto_shared)); + } else if eat_word(p, "lambda") { + ret pexpr(parse_fn_expr(p, ast::proto_box)); } else if eat_word(p, "sendfn") { - ret pexpr(parse_fn_expr(p, ast::proto_send)); + ret pexpr(parse_fn_expr(p, ast::proto_uniq)); } else if eat_word(p, "unchecked") { ret pexpr(parse_block_expr(p, lo, ast::unchecked_blk)); } else if eat_word(p, "unsafe") { @@ -2113,7 +2113,10 @@ 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::proto_box + } else if p.peek() == token::TILDE { + p.bump(); + ast::proto_uniq } else { ast::proto_bare } |
