From 90419eb13c0362f3bf10eb365c4c14796582dcc1 Mon Sep 17 00:00:00 2001 From: "Wolfgang (Blub) Bumiller" Date: Wed, 31 Oct 2012 18:55:03 +0100 Subject: [PATCH] A comment/note/hint about how to deal with not-yet declared things later in past-0.2 --- ast.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/ast.h b/ast.h index 0c41d1f..725f123 100644 --- 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; -- 2.39.2