diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2024-08-11 14:47:34 -0400 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2024-08-11 14:47:34 -0400 |
| commit | 2ecb5fe885042ca6c25ee0a3e3da070ddec9e07e (patch) | |
| tree | cdd7c7d1d51982d4074f76a1bccc522fbc8b5eee /ast.h | |
| parent | 3bf8ea8e12a2728bf63968ca7b42359b089e318b (diff) | |
Add channels and threads
Diffstat (limited to 'ast.h')
| -rw-r--r-- | ast.h | 10 |
1 files changed, 7 insertions, 3 deletions
@@ -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 { |
