From e30d2c82ae44fea5b2e3ecd931020d08f304cf53 Mon Sep 17 00:00:00 2001 From: Lindsey Kuper Date: Wed, 6 Jul 2011 11:29:22 -0700 Subject: Simplify AST for expr_anon_obj. --- src/comp/syntax/parse/parser.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/comp/syntax/parse') diff --git a/src/comp/syntax/parse/parser.rs b/src/comp/syntax/parse/parser.rs index 1e4ca951d07..209ddcc7ff6 100644 --- a/src/comp/syntax/parse/parser.rs +++ b/src/comp/syntax/parse/parser.rs @@ -801,8 +801,7 @@ fn parse_bottom_expr(&parser p) -> @ast::expr { // "spanned". let ast::anon_obj ob = rec(fields=fields, methods=meths, with_obj=with_obj); - auto odid = rec(ty=p.get_id(), ctor=p.get_id()); - ex = ast::expr_anon_obj(ob, ty_params, odid); + ex = ast::expr_anon_obj(ob, ty_params); } else if (eat_word(p, "rec")) { expect(p, token::LPAREN); auto fields = [parse_field(p)]; @@ -1592,7 +1591,7 @@ fn stmt_ends_with_semi(&ast::stmt stmt) -> bool { case (ast::expr_if_check(_, _, _)) { false } case (ast::expr_port(_)) { true } case (ast::expr_chan(_)) { true } - case (ast::expr_anon_obj(_,_,_)) { false } + case (ast::expr_anon_obj(_,_)) { false } case (ast::expr_assert(_)) { true } } } -- cgit 1.4.1-3-g733a5