For a more in-depth explanation, ... in Lua is called a vararg, short for variable arguments. It is used when defining a function when the number of arguments being passed to it is unknown.
Lua Code:
function fooBar(...)
local test1, test2 = ...
print(test1, test2)
end
fooBar("apple")
fooBar("orange", "banana")
There's another level to WoW's coding we don't see, which is written in C++. When this internal structure loads an addon, each file in the addon is actually one big function.
We see:
Lua Code:
local _, ns = ...
-- rest of our file
What's actually happening:
Lua Code:
function addonFile(...)
local _, ns = ...
-- rest of our file
end
addonFile("Name of AddOn", privateTable)
This privateTable is shared across all loaded files within an addon, basically each .toc file gets its own table.