better parser errors
This commit is contained in:
parent
f83a8e3ca1
commit
dde1da8656
7 changed files with 93 additions and 113 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue