mirror of
https://github.com/DarkPlacesEngine/gmqcc.git
synced 2025-03-28 05:21:22 +00:00
A comment/note/hint about how to deal with not-yet declared things later in past-0.2
This commit is contained in:
parent
951c37cc71
commit
90419eb13c
1 changed files with 10 additions and 0 deletions
10
ast.h
10
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;
|
||||
|
|
Loading…
Reference in a new issue