about summary refs log tree commit diff
path: root/src/libsyntax/parse
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2014-02-14 12:21:51 -0800
committerbors <bors@rust-lang.org>2014-02-14 12:21:51 -0800
commit3f717bbe96014c04c4c439ed0b0975ca36a73e53 (patch)
tree8efaf70dc83bb23098e7d0e47a65cdeb963bba8a /src/libsyntax/parse
parent994747022a45b5c2b03f38dddbe8b43bf09679f3 (diff)
parent2f8dbf210215039f39a80424d9c43f96ff79dad4 (diff)
downloadrust-3f717bbe96014c04c4c439ed0b0975ca36a73e53.tar.gz
rust-3f717bbe96014c04c4c439ed0b0975ca36a73e53.zip
auto merge of #12267 : alexcrichton/rust/rollup, r=alexcrichton
The last commit has the closed PRs
Diffstat (limited to 'src/libsyntax/parse')
-rw-r--r--src/libsyntax/parse/classify.rs16
-rw-r--r--src/libsyntax/parse/parser.rs14
2 files changed, 13 insertions, 17 deletions
diff --git a/src/libsyntax/parse/classify.rs b/src/libsyntax/parse/classify.rs
index accf5e73540..d6dcb956f25 100644
--- a/src/libsyntax/parse/classify.rs
+++ b/src/libsyntax/parse/classify.rs
@@ -23,15 +23,13 @@ use ast;
 // isn't parsed as (if true {...} else {...} | x) | 5
 pub fn expr_requires_semi_to_be_stmt(e: @ast::Expr) -> bool {
     match e.node {
-      ast::ExprIf(..)
-      | ast::ExprMatch(..)
-      | ast::ExprBlock(_)
-      | ast::ExprWhile(..)
-      | ast::ExprLoop(..)
-      | ast::ExprForLoop(..)
-      | ast::ExprCall(_, _, ast::ForSugar)
-      | ast::ExprMethodCall(_, _, _, _, ast::ForSugar) => false,
-      _ => true
+        ast::ExprIf(..)
+        | ast::ExprMatch(..)
+        | ast::ExprBlock(_)
+        | ast::ExprWhile(..)
+        | ast::ExprLoop(..)
+        | ast::ExprForLoop(..) => false,
+        _ => true
     }
 }
 
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs
index 674d41e9dbe..a02971ae8ea 100644
--- a/src/libsyntax/parse/parser.rs
+++ b/src/libsyntax/parse/parser.rs
@@ -13,7 +13,6 @@
 use abi;
 use abi::AbiSet;
 use ast::{Sigil, BorrowedSigil, ManagedSigil, OwnedSigil};
-use ast::{CallSugar, NoSugar};
 use ast::{BareFnTy, ClosureTy};
 use ast::{RegionTyParamBound, TraitTyParamBound};
 use ast::{Provided, Public, Purity};
@@ -1690,13 +1689,12 @@ impl Parser {
         ExprBinary(ast::DUMMY_NODE_ID, binop, lhs, rhs)
     }
 
-    pub fn mk_call(&mut self, f: @Expr, args: ~[@Expr], sugar: CallSugar) -> ast::Expr_ {
-        ExprCall(f, args, sugar)
+    pub fn mk_call(&mut self, f: @Expr, args: ~[@Expr]) -> ast::Expr_ {
+        ExprCall(f, args)
     }
 
-    fn mk_method_call(&mut self, ident: Ident, tps: ~[P<Ty>], args: ~[@Expr],
-                      sugar: CallSugar) -> ast::Expr_ {
-        ExprMethodCall(ast::DUMMY_NODE_ID, ident, tps, args, sugar)
+    fn mk_method_call(&mut self, ident: Ident, tps: ~[P<Ty>], args: ~[@Expr]) -> ast::Expr_ {
+        ExprMethodCall(ast::DUMMY_NODE_ID, ident, tps, args)
     }
 
     pub fn mk_index(&mut self, expr: @Expr, idx: @Expr) -> ast::Expr_ {
@@ -1997,7 +1995,7 @@ impl Parser {
                             hi = self.last_span.hi;
 
                             es.unshift(e);
-                            let nd = self.mk_method_call(i, tys, es, NoSugar);
+                            let nd = self.mk_method_call(i, tys, es);
                             e = self.mk_expr(lo, hi, nd);
                         }
                         _ => {
@@ -2022,7 +2020,7 @@ impl Parser {
                 );
                 hi = self.last_span.hi;
 
-                let nd = self.mk_call(e, es, NoSugar);
+                let nd = self.mk_call(e, es);
                 e = self.mk_expr(lo, hi, nd);
               }