]> git.xonotic.org Git - xonotic/gmqcc.git/blobdiff - ast.h
Update
[xonotic/gmqcc.git] / ast.h
diff --git a/ast.h b/ast.h
index 1c4574a57182143982355403ae03c96ab1dcb566..3df25e859b5ace2093365818ee616cd2de2f257b 100644 (file)
--- a/ast.h
+++ b/ast.h
@@ -51,6 +51,7 @@ typedef struct ast_breakcont_s   ast_breakcont;
 typedef struct ast_switch_s      ast_switch;
 typedef struct ast_label_s       ast_label;
 typedef struct ast_goto_s        ast_goto;
+typedef struct ast_argpipe_s     ast_argpipe;
 
 enum {
     TYPE_ast_node,        /*  0 */
@@ -73,7 +74,8 @@ enum {
     TYPE_ast_breakcont,   /* 17 */
     TYPE_ast_switch,      /* 18 */
     TYPE_ast_label,       /* 19 */
-    TYPE_ast_goto         /* 20 */
+    TYPE_ast_goto,        /* 20 */
+    TYPE_ast_argpipe      /* 21 */
 };
 
 #define ast_istype(x, t) ( ((ast_node*)x)->nodetype == (TYPE_##t) )
@@ -229,6 +231,7 @@ void ast_type_adopt_impl(ast_expression *self, const ast_expression *other);
 void ast_type_to_string(ast_expression *e, char *buf, size_t bufsize);
 
 typedef enum ast_binary_ref_s {
+    AST_REF_NONE  = 0,
     AST_REF_LEFT  = 1 << 1,
     AST_REF_RIGHT = 1 << 2,
     AST_REF_ALL   = (AST_REF_LEFT | AST_REF_RIGHT)
@@ -365,6 +368,17 @@ struct ast_array_index_s
 };
 ast_array_index* ast_array_index_new(lex_ctx ctx, ast_expression *array, ast_expression *index);
 
+/* Vararg pipe node:
+ *
+ * copy all varargs starting from a specific index
+ */
+struct ast_argpipe_s
+{
+    ast_expression        expression;
+    ast_expression *index;
+};
+ast_argpipe* ast_argpipe_new(lex_ctx ctx, ast_expression *index);
+
 /* Store
  *
  * Stores left<-right and returns left.
@@ -555,7 +569,7 @@ struct ast_call_s
 };
 ast_call* ast_call_new(lex_ctx ctx,
                        ast_expression *funcexpr);
-bool ast_call_check_types(ast_call*);
+bool ast_call_check_types(ast_call*, ast_expression *this_func_va_type);
 
 /* Blocks
  *