about summary refs log tree commit diff
path: root/src/libsyntax/parse/classify.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2013-09-03 04:36:03 -0700
committerbors <bors@rust-lang.org>2013-09-03 04:36:03 -0700
commitd252d810fc2a52c148be409b5b3628e1173a6390 (patch)
tree2f16c081b9b95e6d50dda94e3ba6c8b96627a500 /src/libsyntax/parse/classify.rs
parent8183c74ec1f4747986eb177d7d93bee4c622b0b7 (diff)
parent74190853373c7963d933e2fb5c2ac2f761fdbc02 (diff)
downloadrust-d252d810fc2a52c148be409b5b3628e1173a6390.tar.gz
rust-d252d810fc2a52c148be409b5b3628e1173a6390.zip
auto merge of #8939 : Kimundi/rust/master, r=huonw
Diffstat (limited to 'src/libsyntax/parse/classify.rs')
-rw-r--r--src/libsyntax/parse/classify.rs40
1 files changed, 20 insertions, 20 deletions
diff --git a/src/libsyntax/parse/classify.rs b/src/libsyntax/parse/classify.rs
index 0bf87f10597..a4df5f4a5fc 100644
--- a/src/libsyntax/parse/classify.rs
+++ b/src/libsyntax/parse/classify.rs
@@ -21,25 +21,25 @@ use ast;
 // 'if true {...} else {...}
 //  |x| 5 '
 // isn't parsed as (if true {...} else {...} | x) | 5
-pub fn expr_requires_semi_to_be_stmt(e: @ast::expr) -> bool {
+pub fn expr_requires_semi_to_be_stmt(e: @ast::Expr) -> bool {
     match e.node {
-      ast::expr_if(*)
-      | ast::expr_match(*)
-      | ast::expr_block(_)
-      | ast::expr_while(*)
-      | ast::expr_loop(*)
-      | ast::expr_for_loop(*)
-      | ast::expr_call(_, _, ast::DoSugar)
-      | ast::expr_call(_, _, ast::ForSugar)
-      | ast::expr_method_call(_, _, _, _, _, ast::DoSugar)
-      | ast::expr_method_call(_, _, _, _, _, ast::ForSugar) => false,
+      ast::ExprIf(*)
+      | ast::ExprMatch(*)
+      | ast::ExprBlock(_)
+      | ast::ExprWhile(*)
+      | ast::ExprLoop(*)
+      | ast::ExprForLoop(*)
+      | ast::ExprCall(_, _, ast::DoSugar)
+      | ast::ExprCall(_, _, ast::ForSugar)
+      | ast::ExprMethodCall(_, _, _, _, _, ast::DoSugar)
+      | ast::ExprMethodCall(_, _, _, _, _, ast::ForSugar) => false,
       _ => true
     }
 }
 
-pub fn expr_is_simple_block(e: @ast::expr) -> bool {
+pub fn expr_is_simple_block(e: @ast::Expr) -> bool {
     match e.node {
-        ast::expr_block(
+        ast::ExprBlock(
             ast::Block { rules: ast::DefaultBlock, _ }
         ) => true,
       _ => false
@@ -49,16 +49,16 @@ pub fn expr_is_simple_block(e: @ast::expr) -> bool {
 // this statement requires a semicolon after it.
 // note that in one case (stmt_semi), we've already
 // seen the semicolon, and thus don't need another.
-pub fn stmt_ends_with_semi(stmt: &ast::stmt) -> bool {
+pub fn stmt_ends_with_semi(stmt: &ast::Stmt) -> bool {
     return match stmt.node {
-        ast::stmt_decl(d, _) => {
+        ast::StmtDecl(d, _) => {
             match d.node {
-                ast::decl_local(_) => true,
-                ast::decl_item(_) => false
+                ast::DeclLocal(_) => true,
+                ast::DeclItem(_) => false
             }
         }
-        ast::stmt_expr(e, _) => { expr_requires_semi_to_be_stmt(e) }
-        ast::stmt_semi(*) => { false }
-        ast::stmt_mac(*) => { false }
+        ast::StmtExpr(e, _) => { expr_requires_semi_to_be_stmt(e) }
+        ast::StmtSemi(*) => { false }
+        ast::StmtMac(*) => { false }
     }
 }