From 79b34b37171b403fdd63c06eb957122726468ddd Mon Sep 17 00:00:00 2001 From: Thomas Leonard Date: Wed, 17 Sep 2008 16:53:58 +0100 Subject: [PATCH] "static if (X)" to "static if X" --- dmd/parse.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/dmd/parse.c b/dmd/parse.c index f8536ba..ca49558 100644 --- a/dmd/parse.c +++ b/dmd/parse.c @@ -750,16 +750,10 @@ Condition *Parser::parseStaticIfCondition() Loc loc = this->loc; nextToken(); - if (token.value == TOKlparen) - { - nextToken(); - exp = parseAssignExp(); - check(TOKrparen); - } - else - { error("(expression) expected following static if"); - exp = NULL; - } + checkLParen(); + exp = parseAssignExp(); + checkRParen(); + condition = new StaticIfCondition(loc, exp); return condition; } -- 2.11.4.GIT