]> git.xonotic.org Git - xonotic/gmqcc.git/blobdiff - ast.h
Cleanups
[xonotic/gmqcc.git] / ast.h
diff --git a/ast.h b/ast.h
index 95b8962ddab15724979ba111db0e94368117b329..a7d131c1ae3c558807e48b28bff93d5766f031cb 100644 (file)
--- a/ast.h
+++ b/ast.h
@@ -449,11 +449,19 @@ struct ast_loop_s
     ast_expression *postcond;
     ast_expression *increment;
     ast_expression *body;
+    /* For now we allow a seperate flag on whether or not the condition
+     * is supposed to be true or false.
+     * That way, the parser can generate a 'while not(!x)' for `while(x)`
+     * if desired, which is useful for the new -f{true,false}-empty-strings
+     * flag.
+     */
+    bool pre_not;
+    bool post_not;
 };
 ast_loop* ast_loop_new(lex_ctx ctx,
                        ast_expression *initexpr,
-                       ast_expression *precond,
-                       ast_expression *postcond,
+                       ast_expression *precond, bool pre_not,
+                       ast_expression *postcond, bool post_not,
                        ast_expression *increment,
                        ast_expression *body);
 void ast_loop_delete(ast_loop*);