diff options
Diffstat (limited to 'src/compiler/ast-tree.h')
-rw-r--r-- | src/compiler/ast-tree.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/compiler/ast-tree.h b/src/compiler/ast-tree.h index d05db7b..ff8529e 100644 --- a/src/compiler/ast-tree.h +++ b/src/compiler/ast-tree.h @@ -61,6 +61,8 @@ typedef enum AstTreeToken { AST_TREE_TOKEN_TYPE_CODE, AST_TREE_TOKEN_TYPE_NAMESPACE, AST_TREE_TOKEN_TYPE_SHAPE_SHIFTER, + AST_TREE_TOKEN_TYPE_C_LIBRARY, + AST_TREE_TOKEN_TYPE_C_FUNCTION, AST_TREE_TOKEN_TYPE_BOOL, AST_TREE_TOKEN_VALUE_VOID, AST_TREE_TOKEN_STATIC_VARS_END = AST_TREE_TOKEN_VALUE_VOID, @@ -72,6 +74,8 @@ typedef enum AstTreeToken { AST_TREE_TOKEN_VALUE_UNDEFINED, AST_TREE_TOKEN_VALUE_NAMESPACE, AST_TREE_TOKEN_VALUE_SHAPE_SHIFTER, + AST_TREE_TOKEN_VALUE_C_LIBRARY, + AST_TREE_TOKEN_VALUE_C_FUNCTION, AST_TREE_TOKEN_VALUE_INT, AST_TREE_TOKEN_VALUE_FLOAT, AST_TREE_TOKEN_VALUE_BOOL, @@ -139,6 +143,7 @@ extern AstTree AST_TREE_F128_TYPE; extern AstTree AST_TREE_CODE_TYPE; extern AstTree AST_TREE_NAMESPACE_TYPE; extern AstTree AST_TREE_SHAPE_SHIFTER_TYPE; +extern AstTree AST_TREE_C_LIBRARY_TYPE; extern AstTree AST_TREE_VOID_VALUE; typedef struct AstTreeVariable { @@ -313,6 +318,20 @@ typedef struct AstTreeLoopControl { typedef struct AstTreeRawValue { } AstTreeRawValue; +typedef struct AstTreeCFunctionType { + AstTree *funcType; +} AstTreeCFunctionType; + +typedef struct AstTreeCLibrary { + void *dl; +} AstTreeCLibrary; + +typedef struct AstTreeCFunction { + AstTree *library; + AstTree *name; + AstTree *funcType; +} AstTreeCFunction; + #ifdef PRINT_COMPILE_TREE void astTreePrint(const AstTree *tree, int indent); void astTreeVariablePrint(const AstTreeVariable *variable, int indent); @@ -477,6 +496,10 @@ bool setTypesBuiltinBinaryWithRet(AstTree *tree, AstTreeSetTypesHelper helper, AstTree *retType); bool setTypesBuiltinPutc(AstTree *tree, AstTreeSetTypesHelper helper, AstTreeFunctionCall *functionCall); +bool setTypesBuiltinCLibrary(AstTree *tree, AstTreeSetTypesHelper helper, + AstTreeFunctionCall *functionCall); +bool setTypesBuiltinCFunction(AstTree *tree, AstTreeSetTypesHelper helper, + AstTreeFunctionCall *functionCall); bool setTypesTypeArray(AstTree *tree, AstTreeSetTypesHelper helper); bool setTypesArrayAccess(AstTree *tree, AstTreeSetTypesHelper helper); bool setTypesAstFunction(AstTreeFunction *function, |