From: Wolfgang Bumiller Date: Sat, 15 Jun 2013 07:49:15 +0000 (+0200) Subject: again with the comments... X-Git-Tag: v0.3.0~130 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=290d065a7922974be8976e93590b818838550f41;p=xonotic%2Fgmqcc.git again with the comments... --- diff --git a/ast.c b/ast.c index 5ac6283..f814847 100644 --- a/ast.c +++ b/ast.c @@ -1025,7 +1025,7 @@ bool ast_call_check_types(ast_call *self, ast_expression *va_type) for (i = 0; i < count; ++i) { if (ast_istype(self->params[i], ast_argpipe)) { - // warn about type safety instead + /* warn about type safety instead */ if (i+1 != count) { compile_error(ast_ctx(self), "argpipe must be the last parameter to a function call"); return false; @@ -1047,7 +1047,7 @@ bool ast_call_check_types(ast_call *self, ast_expression *va_type) if (count > vec_size(func->params) && func->varparam) { for (; i < count; ++i) { if (ast_istype(self->params[i], ast_argpipe)) { - // warn about type safety instead + /* warn about type safety instead */ if (i+1 != count) { compile_error(ast_ctx(self), "argpipe must be the last parameter to a function call"); return false; diff --git a/parser.c b/parser.c index c9717b0..5f27112 100644 --- a/parser.c +++ b/parser.c @@ -1703,14 +1703,13 @@ static ast_expression* parse_vararg_do(parser_t *parser) ast_expression *idx, *out; ast_value *typevar; ast_value *funtype = parser->function->vtype; + lex_ctx ctx = parser_ctx(parser); if (!parser->function->varargs) { parseerror(parser, "function has no variable argument list"); return NULL; } - lex_ctx ctx = parser_ctx(parser); - if (!parser_next(parser) || parser->tok != '(') { parseerror(parser, "expected parameter index and type in parenthesis"); return NULL;