better parser errors
This commit is contained in:
parent
872c8e356d
commit
f83a8e3ca1
13 changed files with 639 additions and 78 deletions
30
error_test/parser/struct_errors.sui
Normal file
30
error_test/parser/struct_errors.sui
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
# Struct syntax errors
|
||||
|
||||
# Missing struct name
|
||||
struct
|
||||
x: int
|
||||
y: int
|
||||
end
|
||||
|
||||
# Missing field type
|
||||
struct Point
|
||||
x
|
||||
y: int
|
||||
end
|
||||
|
||||
# Missing colon in field
|
||||
struct Point
|
||||
x int
|
||||
y: int
|
||||
end
|
||||
|
||||
# Missing end keyword
|
||||
struct Point
|
||||
x: int
|
||||
y: int
|
||||
|
||||
# Invalid field separator (semicolon instead of comma)
|
||||
struct Point
|
||||
x: int;
|
||||
y: int
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue