aboutsummaryrefslogtreecommitdiff
path: root/examples/main.c
diff options
context:
space:
mode:
authorAnhgelus Morhtuuzh <william@herges.fr>2026-05-04 16:40:38 +0200
committerAnhgelus Morhtuuzh <william@herges.fr>2026-05-04 16:40:38 +0200
commit8dc9a978fc2b0d01c20270b1b690e815e74fdcc7 (patch)
tree477ac32bb4e2bf8bb7f0905333411ac96eb6077c /examples/main.c
parent308c8893d9706318e8e756069f40c1435a70df91 (diff)
feat(lexer): error contains line
Diffstat (limited to 'examples/main.c')
-rw-r--r--examples/main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/main.c b/examples/main.c
index d28af79..2b3c3ca 100644
--- a/examples/main.c
+++ b/examples/main.c
@@ -9,7 +9,7 @@ void foo(char *v) {
for (int i = 0; i < doc.errors_len; i++) {
struct typdown_Error error = doc.errors[i];
printf("cannot parse '%s', error: %s (%d)\n", v, typdown_getErrorString(error.code), error.code);
- printf("%d to %d ", error.location.beg, error.location.end);
+ printf("line %d: ", error.location.line);
for (int j = error.location.beg; j < error.location.end; j++)
printf("%c", v[j]);
printf("\n");