From: Wolfgang (Blub) Bumiller Date: Fri, 30 Nov 2012 13:42:18 +0000 (+0100) Subject: lex_ctx of a return will be at the return keyword now X-Git-Tag: 0.1.9~180 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=535fd5744b9a03fa8f2e8ee65976b173f125338c;p=xonotic%2Fgmqcc.git lex_ctx of a return will be at the return keyword now --- diff --git a/parser.c b/parser.c index 3fb9111..c13fb89 100644 --- a/parser.c +++ b/parser.c @@ -2046,6 +2046,8 @@ static bool parse_return(parser_t *parser, ast_block *block, ast_expression **ou ast_return *ret = NULL; ast_value *expected = parser->function->vtype; + lex_ctx ctx = parser_ctx(parser); + (void)block; /* not touching */ if (!parser_next(parser)) { @@ -2076,7 +2078,7 @@ static bool parse_return(parser_t *parser, ast_block *block, ast_expression **ou else parseerror(parser, "return without value"); } - ret = ast_return_new(parser_ctx(parser), NULL); + ret = ast_return_new(ctx, NULL); } *out = (ast_expression*)ret; return true;