Resolved #45, Exports region removed

This commit is contained in:
2023-01-13 16:12:44 +00:00
parent 0649a141dd
commit 3498baad9b
12 changed files with 23 additions and 296 deletions

View File

@@ -32,8 +32,7 @@ typedef enum ASTNodeType {
AST_NODE_POSTFIX_INCREMENT, //increment a variable
AST_NODE_PREFIX_DECREMENT, //decrement a variable
AST_NODE_POSTFIX_DECREMENT, //decrement a variable
AST_NODE_IMPORT, //import a variable
AST_NODE_EXPORT, //export a variable
AST_NODE_IMPORT, //import a library
} ASTNodeType;
//literals
@@ -219,9 +218,8 @@ typedef struct NodePostfixDecrement {
Literal identifier;
} NodePostfixDecrement;
//import/export a variable
//import a library
void emitASTNodeImport(ASTNode** nodeHandle, Literal identifier, Literal alias);
void emitASTNodeExport(ASTNode** nodeHandle, Literal identifier, Literal alias);
typedef struct NodeImport {
ASTNodeType type;
@@ -229,12 +227,6 @@ typedef struct NodeImport {
Literal alias;
} NodeImport;
typedef struct NodeExport {
ASTNodeType type;
Literal identifier;
Literal alias;
} NodeExport;
union _node {
ASTNodeType type;
NodeLiteral atomic;
@@ -260,7 +252,6 @@ union _node {
NodePostfixIncrement postfixIncrement;
NodePostfixDecrement postfixDecrement;
NodeImport import;
NodeExport export;
};
TOY_API void freeASTNode(ASTNode* node);