aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2020-01-14 07:54:59 +0100
committerdec05eba <dec05eba@protonmail.com>2020-01-14 07:54:59 +0100
commitf5fc07765303055922e1dfcc35f2f2f620c1e66b (patch)
tree99c82f033e81948f76d9367531d51a0955cb047f /include
parente27bd78c8211532bf0d39d87d2051222f7e86e26 (diff)
add parser...
Diffstat (limited to 'include')
-rw-r--r--include/parser.h8
-rw-r--r--include/tokenizer.h1
2 files changed, 9 insertions, 0 deletions
diff --git a/include/parser.h b/include/parser.h
new file mode 100644
index 0000000..3523127
--- /dev/null
+++ b/include/parser.h
@@ -0,0 +1,8 @@
+#ifndef TSL_PARSER_H
+#define TSL_PARSER_H
+
+#include "tokenizer.h"
+
+int tsl_parse(const char *code, size_t code_size);
+
+#endif /* TSL_PARSER_H */
diff --git a/include/tokenizer.h b/include/tokenizer.h
index decdae4..a1d0932 100644
--- a/include/tokenizer.h
+++ b/include/tokenizer.h
@@ -32,6 +32,7 @@ typedef struct {
void tsl_tokenizer_init(TslTokenizer *self, const char *code, size_t code_size);
TslToken tsl_tokenizer_next(TslTokenizer *self);
+int tsl_tokenizer_accept(TslTokenizer *self, TslToken expected_token);
#endif /* TSL_TOKENIZER_H */