View source for Module:LuaCall
You do not have permission to edit this page, for the following reasons:
You can view and copy the source of this page.
local p={}
function p.main(frame)
local parent = frame.getParent(frame) or {}
local reserved_value = {}
local reserved_function, reserved_contents
for k, v in pairs(parent.args or {}) do
_G[k] = tonumber(v) or v -- transfer every parameter directly to the global variable table
end
for k, v in pairs(frame.args or {}) do
_G[k] = tonumber(v) or v -- transfer every parameter directly to the global variable table
end
--- Alas Scribunto does NOT implement coroutines, according to
--- http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#string.format
--- this will not stop us from trying to implement one single lousy function call
if _G[1] then
reserved_function, reserved_contents = mw.ustring.match(_G[1], "^%s*(%a[^%s%(]*)%(([^%)]*)%)%s*$")
end
if reserved_contents then
local reserved_counter = 0
repeat
reserved_counter = reserved_counter + 1
000
1:0
Template used on this page:
Return to Module:LuaCall.