summaryrefslogtreecommitdiff
path: root/src/compiler/ast-tree.h
diff options
context:
space:
mode:
authorA404M <ahmadmahmoudiprogrammer@gmail.com>2025-04-07 10:31:58 +0330
committerA404M <ahmadmahmoudiprogrammer@gmail.com>2025-04-07 10:31:58 +0330
commit4ec0e96e32a271ff59099aa6bb4233b107195ccd (patch)
treee681c13aec21459040ac54444203e337c58e11fe /src/compiler/ast-tree.h
parentb5772e1c6961dd4b99b91b060b57584d4868aa2b (diff)
add struct + struct values + access by dot
Diffstat (limited to 'src/compiler/ast-tree.h')
-rw-r--r--src/compiler/ast-tree.h8
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);