From 811fdd685670d2eb8c6bcb9e6e103e57bf402ca8 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Wed, 29 Aug 2018 15:59:30 -0700 Subject: Tweaked version 3.6 to include deprecating list append/removal functions in favor of using a method call style. --- nomsu_compiler.lua | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'nomsu_compiler.lua') diff --git a/nomsu_compiler.lua b/nomsu_compiler.lua index 2cda146..4855476 100644 --- a/nomsu_compiler.lua +++ b/nomsu_compiler.lua @@ -125,7 +125,18 @@ local _list_mt = { end end return true - end + end, + __index = { + add_1 = insert, + append_1 = insert, + add_1_at_index_2 = function(t, x, i) + return insert(t, i, x) + end, + at_index_1_add_2 = insert, + pop = table.remove, + remove_last = table.remove, + remove_index_1 = table.remove + } } local list list = function(t) -- cgit v1.2.3