From 290d065a7922974be8976e93590b818838550f41 Mon Sep 17 00:00:00 2001 From: Wolfgang Bumiller Date: Sat, 15 Jun 2013 09:49:15 +0200 Subject: [PATCH] again with the comments... --- ast.c | 4 ++-- parser.c | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) 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; -- 2.39.2