Polymorphs nested structs

This commit is contained in:
Krzosa Karol
2023-04-01 14:31:41 +02:00
parent 2c19658115
commit 3d438645a0
7 changed files with 48 additions and 23 deletions

View File

@@ -358,11 +358,13 @@ enum {
AST_VAR_IS_CONST = 1 << 12,
AST_OPERATOR_OVERLOAD = 1 << 13,
AST_IS_LVALUE = 1 << 14,
AST_IDENT_POLYMORPH = 1 << 15,
AST_TYPE_POLYMORPH = 1 << 16,
AST_POLYMORPH = AST_IDENT_POLYMORPH | AST_TYPE_POLYMORPH,
AST_PARENT_POLYMORPH = 1 << 17,
AST_TYPESPEC = 1 << 17,
AST_TYPESPEC = 1 << 18,
};
struct Ast {
@@ -509,7 +511,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,