aboutsummaryrefslogtreecommitdiff
path: root/nomsu_compiler.moon
diff options
context:
space:
mode:
authorBruce Hill <bitbucket@bruce-hill.com>2018-08-29 15:59:30 -0700
committerBruce Hill <bitbucket@bruce-hill.com>2018-08-29 16:00:04 -0700
commit811fdd685670d2eb8c6bcb9e6e103e57bf402ca8 (patch)
treec599fd7a609159c2ec50a30f1131000070e8eb03 /nomsu_compiler.moon
parent22495c7d708b4950b83c5bc9b97806e19cd1fcfa (diff)
Tweaked version 3.6 to include deprecating list append/removal functions
in favor of using a method call style.
Diffstat (limited to 'nomsu_compiler.moon')
-rw-r--r--nomsu_compiler.moon8
1 files changed, 8 insertions, 0 deletions
diff --git a/nomsu_compiler.moon b/nomsu_compiler.moon
index e05c209..5ac6a87 100644
--- a/nomsu_compiler.moon
+++ b/nomsu_compiler.moon
@@ -80,6 +80,14 @@ _list_mt =
elseif @[i] < other[i] then return true
elseif @[i] > other[i] then return false
return true
+ __index:
+ add_1: insert
+ append_1: insert
+ add_1_at_index_2: (t,x,i)-> insert(t,i,x)
+ at_index_1_add_2: insert
+ pop: table.remove
+ remove_last: table.remove
+ remove_index_1: table.remove
list = (t)-> setmetatable(t, _list_mt)