Class Parser
Parses PHP tokens into syntax tree.
Methods summary
public
|
|
public
Pharborist\RootNode
|
|
public static
Pharborist\RootNode |boolean
|
#
parseFile( string $filename )
Parse a file and return the parsed tree
Parse a file and return the parsed tree
Parameters
Returns
Pharborist\RootNode |boolean The top-level node of the parsed tree or FALSE if the file contents
could not be read.
|
public static
Pharborist\RootNode
|
#
parseSource( string $source )
Parse PHP source code and return the parsed tree.
Parse PHP source code and return the parsed tree.
Parameters
Returns
|
public static
Pharborist\Node
|
#
parseSnippet( string $snippet )
Parse a snippet of PHP and return the node of first element.
Parse a snippet of PHP and return the node of first element.
Parameters
- $snippet
- PHP snippet without the opening PHP tag
Returns
|
public static
Pharborist\ExpressionNode
|
#
parseExpression( string $expression )
Parse a PHP expression.
Parameters
- $expression
- PHP expression snippet.
Returns
|