better parser errors

This commit is contained in:
Masashi 2025-12-15 21:26:39 +05:30
commit dde1da8656
7 changed files with 93 additions and 113 deletions

View file

@ -2,7 +2,7 @@
# Missing struct name
struct
x: int
x: int,
y: int
end
@ -14,17 +14,17 @@ end
# Missing colon in field
struct Point
x int
x int,
y: int
end
# Missing end keyword
struct Point
x: int
y: int
x: int,
y: int,
# Invalid field separator (semicolon instead of comma)
struct Point
x: int;
y: int
end
end