Iterator + start to add core to core codegen

This commit is contained in:
Krzosa Karol
2023-03-31 17:38:32 +02:00
parent 1839279235
commit 277404fe95
6 changed files with 198 additions and 61 deletions

View File

@@ -361,6 +361,8 @@ enum {
AST_IDENT_POLYMORPH = 1 << 15,
AST_TYPE_POLYMORPH = 1 << 16,
AST_POLYMORPH = AST_IDENT_POLYMORPH | AST_TYPE_POLYMORPH,
AST_TYPESPEC = 1 << 17,
};
struct Ast {
@@ -505,11 +507,11 @@ struct Ast_For : Ast {
bool is_also_slice_traversal;
};
// @cleanup @refactor: return value shouldn't be a array of expressions.
// It should be a single expression. So probably need a special type
// for that.
struct Ast_Lambda : Ast_Expr {
Array<Ast_Decl *> args;
// @cleanup @refactor: return value shouldn't be a array of expressions.
// It should be a single expression. So probably need a special type
// for that.
Array<Ast_Expr *> ret;
Ast_Scope *scope;
};