aboutsummaryrefslogtreecommitdiffstats
path: root/src/bootstrap/parser.h
diff options
context:
space:
mode:
authorBad Diode <bd@badd10de.dev>2021-10-22 09:59:31 +0200
committerBad Diode <bd@badd10de.dev>2021-10-22 09:59:31 +0200
commiteeff5e273f22aa28e81ab080e9ffdce85ac394b8 (patch)
tree71d11c76be7c0bb649099bb55e6181f9b7c6c8a8 /src/bootstrap/parser.h
parent5bd694fc7071bfb76b9f65c89d253b2b4e18cf63 (diff)
downloadbdl-eeff5e273f22aa28e81ab080e9ffdce85ac394b8.tar.gz
bdl-eeff5e273f22aa28e81ab080e9ffdce85ac394b8.zip
Prepare skeleton for bytecode interpreter
Diffstat (limited to 'src/bootstrap/parser.h')
-rw-r--r--src/bootstrap/parser.h22
1 files changed, 0 insertions, 22 deletions
diff --git a/src/bootstrap/parser.h b/src/bootstrap/parser.h
deleted file mode 100644
index 3834c75..0000000
--- a/src/bootstrap/parser.h
+++ /dev/null
@@ -1,22 +0,0 @@
1#ifndef BDL_PARSER_H
2#define BDL_PARSER_H
3
4typedef struct Visitor {
5 Token *tokens;
6 size_t current;
7} Visitor;
8
9// Mimics the functionality in the Scanner functions, but for entire tokens.
10Token next_token(Visitor *visitor);
11Token peek_token(const Visitor *visitor);
12bool has_next_token(const Visitor *visitor);
13
14// Parse a token into a fixnum object.
15Object * parse_fixnum(Token tok);
16
17// Recursive descent parser. If an object is not a list the parsing is handled
18// by the parse_tree function.
19Object * parse_list(Visitor *vs);
20Object * parse_tree(Visitor *vs);
21
22#endif // BDL_PARSER_H