From: Wolfgang (Blub) Bumiller Date: Wed, 31 Oct 2012 17:55:03 +0000 (+0100) Subject: A comment/note/hint about how to deal with not-yet declared things later in past-0.2 X-Git-Tag: 0.1-rc1~4 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=90419eb13c0362f3bf10eb365c4c14796582dcc1;p=xonotic%2Fgmqcc.git A comment/note/hint about how to deal with not-yet declared things later in past-0.2 --- 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;