From 5679f5c55e15e4a42542c36b1abc86b469903d19 Mon Sep 17 00:00:00 2001 From: Lindsey Kuper Date: Fri, 13 May 2011 17:26:14 -0700 Subject: 'with' no longer a token; whitespace police. Plus renaming the anonymous objects test to a more descriptive name, and XFAILing it because it doesn't work yet. --- src/comp/front/parser.rs | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) (limited to 'src/comp/front/parser.rs') diff --git a/src/comp/front/parser.rs b/src/comp/front/parser.rs index 8eb6c398..767e7e93 100644 --- a/src/comp/front/parser.rs +++ b/src/comp/front/parser.rs @@ -801,15 +801,11 @@ fn parse_bottom_expr(parser p) -> @ast::expr { expect(p, token::LBRACE); while (p.peek() != token::RBRACE) { - alt (p.peek()) { - case (token::WITH) { - p.bump(); - with_obj = some[ast::ident](parse_ident(p)); - } - case (_) { - _vec::push[@ast::method](meths, - parse_method(p)); - } + if (eat_word(p, "with")) { + with_obj = some[ast::ident](parse_ident(p)); + } else { + _vec::push[@ast::method](meths, + parse_method(p)); } } -- cgit v1.2.3