From 323009300c4f9c5f0c6dae0819dfed5a418834b0 Mon Sep 17 00:00:00 2001 From: Thomas Leonard Date: Fri, 26 Sep 2008 21:02:34 +0100 Subject: [PATCH] Fixed parsing of mixin expressions. Note: content is interpreted as D code, not Delight. --- dmd/parse.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/dmd/parse.c b/dmd/parse.c index 1ce9f0b..5b0c407 100644 --- a/dmd/parse.c +++ b/dmd/parse.c @@ -2782,7 +2782,13 @@ Statement *Parser::parseStatement(int flags) check(TOKlparen, "mixin"); Expression *e = parseAssignExp(); check(TOKrparen); - check(TOKsemicolon); + if (dltSyntax) { + if (token.value != TOKsemicolon && token.value != TOKendline) { + error("expected newline after mixin(), not '%s'", token.toChars()); + } + } else { + check(TOKsemicolon); + } s = new CompileStatement(loc, e); break; } -- 2.11.4.GIT