diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2025-01-02 20:29:55 -0500 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2025-01-02 20:29:55 -0500 |
| commit | b025cf269d2e07e179be4a0e34d936862dc640c2 (patch) | |
| tree | 6bcce81829436a08dbe4f0101044c0cd07811525 /ast.h | |
| parent | 500e4e1bd74b45476c4df0f4f9da72fbada9bb18 (diff) | |
Use `holding` blocks for mutexed data instead of lambdas
Diffstat (limited to 'ast.h')
| -rw-r--r-- | ast.h | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -78,6 +78,7 @@ typedef enum { TableTypeAST, FunctionTypeAST, OptionalTypeAST, + MutexedTypeAST, } type_ast_e; typedef struct tag_ast_s { @@ -116,7 +117,7 @@ struct type_ast_s { } FunctionTypeAST; struct { type_ast_t *type; - } OptionalTypeAST; + } OptionalTypeAST, MutexedTypeAST; } __data; }; @@ -127,7 +128,7 @@ typedef enum { TextLiteral, TextJoin, PrintStatement, Declare, Assign, BinaryOp, UpdateAssign, - Not, Negative, HeapAllocate, StackReference, Mutexed, + Not, Negative, HeapAllocate, StackReference, Mutexed, Holding, Min, Max, Array, Set, Table, TableEntry, Comprehension, FunctionDef, Lambda, @@ -195,6 +196,9 @@ struct ast_s { ast_t *value; } Not, Negative, HeapAllocate, StackReference, Mutexed; struct { + ast_t *mutexed, *body; + } Holding; + struct { ast_t *lhs, *rhs, *key; } Min, Max; struct { |
