]> git.xonotic.org Git - xonotic/gmqcc.git/commitdiff
again with the comments...
authorWolfgang Bumiller <wry.git@bumiller.com>
Sat, 15 Jun 2013 07:49:15 +0000 (09:49 +0200)
committerWolfgang Bumiller <wry.git@bumiller.com>
Sat, 15 Jun 2013 07:49:15 +0000 (09:49 +0200)
ast.c
parser.c

diff --git a/ast.c b/ast.c
index 5ac62832e7871df05c23c829941636d5e49d75de..f814847714d5d158ed8ebd15a5bd87a3d1cfd1dc 100644 (file)
--- 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;
index c9717b077eb5926f4fc8a743216f54782bb51b3c..5f27112097d925c0907e71fcc0fba6bf27144851 100644 (file)
--- 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;