aboutsummaryrefslogtreecommitdiff
path: root/ast.h
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2024-08-11 14:47:34 -0400
committerBruce Hill <bruce@bruce-hill.com>2024-08-11 14:47:34 -0400
commit2ecb5fe885042ca6c25ee0a3e3da070ddec9e07e (patch)
treecdd7c7d1d51982d4074f76a1bccc522fbc8b5eee /ast.h
parent3bf8ea8e12a2728bf63968ca7b42359b089e318b (diff)
Add channels and threads
Diffstat (limited to 'ast.h')
-rw-r--r--ast.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/ast.h b/ast.h
index 41760e38..15c41d81 100644
--- a/ast.h
+++ b/ast.h
@@ -58,6 +58,7 @@ typedef enum {
PointerTypeAST,
ArrayTypeAST,
SetTypeAST,
+ ChannelTypeAST,
TableTypeAST,
FunctionTypeAST,
} type_ast_e;
@@ -85,7 +86,7 @@ struct type_ast_s {
} PointerTypeAST;
struct {
type_ast_t *item;
- } ArrayTypeAST;
+ } ArrayTypeAST, ChannelTypeAST;
struct {
type_ast_t *key, *value;
} TableTypeAST;
@@ -108,7 +109,7 @@ typedef enum {
BinaryOp, UpdateAssign,
Length, Not, Negative, HeapAllocate, StackReference,
Min, Max,
- Array, Set, Table, TableEntry, Comprehension,
+ Array, Channel, Set, Table, TableEntry, Comprehension,
FunctionDef, Lambda,
FunctionCall, MethodCall,
Block,
@@ -178,11 +179,14 @@ struct ast_s {
ast_t *lhs, *rhs, *key;
} Min, Max;
struct {
- type_ast_t *type;
+ type_ast_t *item_type;
ast_list_t *items;
} Array;
struct {
type_ast_t *item_type;
+ } Channel;
+ struct {
+ type_ast_t *item_type;
ast_list_t *items;
} Set;
struct {