Added substitute-number on ARM
[voodoo-lang.git] / test / errors.voo
blob74e4f17c4912ba48c1d0105d857106f96af91b6a
1 # Program containing errors, to test error reporting.
3 # A directive that does not exist
4 wrongdirective
6 # Section name must be a symbol or a string
7 section 12
9 # A value must be provided for x
10 let x
12 # Too many parameters to add
13 set y add 1 2 3
15 # Let not allowed directly inside if
16 iflt 2 3
17     let x add 2 3
18 end if
20 # Function not allowed inside function
21 function foo
22     function bar x
23         return x
24     end function
25 end function
27 # At-expression should have a number or a symbol
28 add 2 @"wrong"
30 # Function with errorneous statement in it
31 function
32     let x get-word x
33 end function
35 # Function with multiple errorneous statements in it
36 function
37     let x get-word x
38     set-word x
39 end function
41 # Substitution character not followed by symbol
42 not %12
43 not %"x"
45 # Block should be closed before end of file
46 block
47     let x 4