Public Member Functions | |
CBTCompiler ($text) | |
compile () | |
Compile the text. | |
doText ($start, $end) | |
Shortcut for doOpenText( $start, $end, false. | |
phpQuote ($text) | |
op ($opcode, $arg1=null, $arg2=null) | |
doOpenText (&$p, $end, $needClosing=true) | |
Recursive workhorse for text mode. | |
doOpenFunction (&$p, $end, $needClosing=true) | |
Recursive workhorse for function mode. | |
error ($text, $pos=false) | |
Set a flag indicating that an error has been found. | |
getLastError () | |
opsToString () | |
generatePHP ($functionObj) | |
Public Attributes | |
$mOps = array() | |
$mCode |
Definition at line 65 of file CBTCompiler.php.
CBTCompiler::CBTCompiler | ( | $ | text | ) |
CBTCompiler::compile | ( | ) |
Compile the text.
Returns true on success, error message on failure
Definition at line 77 of file CBTCompiler.php.
CBTCompiler::doOpenFunction | ( | &$ | p, | |
$ | end, | |||
$ | needClosing = true | |||
) |
Recursive workhorse for function mode.
Processes function mode starting from offset $p, until either $end is reached or a closing brace is found. If $needClosing is false, a closing brace will flag an error, if $needClosing is true, the lack of a closing brace will flag an error.
The parameter $p is advanced to the position after the closing brace, or after the end. A CBTValue is returned.
Definition at line 213 of file CBTCompiler.php.
References $end, $in, $start, doOpenText(), error(), and op().
Referenced by doOpenText().
CBTCompiler::doOpenText | ( | &$ | p, | |
$ | end, | |||
$ | needClosing = true | |||
) |
Recursive workhorse for text mode.
Processes text mode starting from offset $p, until either $end is reached or a closing brace is found. If $needClosing is false, a closing brace will flag an error, if $needClosing is true, the lack of a closing brace will flag an error.
The parameter $p is advanced to the position after the closing brace, or after the end. A CBTValue is returned.
Definition at line 135 of file CBTCompiler.php.
References $end, $in, $start, doOpenFunction(), error(), and op().
Referenced by doOpenFunction(), and doText().
CBTCompiler::doText | ( | $ | start, | |
$ | end | |||
) |
Shortcut for doOpenText( $start, $end, false.
Definition at line 110 of file CBTCompiler.php.
References $end, $start, and doOpenText().
Referenced by compile().
CBTCompiler::error | ( | $ | text, | |
$ | pos = false | |||
) |
Set a flag indicating that an error has been found.
Definition at line 260 of file CBTCompiler.php.
References $text.
Referenced by doOpenFunction(), and doOpenText().
CBTCompiler::generatePHP | ( | $ | functionObj | ) |
Definition at line 288 of file CBTCompiler.php.
References $args, $fname, $result, phpQuote(), wfProfileIn(), and wfProfileOut().
CBTCompiler::getLastError | ( | ) |
Definition at line 269 of file CBTCompiler.php.
CBTCompiler::op | ( | $ | opcode, | |
$ | arg1 = null , |
|||
$ | arg2 = null | |||
) |
CBTCompiler::opsToString | ( | ) |
CBTCompiler::phpQuote | ( | $ | text | ) |
CBTCompiler::$mCode |
Definition at line 67 of file CBTCompiler.php.
CBTCompiler::$mOps = array() |
Definition at line 66 of file CBTCompiler.php.