aboutsummaryrefslogtreecommitdiff
path: root/include/cu
diff options
context:
space:
mode:
Diffstat (limited to 'include/cu')
-rw-r--r--include/cu/ast.h7
-rw-r--r--include/cu/scope.h1
2 files changed, 8 insertions, 0 deletions
diff --git a/include/cu/ast.h b/include/cu/ast.h
index f9e8492..44850b6 100644
--- a/include/cu/ast.h
+++ b/include/cu/ast.h
@@ -115,6 +115,7 @@ enum ast_type_kind {
AST_TYPE_LAMBDA,
AST_TYPE_PROC,
AST_TYPE_STRUCT,
+ AST_TYPE_GENERIC,
AST_TYPE_ENUM,
AST_TYPE_SIGN,
};
@@ -140,6 +141,7 @@ enum ast_flag {
AST_FLAG_INIT = (1 << 10),
AST_FLAG_MEMBER = (1 << 11),
AST_FLAG_SHARED = (1 << 12),
+ AST_FLAG_GENERIC = (1 << 13),
};
struct ast_node;
@@ -310,6 +312,11 @@ struct ast_type {
struct {
struct ast_node *id;
+ struct ast_node *args;
+ } generic;
+
+ struct {
+ struct ast_node *id;
struct ast_node *impls;
} struc;
diff --git a/include/cu/scope.h b/include/cu/scope.h
index d8fd2c4..a325fcb 100644
--- a/include/cu/scope.h
+++ b/include/cu/scope.h
@@ -72,6 +72,7 @@ struct scope {
/* types */
/* TODO: add actualized types maybe? */
struct visible *enums;
+ struct visible *unions;
struct visible *structs;
struct visible *aliases;
struct visible *builtins;