#define ast_ctx(node) (((ast_node*)(node))->context)
#define ast_side_effects(node) (((ast_node*)(node))->side_effects)
#define ast_ctx(node) (((ast_node*)(node))->context)
#define ast_side_effects(node) (((ast_node*)(node))->side_effects)
* type `expression`, so the ast_ident's codegen would search for
* variables through the environment (or functions, constants...).
*/
* type `expression`, so the ast_ident's codegen would search for
* variables through the environment (or functions, constants...).
*/
ast_value* ast_value_copy(const ast_value *self);
/* This will NOT delete an underlying ast_function */
void ast_value_delete(ast_value*);
ast_value* ast_value_copy(const ast_value *self);
/* This will NOT delete an underlying ast_function */
void ast_value_delete(ast_value*);
* An assignment including a binary expression with the source as left operand.
* Eg. a += b; is a binstore { INSTR_STORE, INSTR_ADD, a, b }
*/
* An assignment including a binary expression with the source as left operand.
* Eg. a += b; is a binstore { INSTR_STORE, INSTR_ADD, a, b }
*/
* For this we will have to extend the codegen() functions with
* a flag saying whether or not we need an L or an R-value.
*/
* For this we will have to extend the codegen() functions with
* a flag saying whether or not we need an L or an R-value.
*/
/* The entity can come from an expression of course. */
ast_expression *entity;
/* As can the field, it just must result in a value of TYPE_FIELD */
/* The entity can come from an expression of course. */
ast_expression *entity;
/* As can the field, it just must result in a value of TYPE_FIELD */
* In any case, accessing an element via a compiletime-constant index will
* result in quick access to that variable.
*/
* In any case, accessing an element via a compiletime-constant index will
* result in quick access to that variable.
*/
- * A general 'if then else' statement, either side can be NULL and will
- * thus be omitted. It is an error for *both* cases to be NULL at once.
+ * A general 'if then else' statement, either side can be nullptr and will
+ * thus be omitted. It is an error for *both* cases to be nullptr at once.
*
* This is the only ast_node beside ast_value which contains
* an ir_value. Theoretically we don't need to remember it though.
*/
*
* This is the only ast_node beside ast_value which contains
* an ir_value. Theoretically we don't need to remember it though.
*/
* Additionally it contains a list of ast_expressions as parameters.
* Since calls can return values, an ast_call is also an ast_expression.
*/
* Additionally it contains a list of ast_expressions as parameters.
* Since calls can return values, an ast_call is also an ast_expression.
*/
/* number of static variables, by convention this includes the
* ones without the count-suffix - remember this when dealing
* with savegames. uint instead of size_t as %zu in printf is
/* number of static variables, by convention this includes the
* ones without the count-suffix - remember this when dealing
* with savegames. uint instead of size_t as %zu in printf is
/* in order for thread safety - for the optional
* channel abesed multithreading... keeping a buffer
* here to use in ast_function_label.
*/
/* in order for thread safety - for the optional
* channel abesed multithreading... keeping a buffer
* here to use in ast_function_label.
*/