suicmez/error_test/parser/struct_errors.sui

30 lines
357 B
Text
Raw Normal View History

2025-12-15 21:18:25 +05:30
# Struct syntax errors
# Missing struct name
struct
2025-12-15 21:26:39 +05:30
x: int,
2025-12-15 21:18:25 +05:30
y: int
end
# Missing field type
struct Point
x
y: int
end
# Missing colon in field
struct Point
2025-12-15 21:26:39 +05:30
x int,
2025-12-15 21:18:25 +05:30
y: int
end
# Missing end keyword
struct Point
2025-12-15 21:26:39 +05:30
x: int,
y: int,
2025-12-15 21:18:25 +05:30
# Invalid field separator (semicolon instead of comma)
struct Point
x: int;
y: int
2025-12-15 21:26:39 +05:30
end