1
Fork 0

Rollup merge of #34316 - jseyfried:refactor_ast_stmt, r=eddyb

Refactor away `ast::Decl`, refactor `ast::Stmt`, and rename `ast::ExprKind::Again` to `ast::ExprKind::Continue`.
This commit is contained in:
Jeffrey Seyfried 2016-06-26 02:16:55 +00:00
commit 8748cd92d0
23 changed files with 331 additions and 409 deletions

View file

@ -844,7 +844,7 @@ mod tests {
#[test] fn parse_stmt_1 () {
assert!(string_to_stmt("b;".to_string()) ==
Some(Spanned{
Some(ast::Stmt {
node: ast::StmtKind::Expr(P(ast::Expr {
id: ast::DUMMY_NODE_ID,
node: ast::ExprKind::Path(None, ast::Path {
@ -858,8 +858,8 @@ mod tests {
),
}),
span: sp(0,1),
attrs: None}),
ast::DUMMY_NODE_ID),
attrs: None})),
id: ast::DUMMY_NODE_ID,
span: sp(0,1)}))
}
@ -935,7 +935,7 @@ mod tests {
}
},
P(ast::Block {
stmts: vec!(Spanned{
stmts: vec!(ast::Stmt {
node: ast::StmtKind::Semi(P(ast::Expr{
id: ast::DUMMY_NODE_ID,
node: ast::ExprKind::Path(None,
@ -953,8 +953,8 @@ mod tests {
),
}),
span: sp(17,18),
attrs: None,}),
ast::DUMMY_NODE_ID),
attrs: None,})),
id: ast::DUMMY_NODE_ID,
span: sp(17,19)}),
expr: None,
id: ast::DUMMY_NODE_ID,