again with the comments...

This commit is contained in:
Wolfgang Bumiller 2013-06-15 09:49:15 +02:00
parent 3fab06941a
commit 290d065a79
2 changed files with 3 additions and 4 deletions

4
ast.c
View file

@ -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;

View file

@ -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;