]> git.xonotic.org Git - xonotic/gmqcc.git/blobdiff - ast.h
Some allocator changes (still doesn't work)
[xonotic/gmqcc.git] / ast.h
diff --git a/ast.h b/ast.h
index 0c41d1f06ef5ee9a7484dc7e0f4b86266e4b415d..725f123cec9f45156cf5d29e229ee1ae93c13899 100644 (file)
--- a/ast.h
+++ b/ast.h
@@ -100,6 +100,16 @@ typedef bool ast_expression_codegen(ast_expression*,
                                     ast_function*,
                                     bool lvalue,
                                     ir_value**);
+/* TODO: the codegen function should take an output-type parameter
+ * indicating whether a variable, type, label etc. is expected, and
+ * an environment!
+ * Then later an ast_ident could have a codegen using this to figure
+ * out what to look for.
+ * eg. in code which uses a not-yet defined variable, the expression
+ * would take an ast_ident, and the codegen would be called with
+ * type `expression`, so the ast_ident's codegen would search for
+ * variables through the environment (or functions, constants...).
+ */
 typedef struct
 {
     ast_node_common         node;