aboutsummaryrefslogtreecommitdiff
path: root/src/ast.h
diff options
context:
space:
mode:
authorkartofen <mladenovnasko0@gmail.com>2023-08-14 21:20:39 +0300
committerkartofen <mladenovnasko0@gmail.com>2023-08-14 21:20:39 +0300
commita7bb8ace49f5725e0f92336ab5af28b4c8900aff (patch)
tree5d00d7a5d159e9702b46c23542fffc09e591c271 /src/ast.h
parentf83187a830deff27ce0cdd4c175ffe2785461685 (diff)
parser done
Diffstat (limited to 'src/ast.h')
-rw-r--r--src/ast.h38
1 files changed, 0 insertions, 38 deletions
diff --git a/src/ast.h b/src/ast.h
deleted file mode 100644
index bd2e628..0000000
--- a/src/ast.h
+++ /dev/null
@@ -1,38 +0,0 @@
-#ifndef AST_H
-#define AST_H
-
-#include "lexer.h"
-
-typedef struct node_t *ast_t;
-struct ast_node {
- enum {
- NODE_SEXP,
- NODE_SYMBOL,
- NODE_LITERAL,
- } type;
-
- union {
- struct sexp {
- struct ast_node **children;
- size_t nchildren;
- } sexp;
-
- char *symbol;
-
- union {
- enum {
- NODE_LITERAL_NUM,
- NODE_LITERAL_STR,
- } type;
-
- int number;
- char *string;
- } literal;
- };
-};
-
-ast_t ast_create();
-void ast_destroy(ast_t ast);
-int ast_parse_lexer(ast_t ast, lexer_t lex);
-
-#endif