Core: Remove AST_Tuple, repurpose VAR_UNPACK (buggy probably)

This commit is contained in:
Krzosa Karol
2023-04-21 22:49:15 +02:00
parent 108ec6121e
commit bbd8b0ab91
12 changed files with 92 additions and 238 deletions

View File

@@ -218,7 +218,6 @@ enum Ast_Type_Kind {
TYPE_ENUM,
TYPE_TYPE,
TYPE_SLICE,
TYPE_TUPLE,
TYPE_COMPLETING,
TYPE_INCOMPLETE,
@@ -509,7 +508,7 @@ struct Ast_Builtin : Ast_Expr {
struct Ast_Return : Ast {
Ast_Type *resolved_type;
Array<Ast_Expr *> expr;
Ast_Expr *expr;
};
struct Ast_If_Node : Ast {
@@ -538,16 +537,7 @@ struct Ast_For : Ast {
struct Ast_Lambda : Ast_Expr {
Array<Ast_Decl *> args;
// :Multiple arguments
// @todo: maybe disallow multiple arguments in current form
// and use polimorphism. Then we could make var unpacking,
// unpack structs making it more powerful
// @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_Expr *ret;
Ast_Scope *scope;
};