summaryrefslogtreecommitdiff
path: root/src/parser.h
diff options
context:
space:
mode:
authorLLLL Colonq <llll@colonq>2025-09-20 23:25:29 -0400
committerLLLL Colonq <llll@colonq>2025-09-20 23:25:29 -0400
commit85a67a25ac9757e694166b3c9e9e2c8cdeefc6da (patch)
treea381993c6f0d85aec3c3ead4ed7fa66583338ccb /src/parser.h
Initial commit
Diffstat (limited to 'src/parser.h')
-rw-r--r--src/parser.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/parser.h b/src/parser.h
new file mode 100644
index 0000000..73c489a
--- /dev/null
+++ b/src/parser.h
@@ -0,0 +1,20 @@
+#ifndef PIT_PARSER_H
+#define PIT_PARSER_H
+
+#include "lexer.h"
+#include "runtime.h"
+
+typedef struct {
+ pit_lex_token token;
+ i64 start, end;
+} pit_parser_token_info;
+
+typedef struct {
+ pit_lexer *lexer;
+ pit_parser_token_info cur, next;
+} pit_parser;
+
+pit_parser *pit_parser_from_lexer(pit_lexer *lex);
+pit_value pit_parse(pit_runtime *rt, pit_parser *st);
+
+#endif