Scribunto parser support
authorTim Starling <tstarling@wikimedia.org>
Tue, 22 May 2012 03:26:25 +0000 (13:26 +1000)
committerTim Starling <tstarling@wikimedia.org>
Tue, 22 May 2012 03:53:41 +0000 (13:53 +1000)
commit7fc5234cbee56deb538510131cf2f87467e38e4c
treedcec800b21d3cb954d331708b0b08b4f10323365
parent6b90f40da307b10d0d0e42ca396e45eef00a6c9c
Scribunto parser support

Add $indexOffset parameter to PPFrame::newChild(). This makes it
possible to use newChild() for interpreting named parameters to
invoke in Scribunto -- otherwise I would have had to duplicate its
functionality, which would have been tricky given that I wanted to
make a real frame with an expand() method. Setting $indexOffset allows
newChild() to start counting numbered parameters from somewhere other
than the first pipe character, leaving room for the Scribunto function
name.

Fixed PPCustomFrame_*::getArguments(), was missing for no apparent
reason. I didn't end up using it in Scribunto, but there's no harm in
adding it anyway.

Change-Id: I0c761aab8a7f1ae74e8d151a1346febb5c466e18
includes/parser/Preprocessor.php
includes/parser/Preprocessor_DOM.php
includes/parser/Preprocessor_Hash.php