aboutsummaryrefslogtreecommitdiff
path: root/spec/inputs/tables.moon
diff options
context:
space:
mode:
Diffstat (limited to 'spec/inputs/tables.moon')
-rw-r--r--spec/inputs/tables.moon161
1 files changed, 161 insertions, 0 deletions
diff --git a/spec/inputs/tables.moon b/spec/inputs/tables.moon
new file mode 100644
index 0000000..2bf66d7
--- /dev/null
+++ b/spec/inputs/tables.moon
@@ -0,0 +1,161 @@
1
2backpack =
3 something:
4 yeah: 200
5 they: ->
6 print "hello"
7 yor_feet"small"
8 pretty: hair
9 gold: hmm
10 yow: 1000
11
12 eat: goo
13 yeah: dudd
14
15
16start =
17 something: "cold"
18
19bathe =
20 on: "fire"
21
22another =
23 [4]: 232
24 ["good food"]: "is the best"
25
26fwip =
27 something: hello"what", number: 2323,
28 what: yo "momma", "yeah",
29 fruit: basket
30 nuts: day
31
32
33frick = hello: "world"
34
35frack, best = hello: "world", rice: 3434, "what"
36
37ya = { 1,2,3, key: 100, 343, "hello", umm: 232 }
38
39
40x = { 1,2,
41 4343, 343 ,343 }
42
43
44g, p = {
45 1,2, nowy: "yes", 3,4,
46 hey: 232, another: "day"
47}, 234
48
49annother = {
50 1,2,3
51 3,4,5
52 6,7,8
53}
54
55yeah = {
56 [232]: 3434, "helo"
57 ice: "cake"
58}
59
60-- confusing stuff...
61whatabout = {
62 hello world, another
63 what, about, now
64
65 hello"world", yeah
66 hello "world", yeah
67}
68
69x =
70 -- yeah
71 something: => "hello"
72 cool: -- umm
73 --so ething
74 bed: {
75 2323,2323
76 }
77 red: 2343 -- here
78 -- what
79 name: (node) => @value node -- here
80 -- comment me
81-- okay
82
83
84x = { :something, something: something }
85
86y = {
87 :hi, :there, :how, :you
88 :thing
89}
90
91call_me "hello", :x, :y, :z
92
93t = {
94 a: 'a'
95 [b]: 'b'
96}
97
98xam = {
99 hello: 1234
100 "hello": 12354
101 ["hello"]: 12354
102}
103
104
105kam = {
106 hello: 12
107 goodcheese:
108 "mmm"
109
110 yeah:
111 12 + 232
112
113 lets:
114 keepit going: true,
115 okay: "yeah"
116
117 more:
118 {
119 1, [x for x=1,10]
120 }
121
122 [{"one", "two"}]:
123 one_thing =>
124}
125
126-- TODO: both of these have undesirable output
127keepit going: true,
128 okay: "yeah",
129 workd: "okay"
130
131thing what:
132 "great", no:
133 "more"
134 okay: 123
135
136
137--
138thing what:
139 "great", no:
140 "more"
141okay: 123 -- a anon table
142
143
144--
145
146k = { "hello": "world" }
147k = { 'hello': 'world' }
148k = { "hello": 'world', "hat": "zat" }
149
150please "hello": "world"
151k = "hello": "world", "one": "zone"
152
153f = "one", "two": three, "four"
154f = "two": three, "four"
155f = { "one", "two": three, "four" }
156
157
158j = "one", "two": three, "four": five, 6, 7
159
160
161nil