diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2014-05-16 00:16:13 -0700 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2014-06-11 09:11:40 -0700 |
| commit | 53ad426e92f8099a701f3f54c02dc8f069f5939a (patch) | |
| tree | cef835fc4f6319f12bf1c47c90682bdbcf17afac /src/libsyntax/parse/classify.rs | |
| parent | 531ed3d599000de2517cba102c83fe44a1f1e252 (diff) | |
| download | rust-53ad426e92f8099a701f3f54c02dc8f069f5939a.tar.gz rust-53ad426e92f8099a701f3f54c02dc8f069f5939a.zip | |
syntax: Move the AST from @T to Gc<T>
Diffstat (limited to 'src/libsyntax/parse/classify.rs')
| -rw-r--r-- | src/libsyntax/parse/classify.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/libsyntax/parse/classify.rs b/src/libsyntax/parse/classify.rs index b160593b049..8d9cc305c26 100644 --- a/src/libsyntax/parse/classify.rs +++ b/src/libsyntax/parse/classify.rs @@ -13,6 +13,7 @@ // Predicates on exprs and stmts that the pretty-printer and parser use 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 @@ -21,7 +22,7 @@ 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: Gc<ast::Expr>) -> bool { match e.node { ast::ExprIf(..) | ast::ExprMatch(..) @@ -33,7 +34,7 @@ pub fn expr_requires_semi_to_be_stmt(e: @ast::Expr) -> bool { } } -pub fn expr_is_simple_block(e: @ast::Expr) -> bool { +pub fn expr_is_simple_block(e: Gc<ast::Expr>) -> bool { match e.node { ast::ExprBlock(block) => block.rules == ast::DefaultBlock, _ => false |
