summaryrefslogtreecommitdiff
path: root/src/parser.h
diff options
context:
space:
mode:
authorLLLL Colonq <llll@colonq>2025-09-27 04:21:06 -0400
committerLLLL Colonq <llll@colonq>2025-09-27 04:21:06 -0400
commitab57bc2a6d6ea9c24aa119df6efbd8a38b54c312 (patch)
treebfc7fe32f40804e7808016038a3f2f15ef9e643e /src/parser.h
parent811f11463851a0f35835ac72ef09b65b1072de20 (diff)
Source location tracking
Diffstat (limited to 'src/parser.h')
-rw-r--r--src/parser.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/parser.h b/src/parser.h
index f99a891..bcd5458 100644
--- a/src/parser.h
+++ b/src/parser.h
@@ -7,6 +7,7 @@
typedef struct {
pit_lex_token token;
i64 start, end;
+ i64 line, column; // for error reporting
} pit_parser_token_info;
typedef struct {
@@ -14,7 +15,7 @@ typedef struct {
pit_parser_token_info cur, next;
} pit_parser;
-pit_parser *pit_parser_from_lexer(pit_lexer *lex);
+void pit_parser_from_lexer(pit_parser *ret, pit_lexer *lex);
pit_value pit_parse(pit_runtime *rt, pit_parser *st, bool *eof);
#endif