better parser errors

This commit is contained in:
Masashi 2025-12-15 21:18:25 +05:30
commit f83a8e3ca1
13 changed files with 639 additions and 78 deletions

View file

@ -0,0 +1,22 @@
# Attribute errors
# Missing attribute name
@ 42
# Invalid attribute argument
@deprecated invalid
# Missing equals in key-value attribute
@version "1.0"
# Missing closing parenthesis in attribute
@deprecated("old", reason = "new"
# Invalid attribute syntax (missing value after =)
@version =
# Attribute on invalid location
fn test() -> int
@inline
let x = 5
x