aboutsummaryrefslogtreecommitdiff
path: root/ast.h
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2025-03-10 12:42:45 -0400
committerBruce Hill <bruce@bruce-hill.com>2025-03-10 12:42:45 -0400
commit39dd1ca27da9e9d88ee59565df99ee281e1b3632 (patch)
tree107558459d134c052e5e912dceca03d0a0c26aa3 /ast.h
parent806e0d0554a8f619cb5b835e535f5f1022543c1a (diff)
Add `convert` keyword for defining conversions
Diffstat (limited to 'ast.h')
-rw-r--r--ast.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/ast.h b/ast.h
index 2e398125..5ae03bb1 100644
--- a/ast.h
+++ b/ast.h
@@ -129,7 +129,7 @@ typedef enum {
Not, Negative, HeapAllocate, StackReference, Mutexed, Holding,
Min, Max,
Array, Set, Table, TableEntry, Comprehension,
- FunctionDef, Lambda,
+ FunctionDef, Lambda, ConvertDef,
FunctionCall, MethodCall,
Block,
For, While, If, When, Repeat,
@@ -232,6 +232,13 @@ struct ast_s {
arg_ast_t *args;
type_ast_t *ret_type;
ast_t *body;
+ ast_t *cache;
+ bool is_inline;
+ } ConvertDef;
+ struct {
+ arg_ast_t *args;
+ type_ast_t *ret_type;
+ ast_t *body;
int64_t id;
} Lambda;
struct {