summaryrefslogtreecommitdiff
path: root/src/ast.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/ast.h')
-rw-r--r--src/ast.h15
1 files changed, 0 insertions, 15 deletions
diff --git a/src/ast.h b/src/ast.h
index 267e8ba..1f0da13 100644
--- a/src/ast.h
+++ b/src/ast.h
@@ -20,14 +20,11 @@
#include "vector.h"
#include <stdint.h>
-#define ast_visitor_visit(visitor, node) ast_node_accept_visitor(node, (ast_visitor_t *)visitor);
-
typedef enum
{
TYPE_I32
} type_t;
-typedef struct ast_visitor_t ast_visitor_t;
typedef struct ast_node_t ast_node_t;
typedef struct ast_return_stmt_t
@@ -85,14 +82,6 @@ typedef struct ast_variable_declaration_t
ast_node_t *value;
} ast_variable_declaration_t;
-typedef struct ast_visitor_t
-{
- void (*visit_function)(struct ast_visitor_t *, ast_function_declaration_t *);
- void (*visit_return_stmt)(struct ast_visitor_t *, ast_return_stmt_t *);
- void (*visit_literal)(struct ast_visitor_t *, ast_literal_t *);
- void (*visit_binary_operation)(struct ast_visitor_t *, ast_binary_operation_t *);
-} ast_visitor_t;
-
typedef enum
{
AST_BINARY_OPERATION,
@@ -116,14 +105,10 @@ typedef union
typedef struct ast_node_t
{
- void (*accept_visitor)(ast_node_t *, ast_visitor_t *);
ast_node_kind_t kind;
ast_node_data_t data;
} ast_node_t;
-void
-ast_node_accept_visitor(ast_node_t *node, ast_visitor_t *visitor);
-
ast_node_t *
ast_node_new();
void