mirror of
https://github.com/DarkPlacesEngine/gmqcc.git
synced 2025-02-20 18:32:01 +00:00
again with the comments...
This commit is contained in:
parent
3fab06941a
commit
290d065a79
2 changed files with 3 additions and 4 deletions
4
ast.c
4
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;
|
||||
|
|
3
parser.c
3
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;
|
||||
|
|
Loading…
Reference in a new issue