From 16faef2218ec5c3621079f04e6b093a5bb1b44c2 Mon Sep 17 00:00:00 2001 From: Graydon Hoare Date: Thu, 4 Nov 2010 07:55:33 -0700 Subject: Fix buggy while and do-while translation in rustc. Add test. --- src/comp/front/parser.rs | 1 + 1 file changed, 1 insertion(+) (limited to 'src/comp/front') diff --git a/src/comp/front/parser.rs b/src/comp/front/parser.rs index 97742a18..d42f7b45 100644 --- a/src/comp/front/parser.rs +++ b/src/comp/front/parser.rs @@ -636,6 +636,7 @@ impure fn parse_do_while_expr(parser p) -> @ast.expr { expect (p, token.LPAREN); auto cond = parse_expr(p); expect(p, token.RPAREN); + expect(p, token.SEMI); hi = cond.span; ret @spanned(lo, hi, ast.expr_do_while(body, cond, ast.ann_none)); } -- cgit v1.2.3