better parser errors
This commit is contained in:
parent
f83a8e3ca1
commit
dde1da8656
7 changed files with 93 additions and 113 deletions
|
|
@ -17,19 +17,16 @@ fn test() -> int
|
|||
fn test() -> int
|
||||
for in [1, 2, 3]
|
||||
item
|
||||
0
|
||||
|
||||
# Missing 'in' keyword in for loop
|
||||
fn test() -> int
|
||||
for item [1, 2, 3]
|
||||
item
|
||||
0
|
||||
|
||||
# Missing iterable in for loop
|
||||
fn test() -> int
|
||||
for item in
|
||||
item
|
||||
0
|
||||
|
||||
# Invalid while syntax
|
||||
fn test() -> int
|
||||
|
|
@ -40,10 +37,8 @@ fn test() -> int
|
|||
fn test() -> int
|
||||
let f = lambda
|
||||
42
|
||||
f()
|
||||
|
||||
# Missing closing parenthesis in lambda
|
||||
fn test() -> int
|
||||
let f = lambda(x
|
||||
x
|
||||
f(5)
|
||||
Loading…
Add table
Add a link
Reference in a new issue