From: Wolfgang (Blub) Bumiller Date: Sun, 25 Nov 2012 17:23:48 +0000 (+0100) Subject: update noops flag while parsing a translatable string X-Git-Tag: 0.1.9~255 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=66317aaef958cc2c7d210a5793b137e1b61fe5ef;p=xonotic%2Fgmqcc.git update noops flag while parsing a translatable string --- diff --git a/parser.c b/parser.c index f669b37..6ccd5e2 100644 --- a/parser.c +++ b/parser.c @@ -1313,10 +1313,12 @@ static ast_expression* parse_expression_leave(parser_t *parser, bool stopatcomma goto onerr; } + parser->lex->flags.noops = true; if (!parser_next(parser) || parser->tok != '(') { parseerror(parser, "use _(\"string\") to create a translatable string constant"); goto onerr; } + parser->lex->flags.noops = false; if (!parser_next(parser) || parser->tok != TOKEN_STRINGCONST) { parseerror(parser, "expected a constant string in translatable-string extension"); goto onerr;