about summary refs log tree commit diff
path: root/src/libsyntax/parse/classify.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2014-07-09 08:46:35 +0000
committerbors <bors@rust-lang.org>2014-07-09 08:46:35 +0000
commitad3eda123a00b3ddf8897295ff26d97ba7c64d44 (patch)
tree0cb4cd8360a223b72c5ce0bc3e3701786a381bd4 /src/libsyntax/parse/classify.rs
parent5716abe3f019ab7d9c8cdde9879332040191cf88 (diff)
parent69a0cdf49195d2bc042b44f75e309eb280bcc475 (diff)
downloadrust-ad3eda123a00b3ddf8897295ff26d97ba7c64d44.tar.gz
rust-ad3eda123a00b3ddf8897295ff26d97ba7c64d44.zip
auto merge of #15339 : cmr/rust/rewrite-lexer2, r=huonw
Mostly minor things that rebasing is becoming painful.
Diffstat (limited to 'src/libsyntax/parse/classify.rs')
-rw-r--r--src/libsyntax/parse/classify.rs20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/libsyntax/parse/classify.rs b/src/libsyntax/parse/classify.rs
index 8d9cc305c26..516f22cdf4d 100644
--- a/src/libsyntax/parse/classify.rs
+++ b/src/libsyntax/parse/classify.rs
@@ -15,13 +15,13 @@
 use ast;
 use std::gc::Gc;
 
-// does this expression require a semicolon to be treated
-// as a statement? The negation of this: 'can this expression
-// be used as a statement without a semicolon' -- is used
-// as an early-bail-out in the parser so that, for instance,
-// 'if true {...} else {...}
-//  |x| 5 '
-// isn't parsed as (if true {...} else {...} | x) | 5
+/// Does this expression require a semicolon to be treated
+/// as a statement? The negation of this: 'can this expression
+/// be used as a statement without a semicolon' -- is used
+/// as an early-bail-out in the parser so that, for instance,
+///     if true {...} else {...}
+///      |x| 5
+/// isn't parsed as (if true {...} else {...} | x) | 5
 pub fn expr_requires_semi_to_be_stmt(e: Gc<ast::Expr>) -> bool {
     match e.node {
         ast::ExprIf(..)
@@ -41,9 +41,9 @@ pub fn expr_is_simple_block(e: Gc<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.
+/// 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 {
     return match stmt.node {
         ast::StmtDecl(d, _) => {