| 1 | local ParserFunctions = {} |
| 2 | local php |
| 3 | |
| 4 | function ParserFunctions.expr( expression ) |
| 5 | return php.expr( expression ) |
| 6 | end |
| 7 | |
| 8 | function ParserFunctions.setupInterface( options ) |
| 9 | -- Boilerplate |
| 10 | ParserFunctions.setupInterface = nil |
| 11 | php = mw_interface |
| 12 | mw_interface = nil |
| 13 | |
| 14 | -- Register this library in the "mw" global |
| 15 | mw = mw or {} |
| 16 | mw.ext = mw.ext or {} |
| 17 | mw.ext.ParserFunctions = ParserFunctions |
| 18 | |
| 19 | package.loaded['mw.ext.ParserFunctions'] = ParserFunctions |
| 20 | end |
| 21 | |
| 22 | return ParserFunctions |