]> git.xonotic.org Git - xonotic/gmqcc.git/blobdiff - ast.h
Implemented [[accumulate]] attribute. This will hopefully be used by Xonotic to repla...
[xonotic/gmqcc.git] / ast.h
diff --git a/ast.h b/ast.h
index 05a749ae8e106715dc8569d929b897c232162d41..5d198e4f92ea4659992e2e26fa219318b7b862eb 100644 (file)
--- a/ast.h
+++ b/ast.h
@@ -156,10 +156,13 @@ struct ast_expression_common
 #define AST_FLAG_IS_VARARG    (1<<6)
 #define AST_FLAG_ALIAS        (1<<7)
 #define AST_FLAG_ERASEABLE    (1<<8)
-/* An array declared as []
- * so that the size is taken from the initializer */
-#define AST_FLAG_ARRAY_INIT   (1<<9)
-#define AST_FLAG_TYPE_MASK (AST_FLAG_VARIADIC | AST_FLAG_NORETURN)
+#define AST_FLAG_ACCUMULATE   (1<<9)
+/*
+ * An array declared as []
+ * so that the size is taken from the initializer
+ */
+#define AST_FLAG_ARRAY_INIT   (1<<10)
+#define AST_FLAG_TYPE_MASK    (AST_FLAG_VARIADIC | AST_FLAG_NORETURN)
 
 /* Value
  *
@@ -614,6 +617,10 @@ struct ast_function_s
 
     int builtin;
 
+    /* function accumulation */
+    ast_function *accumulate;    /* pointer to the next function in the chain */
+    size_t        accumulation;  /* base functions # of accumulations         */
+
     ir_function *ir_func;
     ir_block    *curblock;
     ir_block    **breakblocks;