From 483530dcffb02774c9b043a20b7ab0cf9a86ceaa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Minisini?= Date: Mon, 19 Jul 2010 09:53:34 +0000 Subject: [PATCH] [COMPILER] * BUG: Be less tolerant with newlines in CASE expressions. git-svn-id: svn://localhost/gambas/trunk@3045 867c0c6c-44f3-4631-809d-bfa615b0a4ec --- main/gbc/gbc_trans_ctrl.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/main/gbc/gbc_trans_ctrl.c b/main/gbc/gbc_trans_ctrl.c index 1a0de67df..314bb8e32 100644 --- a/main/gbc/gbc_trans_ctrl.c +++ b/main/gbc/gbc_trans_ctrl.c @@ -695,6 +695,9 @@ void TRANS_case(void) if (i > MAX_CASE_EXPR) THROW("Too many expressions in CASE"); + if (PATTERN_is_newline_end(*JOB->current)) + THROW("Unexpected end of line"); + /*CODE_dup(); TRANS_expression(FALSE); CODE_op(C_EQ, 2);*/