From f17a3421e01399bcc1a6f8540273d7b4440397a1 Mon Sep 17 00:00:00 2001 From: Brian Anderson Date: Wed, 9 Feb 2011 22:36:37 -0500 Subject: Cleanup for 'be' statement and comments about future typestate --- src/comp/front/parser.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/comp/front/parser.rs') diff --git a/src/comp/front/parser.rs b/src/comp/front/parser.rs index a1b519ba..ea4cf12c 100644 --- a/src/comp/front/parser.rs +++ b/src/comp/front/parser.rs @@ -1203,7 +1203,13 @@ impure fn parse_stmt(parser p) -> @ast.stmt { case (token.BE) { p.bump(); auto e = parse_expr(p); - ret @spanned(lo, e.span, ast.stmt_be(e)); + // FIXME: Is this the right place for this check? + if /*check*/ (ast.is_call_expr(e)) { + ret @spanned(lo, e.span, ast.stmt_be(e)); + } + else { + p.err("Non-call expression in tail call"); + } } case (token.LET) { -- cgit v1.2.3