diff options
Diffstat (limited to 'spec/inputs/export.mp')
-rw-r--r-- | spec/inputs/export.mp | 76 |
1 files changed, 76 insertions, 0 deletions
diff --git a/spec/inputs/export.mp b/spec/inputs/export.mp new file mode 100644 index 0000000..9a494d9 --- /dev/null +++ b/spec/inputs/export.mp | |||
@@ -0,0 +1,76 @@ | |||
1 | |||
2 | export a,b,c = 223, 343, 123 | ||
3 | export cool = "dad" | ||
4 | |||
5 | d,e,f = 3, 2, 1 | ||
6 | export d, e, f | ||
7 | |||
8 | export class Something | ||
9 | umm: "cool" | ||
10 | |||
11 | export if this | ||
12 | 232 | ||
13 | else | ||
14 | 4343 | ||
15 | |||
16 | export What = if this | ||
17 | 232 | ||
18 | else | ||
19 | 4343 | ||
20 | |||
21 | export y = -> | ||
22 | hallo = 3434 | ||
23 | |||
24 | export with tmp | ||
25 | j = 2000 | ||
26 | |||
27 | export cbVal = do | ||
28 | h = 100 | ||
29 | (x)<- f | ||
30 | return x h | ||
31 | |||
32 | export y = -> | ||
33 | h = 100 | ||
34 | k = 100 | ||
35 | |||
36 | export switch h | ||
37 | when 100, 150 then 200 | ||
38 | when 200 then 300 | ||
39 | else 0 | ||
40 | |||
41 | export Constant = switch value | ||
42 | when "good" then 1 | ||
43 | when "better" then 2 | ||
44 | when "best" then 3 | ||
45 | |||
46 | export x | ||
47 | |||
48 | f if a then b | ||
49 | f do 123 | ||
50 | f switch a | ||
51 | when b then c | ||
52 | f [i for i = 1,10] | ||
53 | f for i = 1,10 do i | ||
54 | f {k,v for k,v in pairs tb} | ||
55 | f for k,v in pairs tb do k,v | ||
56 | f while a do true | ||
57 | f with a | ||
58 | .b = 123 | ||
59 | f a?.b | ||
60 | f a\b | ||
61 | f class A | ||
62 | |||
63 | _ = "#{if a then b}" | ||
64 | _ = "#{do 123}" | ||
65 | _ = "#{switch a | ||
66 | when b then c}" | ||
67 | _ = "#{[i for i = 1,10]}" | ||
68 | _ = "#{for i = 1,10 do i}" | ||
69 | _ = "#{{k,v for k,v in pairs tb}}" | ||
70 | _ = "#{for k,v in pairs tb do k,v}" | ||
71 | _ = "#{while a do true}" | ||
72 | _ = "#{with a | ||
73 | .b = 123}" | ||
74 | _ = "#{a?.b}" | ||
75 | _ = "#{a\b}" | ||
76 | _ = "#{class A}" | ||