summaryrefslogtreecommitdiff
path: root/extensions/ParserFunctions/mw.ext.ParserFunctions.lua
blob: ccec046d84aedb60fd9babe2af31798895d81b0e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
local ParserFunctions = {}
local php

function ParserFunctions.expr( expression )
	return php.expr( expression )
end

function ParserFunctions.setupInterface( options )
	-- Boilerplate
	ParserFunctions.setupInterface = nil
	php = mw_interface
	mw_interface = nil

	-- Register this library in the "mw" global
	mw = mw or {}
	mw.ext = mw.ext or {}
	mw.ext.ParserFunctions = ParserFunctions

	package.loaded['mw.ext.ParserFunctions'] = ParserFunctions
end

return ParserFunctions