|
Moodle
2.2.1
http://www.collinsharper.com
|


Public Member Functions | |
| getLineType () | |
Static Public Attributes | |
| static | $contTypes |
Protected Member Functions | |
| openFileReadOnly () | |
| getNextToken ($line, &$pos) | |
| isMultiLineCont () | |
| processLine ($line) | |
| isContinuation (&$token) | |
| getTokenType ($token) | |
Definition at line 24 of file PHPParser.php.
| getLineType | ( | ) |
Returns the type of line just read
Reimplemented from Parser.
Definition at line 385 of file PHPParser.php.
| getNextToken | ( | $ | line, |
| &$ | pos | ||
| ) | [protected] |
Gets the next token.
The same token can be returned several times for multi-line tokens.
| $line | The current line read from the file. |
| &$pos | The position of the next token string in the line. |
Definition at line 98 of file PHPParser.php.

| getTokenType | ( | $ | token | ) | [protected] |
Get the token type of a token (if exists) or the token itself.
| $token | Token |
Definition at line 455 of file PHPParser.php.

| isContinuation | ( | &$ | token | ) | [protected] |
Check if a line is a continuation of the previous line
| &$token | Second token in a line (after PHP start) |
Definition at line 398 of file PHPParser.php.

| isMultiLineCont | ( | ) | [protected] |
Determines if the beginning of current line is a continuation of an executable multi-line token.
Called at the first token of a line.
Definition at line 166 of file PHPParser.php.


| openFileReadOnly | ( | ) | [protected] |
Opens the file to be parsed in Read-only mode. Overriden to tokenize the whole file.
Reimplemented from Parser.
Definition at line 79 of file PHPParser.php.
| processLine | ( | $ | line | ) | [protected] |
Process a line read from the file and determine if it is an executable line or not.
This is the work horse function that does most of the parsing. To parse PHP, get_all_tokens() tokenizer function is used.
| $line | Line to be parsed. protected |
Reimplemented from Parser.
Definition at line 192 of file PHPParser.php.

$contTypes [static] |
array( "(", ",", ".", "=", T_LOGICAL_XOR, T_LOGICAL_AND, T_LOGICAL_OR, T_PLUS_EQUAL, T_MINUS_EQUAL, T_MUL_EQUAL, T_DIV_EQUAL, T_CONCAT_EQUAL, T_MOD_EQUAL, T_AND_EQUAL, T_OR_EQUAL, T_XOR_EQUAL, T_BOOLEAN_AND, T_BOOLEAN_OR, T_OBJECT_OPERATOR, T_DOUBLE_ARROW, "[", "]", T_LOGICAL_OR, T_LOGICAL_XOR, T_LOGICAL_AND, T_STRING )
Definition at line 40 of file PHPParser.php.