Skip to content

Commit 0ba4c77

Browse files
committed
don't reference global unpack
1 parent 35bcdc7 commit 0ba4c77

File tree

17 files changed

+28
-7
lines changed

17 files changed

+28
-7
lines changed

bin/moon

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ local moonscript = require "moonscript"
66
local util = require "moonscript.util"
77
local errors = require "moonscript.errors"
88

9+
local unpack = util.unpack
10+
911
-- moonloader and repl
1012
local opts, ind = alt_getopt.get_opts(arg, "cvhd", { version = "v", help = "h" })
1113

moonscript/compile.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ do
2727
value_compilers = _table_0.value_compilers
2828
end
2929
local concat, insert = table.concat, table.insert
30-
local pos_to_line, get_closest_line, trim = util.pos_to_line, util.get_closest_line, util.trim
30+
local pos_to_line, get_closest_line, trim, unpack = util.pos_to_line, util.get_closest_line, util.trim, util.unpack
3131
local mtype = util.moon.type
3232
local indent_char = " "
3333
local Line, Lines, Block, RootBlock

moonscript/compile.moon

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import statement_compilers from require "moonscript.compile.statement"
1111
import value_compilers from require "moonscript.compile.value"
1212

1313
import concat, insert from table
14-
import pos_to_line, get_closest_line, trim from util
14+
import pos_to_line, get_closest_line, trim, unpack from util
1515

1616
mtype = util.moon.type
1717

moonscript/compile/statement.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
local reversed
1+
local reversed, unpack
22
do
33
local _table_0 = require("moonscript.util")
4-
reversed = _table_0.reversed
4+
reversed, unpack = _table_0.reversed, _table_0.unpack
55
end
66
local ntype
77
do

moonscript/compile/statement.moon

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
import reversed from require "moonscript.util"
2+
import reversed, unpack from require "moonscript.util"
33
import ntype from require "moonscript.types"
44
import concat, insert from table
55

moonscript/compile/value.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ do
1111
user_error = _table_0.user_error
1212
end
1313
local concat, insert = table.concat, table.insert
14+
local unpack = util.unpack
1415
local table_delim = ","
1516
local value_compilers = {
1617
exp = function(self, node)

moonscript/compile/value.moon

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ data = require "moonscript.data"
55
import ntype from require "moonscript.types"
66
import user_error from require "moonscript.errors"
77
import concat, insert from table
8+
import unpack from util
89

910
table_delim = ","
1011

moonscript/parse.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ local trim = util.trim
1515

1616
local getfenv = util.getfenv
1717
local setfenv = util.setfenv
18+
local unpack = util.unpack
1819

1920
local Stack = data.Stack
2021

moonscript/transform.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
local types = require("moonscript.types")
22
local util = require("moonscript.util")
33
local data = require("moonscript.data")
4-
local reversed = util.reversed
4+
local reversed, unpack = util.reversed, util.unpack
55
local ntype, mtype, build, smart_node, is_slice, value_is_singular = types.ntype, types.mtype, types.build, types.smart_node, types.is_slice, types.value_is_singular
66
local insert = table.insert
77
local NameProxy, LocalName

moonscript/transform.moon

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ types = require "moonscript.types"
33
util = require "moonscript.util"
44
data = require "moonscript.data"
55

6-
import reversed from util
6+
import reversed, unpack from util
77
import ntype, mtype, build, smart_node, is_slice, value_is_singular from types
88
import insert from table
99
import NameProxy, LocalName from require "moonscript.transform.names"

0 commit comments

Comments
 (0)