diff options
author | A404M <ahmadmahmoudiprogrammer@gmail.com> | 2025-04-07 10:31:58 +0330 |
---|---|---|
committer | A404M <ahmadmahmoudiprogrammer@gmail.com> | 2025-04-07 10:31:58 +0330 |
commit | 4ec0e96e32a271ff59099aa6bb4233b107195ccd (patch) | |
tree | e681c13aec21459040ac54444203e337c58e11fe /src/compiler/ast-tree.h | |
parent | b5772e1c6961dd4b99b91b060b57584d4868aa2b (diff) |
add struct + struct values + access by dot
Diffstat (limited to 'src/compiler/ast-tree.h')
-rw-r--r-- | src/compiler/ast-tree.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/compiler/ast-tree.h b/src/compiler/ast-tree.h index fdc797e..d8e9f9a 100644 --- a/src/compiler/ast-tree.h +++ b/src/compiler/ast-tree.h @@ -43,6 +43,7 @@ typedef enum AstTreeToken { AST_TREE_TOKEN_VALUE_INT, AST_TREE_TOKEN_VALUE_FLOAT, AST_TREE_TOKEN_VALUE_BOOL, + AST_TREE_TOKEN_VALUE_OBJECT, AST_TREE_TOKEN_OPERATOR_ASSIGN, AST_TREE_TOKEN_OPERATOR_PLUS, @@ -156,6 +157,10 @@ typedef f128 AstTreeFloat; typedef bool AstTreeBool; +typedef struct AstTreeObject { + AstTreeVariables variables; +} AstTreeObject; + typedef AstTree AstTreeSingleChild; typedef struct AstTreeInfix { @@ -291,6 +296,7 @@ bool setTypesValueInt(AstTree *tree, AstTreeSetTypesHelper helper); bool setTypesValueFloat(AstTree *tree, AstTreeSetTypesHelper helper); bool setTypesValueNull(AstTree *tree, AstTreeSetTypesHelper helper); bool setTypesValueUndefined(AstTree *tree, AstTreeSetTypesHelper helper); +bool setTypesValueObject(AstTree *tree, AstTreeSetTypesHelper helper); bool setTypesFunction(AstTree *tree, AstTreeSetTypesHelper helper); bool setTypesPrintU64(AstTree *tree, AstTreeSetTypesHelper helper); bool setTypesReturn(AstTree *tree, AstTreeSetTypesHelper helper, @@ -320,5 +326,3 @@ bool setTypesOperatorAccess(AstTree *tree, AstTreeSetTypesHelper helper); bool setTypesAstVariable(AstTreeVariable *variable, AstTreeSetTypesHelper helper); bool setTypesAstInfix(AstTreeInfix *infix, AstTreeSetTypesHelper helper); - -size_t sizeOfType(AstTree *type); |