]> git.xonotic.org Git - xonotic/gmqcc.git/blobdiff - ast.h
the opening paren is now an operator - to fix up the precedence rules, now 'anentity...
[xonotic/gmqcc.git] / ast.h
diff --git a/ast.h b/ast.h
index 780f6a9b52ec6bc6c20037c954d03cbf29815f78..0059e823fa303c0bc895ea3e7d0a7db4c68e8ce1 100644 (file)
--- a/ast.h
+++ b/ast.h
@@ -66,6 +66,7 @@ enum {
 };
 
 #define ast_istype(x, t) ( ((ast_node_common*)x)->nodetype == (TYPE_##t) )
+#define ast_ctx(node) (((ast_node_common*)(node))->context)
 
 /* Node interface with common components
  */
@@ -159,6 +160,8 @@ bool ast_global_codegen(ast_value *self, ir_builder *ir);
 
 bool GMQCC_WARN ast_value_params_add(ast_value*, ast_value*);
 
+bool ast_compare_type(ast_expression *a, ast_expression *b);
+
 /* Binary
  *
  * A value-returning binary expression.
@@ -190,10 +193,11 @@ struct ast_binstore_s
 
     int             opstore;
     int             opbin;
-    ast_expression *left;
-    ast_expression *right;
+    ast_expression *dest;
+    ast_expression *source;
 };
 ast_binstore* ast_binstore_new(lex_ctx    ctx,
+                               int        storeop,
                                int        op,
                                ast_expression *left,
                                ast_expression *right);