Stop parsing old operator overloading syntax

This commit is contained in:
Brian Anderson 2012-08-13 17:42:06 -07:00
parent 2e1b98d34f
commit 6b43c0c1ad
11 changed files with 3 additions and 105 deletions

View file

@ -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 {