diff options
Diffstat (limited to '')
| -rw-r--r-- | spec/inputs/tables.moon | 161 |
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 | |||
| 2 | backpack = | ||
| 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 | |||
| 16 | start = | ||
| 17 | something: "cold" | ||
| 18 | |||
| 19 | bathe = | ||
| 20 | on: "fire" | ||
| 21 | |||
| 22 | another = | ||
| 23 | [4]: 232 | ||
| 24 | ["good food"]: "is the best" | ||
| 25 | |||
| 26 | fwip = | ||
| 27 | something: hello"what", number: 2323, | ||
| 28 | what: yo "momma", "yeah", | ||
| 29 | fruit: basket | ||
| 30 | nuts: day | ||
| 31 | |||
| 32 | |||
| 33 | frick = hello: "world" | ||
| 34 | |||
| 35 | frack, best = hello: "world", rice: 3434, "what" | ||
| 36 | |||
| 37 | ya = { 1,2,3, key: 100, 343, "hello", umm: 232 } | ||
| 38 | |||
| 39 | |||
| 40 | x = { 1,2, | ||
| 41 | 4343, 343 ,343 } | ||
| 42 | |||
| 43 | |||
| 44 | g, p = { | ||
| 45 | 1,2, nowy: "yes", 3,4, | ||
| 46 | hey: 232, another: "day" | ||
| 47 | }, 234 | ||
| 48 | |||
| 49 | annother = { | ||
| 50 | 1,2,3 | ||
| 51 | 3,4,5 | ||
| 52 | 6,7,8 | ||
| 53 | } | ||
| 54 | |||
| 55 | yeah = { | ||
| 56 | [232]: 3434, "helo" | ||
| 57 | ice: "cake" | ||
| 58 | } | ||
| 59 | |||
| 60 | -- confusing stuff... | ||
| 61 | whatabout = { | ||
| 62 | hello world, another | ||
| 63 | what, about, now | ||
| 64 | |||
| 65 | hello"world", yeah | ||
| 66 | hello "world", yeah | ||
| 67 | } | ||
| 68 | |||
| 69 | x = | ||
| 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 | |||
| 84 | x = { :something, something: something } | ||
| 85 | |||
| 86 | y = { | ||
| 87 | :hi, :there, :how, :you | ||
| 88 | :thing | ||
| 89 | } | ||
| 90 | |||
| 91 | call_me "hello", :x, :y, :z | ||
| 92 | |||
| 93 | t = { | ||
| 94 | a: 'a' | ||
| 95 | [b]: 'b' | ||
| 96 | } | ||
| 97 | |||
| 98 | xam = { | ||
| 99 | hello: 1234 | ||
| 100 | "hello": 12354 | ||
| 101 | ["hello"]: 12354 | ||
| 102 | } | ||
| 103 | |||
| 104 | |||
| 105 | kam = { | ||
| 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 | ||
| 127 | keepit going: true, | ||
| 128 | okay: "yeah", | ||
| 129 | workd: "okay" | ||
| 130 | |||
| 131 | thing what: | ||
| 132 | "great", no: | ||
| 133 | "more" | ||
| 134 | okay: 123 | ||
| 135 | |||
| 136 | |||
| 137 | -- | ||
| 138 | thing what: | ||
| 139 | "great", no: | ||
| 140 | "more" | ||
| 141 | okay: 123 -- a anon table | ||
| 142 | |||
| 143 | |||
| 144 | -- | ||
| 145 | |||
| 146 | k = { "hello": "world" } | ||
| 147 | k = { 'hello': 'world' } | ||
| 148 | k = { "hello": 'world', "hat": "zat" } | ||
| 149 | |||
| 150 | please "hello": "world" | ||
| 151 | k = "hello": "world", "one": "zone" | ||
| 152 | |||
| 153 | f = "one", "two": three, "four" | ||
| 154 | f = "two": three, "four" | ||
| 155 | f = { "one", "two": three, "four" } | ||
| 156 | |||
| 157 | |||
| 158 | j = "one", "two": three, "four": five, 6, 7 | ||
| 159 | |||
| 160 | |||
| 161 | nil | ||
