Removed the obsolete ast::CallSugar (previously used by do).

This commit is contained in:
Eduard Burtescu
2014-02-14 10:28:32 +02:00
committed by Alex Crichton
parent 07ea23e15d
commit 6e84023596
23 changed files with 79 additions and 146 deletions

View File

@@ -519,7 +519,7 @@ pub struct Expr {
impl Expr {
pub fn get_callee_id(&self) -> Option<NodeId> {
match self.node {
ExprMethodCall(callee_id, _, _, _, _) |
ExprMethodCall(callee_id, _, _, _) |
ExprIndex(callee_id, _, _) |
ExprBinary(callee_id, _, _, _) |
ExprAssignOp(callee_id, _, _, _) |
@@ -529,20 +529,14 @@ impl Expr {
}
}
#[deriving(Clone, Eq, Encodable, Decodable, IterBytes)]
pub enum CallSugar {
NoSugar,
ForSugar
}
#[deriving(Clone, Eq, Encodable, Decodable, IterBytes)]
pub enum Expr_ {
ExprVstore(@Expr, ExprVstore),
// First expr is the place; second expr is the value.
ExprBox(@Expr, @Expr),
ExprVec(~[@Expr], Mutability),
ExprCall(@Expr, ~[@Expr], CallSugar),
ExprMethodCall(NodeId, Ident, ~[P<Ty>], ~[@Expr], CallSugar),
ExprCall(@Expr, ~[@Expr]),
ExprMethodCall(NodeId, Ident, ~[P<Ty>], ~[@Expr]),
ExprTup(~[@Expr]),
ExprBinary(NodeId, BinOp, @Expr, @Expr),
ExprUnary(NodeId, UnOp, @Expr),