]> git.xonotic.org Git - xonotic/gmqcc.git/blobdiff - ast.h
Update to 0.3.0 (improved new package: gmqpak)
[xonotic/gmqcc.git] / ast.h
diff --git a/ast.h b/ast.h
index d3dfdb21273ab1bc56e18ac491a6dd9428969db5..c759a48e95cd2d8098759dec9c5c03835fe9d5e9 100644 (file)
--- a/ast.h
+++ b/ast.h
@@ -52,7 +52,6 @@ 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;
-typedef struct ast_intrinsic_s   ast_intrinsic;
 
 enum {
     TYPE_ast_node,        /*  0 */
@@ -76,8 +75,7 @@ enum {
     TYPE_ast_switch,      /* 18 */
     TYPE_ast_label,       /* 19 */
     TYPE_ast_goto,        /* 20 */
-    TYPE_ast_argpipe,     /* 21 */
-    TYPE_ast_intrinsic    /* 22 */
+    TYPE_ast_argpipe      /* 21 */
 };
 
 #define ast_istype(x, t) ( ((ast_node*)x)->nodetype == (TYPE_##t) )
@@ -157,9 +155,10 @@ struct ast_expression_common
 #define AST_FLAG_INCLUDE_DEF  (1<<5)
 #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<<8)
+#define AST_FLAG_ARRAY_INIT   (1<<9)
 #define AST_FLAG_TYPE_MASK (AST_FLAG_VARIADIC | AST_FLAG_NORETURN)
 
 /* Value
@@ -209,6 +208,9 @@ struct ast_value_s
     /* ONLY for arrays in progs version up to 6 */
     ast_value *setter;
     ast_value *getter;
+
+
+    bool      intrinsic; /* true if associated with intrinsic */
 };
 
 ast_value* ast_value_new(lex_ctx_t ctx, const char *name, int qctype);
@@ -253,7 +255,7 @@ struct ast_binary_s
     ast_expression *left;
     ast_expression *right;
     ast_binary_ref  refs;
-
+    bool            right_first;
 };
 ast_binary* ast_binary_new(lex_ctx_t    ctx,
                            int        op,