HomePhabricator

Updated mediawiki/extensions Project: mediawiki/extensions/Scribunto…

Authored by vvv.

Description

Updated mediawiki/extensions Project: mediawiki/extensions/Scribunto 8fcaa128ac64bfedad2028ff4f44dfc1c59a134f null New parser interface

  • Implemented the new parser interface based on a frame object, as described in the design document and wikitech-l.
  • Added parser tests for the new interface.
  • Removed {{script:}} parser function
  • Allow named parameters to {{#invoke:}}
  • Don't trim the return value
  • If a function invoked by #invoke returns multiple values, concatenate them into a single string.
  • If there is an error during parse, show the error message as an HTML comment as well as via JavaScript. This makes parser test construction easier, and probably makes debugging easier also.
  • Rename mw_internal to mw_php to clarify its role. It is now strictly a private Lua -> PHP interface function table.
  • Protect mw.setup() against multiple invocation.
  • Fixed a bug in Scribunto_LuaStandaloneInterpreter::receiveMessage(): large packets caused fread() to return with less than the requested amount of data, which previously caused an exception. It's necessary to check for EOF and to repeat the read to get all data. The receive function on the Lua side does not suffer from this problem.
  • In the standalone engine, fixed a bug in the interpretation of null return values from PHP callbacks. This should return no values to Lua.
  • Updated the Lua unit tests to account for the fact that functions are now forced to return strings.
  • Updated the getfenv and setfenv tests to account for the extra stack level introduced by mw.executeFunction().

Change-Id: If8fdecdfc91ebe7bd4b1dae8489ccbdeb6bbf5ce

Details

Committed
Gerrit Code ReviewMay 26 2012, 11:42 AM
Parents
rMEXT2f9ba365cdbc: Updated mediawiki/extensions Project: mediawiki/extensions/WikidataRepo…
Branches
Unknown
Tags
Unknown
ChangeId
If8fdecdfc91ebe7bd4b1dae8489ccbdeb6bbf5ce

Event Timeline