提交 63397b85 编写于 作者: J John Clements

remove unused RESTRICT_NO_CALL_EXPRS restriction

上级 2733a1f1
...@@ -98,7 +98,6 @@ ...@@ -98,7 +98,6 @@
enum restriction { enum restriction {
UNRESTRICTED, UNRESTRICTED,
RESTRICT_STMT_EXPR, RESTRICT_STMT_EXPR,
RESTRICT_NO_CALL_EXPRS,
RESTRICT_NO_BAR_OP, RESTRICT_NO_BAR_OP,
RESTRICT_NO_BAR_OR_DOUBLEBAR_OP, RESTRICT_NO_BAR_OR_DOUBLEBAR_OP,
} }
...@@ -1377,10 +1376,6 @@ fn parse_dot_or_call_expr(&self) -> @expr { ...@@ -1377,10 +1376,6 @@ fn parse_dot_or_call_expr(&self) -> @expr {
self.parse_dot_or_call_expr_with(b) self.parse_dot_or_call_expr_with(b)
} }
fn permits_call(&self) -> bool {
return *self.restriction != RESTRICT_NO_CALL_EXPRS;
}
fn parse_dot_or_call_expr_with(&self, e0: @expr) -> @expr { fn parse_dot_or_call_expr_with(&self, e0: @expr) -> @expr {
let mut e = e0; let mut e = e0;
let lo = e.span.lo; let lo = e.span.lo;
...@@ -1401,7 +1396,7 @@ fn parse_dot_or_call_expr_with(&self, e0: @expr) -> @expr { ...@@ -1401,7 +1396,7 @@ fn parse_dot_or_call_expr_with(&self, e0: @expr) -> @expr {
// expr.f() method call // expr.f() method call
match *self.token { match *self.token {
token::LPAREN if self.permits_call() => { token::LPAREN => {
let es = self.parse_unspanned_seq( let es = self.parse_unspanned_seq(
&token::LPAREN, &token::LPAREN,
&token::RPAREN, &token::RPAREN,
...@@ -1425,7 +1420,7 @@ fn parse_dot_or_call_expr_with(&self, e0: @expr) -> @expr { ...@@ -1425,7 +1420,7 @@ fn parse_dot_or_call_expr_with(&self, e0: @expr) -> @expr {
if self.expr_is_complete(e) { break; } if self.expr_is_complete(e) { break; }
match *self.token { match *self.token {
// expr(...) // expr(...)
token::LPAREN if self.permits_call() => { token::LPAREN => {
let es = self.parse_unspanned_seq( let es = self.parse_unspanned_seq(
&token::LPAREN, &token::LPAREN,
&token::RPAREN, &token::RPAREN,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册