From 6b43c0c1add8d2caaa3c391d8d8daca2c609047e Mon Sep 17 00:00:00 2001 From: Brian Anderson Date: Mon, 13 Aug 2012 17:42:06 -0700 Subject: Stop parsing old operator overloading syntax --- src/libsyntax/ast.rs | 22 ---------------------- src/libsyntax/parse/parser.rs | 17 +---------------- 2 files changed, 1 insertion(+), 38 deletions(-) (limited to 'src/libsyntax') diff --git a/src/libsyntax/ast.rs b/src/libsyntax/ast.rs index 8f4eb98fa7b..57795e5d21c 100644 --- a/src/libsyntax/ast.rs +++ b/src/libsyntax/ast.rs @@ -821,34 +821,12 @@ pure fn empty_span() -> span { // Convenience implementations -// Remove after snapshot! -trait path_concat { - pure fn +(&&id: ident) -> @path; -} - -// Remove after snapshot! -impl ident: path_concat { - pure fn +(&&id: ident) -> @path { - simple_path(self, empty_span()) + id - } -} - impl ident: ops::add { pure fn add(&&id: ident) -> @path { simple_path(self, empty_span()) + id } } -// Remove after snapshot! -impl @path: path_concat { - pure fn +(&&id: ident) -> @path { - @{ - idents: vec::append_one(self.idents, id) - with *self - } - } -} - impl @path: ops::add { pure fn add(&&id: ident) -> @path { @{ diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs index 0dd1c70cd93..30f7243d762 100644 --- a/src/libsyntax/parse/parser.rs +++ b/src/libsyntax/parse/parser.rs @@ -2391,22 +2391,7 @@ class parser { } fn parse_method_name() -> ident { - match copy self.token { - token::BINOP(op) => { self.bump(); @token::binop_to_str(op) } - token::NOT => { self.bump(); @~"!" } - token::LBRACKET => { - self.bump(); - self.expect(token::RBRACKET); - @~"[]" - } - _ => { - let id = self.parse_value_ident(); - if id == @~"unary" && self.eat(token::BINOP(token::MINUS)) { - @~"unary-" - } - else { id } - } - } + self.parse_value_ident() } fn parse_method(pr: visibility) -> @method { -- cgit 1.4.1-3-g733a5