mirror of
https://github.com/nikic/PHP-Parser.git
synced 2025-07-09 16:36:31 +02:00
Compare commits
3 Commits
v1.0.0beta
...
0.9
Author | SHA1 | Date | |
---|---|---|---|
ef70767475 | |||
1cecf9efc5 | |||
5960ecfc10 |
14
CHANGELOG.md
14
CHANGELOG.md
@ -1,17 +1,21 @@
|
||||
Version 0.9.5-dev
|
||||
-----------------
|
||||
Version 0.9.5 (23.07.2014)
|
||||
--------------------------
|
||||
|
||||
* Add `NodeTraverser::removeVisitor()` method, which removes a visitor from the node traverser. This also modifies the
|
||||
corresponding `NodeTraverserInterface`.
|
||||
**This is the last release on the 0.9 branch.**
|
||||
|
||||
* Add `NodeTraverser::removeVisitor()` method, which removes a visitor from the node traverser. The method was not added
|
||||
to the corresponding `NodeTraverserInterface` to avoid BC breaks with custom traversers (it is added in version 1.0).
|
||||
|
||||
* Deprecated `PHPParser_Template` and `PHPParser_TemplateLoader`. This functionality does not belong in the main project
|
||||
and - as far as I know - nobody is using it.
|
||||
|
||||
* Fix alias resolution in `NameResolver`: Class names are now correctly handled as case-insensitive.
|
||||
|
||||
* The undefined variable error, which is used to the lexer to reset the error state, will no longer interfere with
|
||||
* The undefined variable error, which is used in the lexer to reset the error state, will no longer interfere with
|
||||
custom error handlers.
|
||||
|
||||
* Make lexer compatible with `xdebug.scream`.
|
||||
|
||||
Version 0.9.4 (25.08.2013)
|
||||
--------------------------
|
||||
* [PHP 5.5] Add support for `ClassName::class`. This is parsed as an `Expr_ClassConstFetch` with `'class'` being the
|
||||
|
@ -15,7 +15,7 @@ Create a `composer.json` file in your project root and use it to define your dep
|
||||
|
||||
{
|
||||
"require": {
|
||||
"nikic/php-parser": "0.9.4"
|
||||
"nikic/php-parser": "0.9.5"
|
||||
}
|
||||
}
|
||||
|
||||
@ -33,7 +33,7 @@ Installing as a PEAR package
|
||||
Run the following two commands:
|
||||
|
||||
pear channel-discover nikic.github.com/pear
|
||||
pear install nikic/PHPParser-0.9.4
|
||||
pear install nikic/PHPParser-0.9.5
|
||||
|
||||
Installing as a Git Submodule
|
||||
-----------------------------
|
||||
|
@ -30,10 +30,14 @@ class PHPParser_Lexer
|
||||
* @throws PHPParser_Error on lexing errors (unterminated comment or unexpected character)
|
||||
*/
|
||||
public function startLexing($code) {
|
||||
$scream = ini_set('xdebug.scream', 0);
|
||||
|
||||
$this->resetErrors();
|
||||
$this->tokens = @token_get_all($code);
|
||||
$this->handleErrors();
|
||||
|
||||
ini_set('xdebug.scream', $scream);
|
||||
|
||||
$this->code = $code; // keep the code around for __halt_compiler() handling
|
||||
$this->pos = -1;
|
||||
$this->line = 1;
|
||||
|
@ -9,13 +9,6 @@ interface PHPParser_NodeTraverserInterface
|
||||
*/
|
||||
function addVisitor(PHPParser_NodeVisitor $visitor);
|
||||
|
||||
/**
|
||||
* Removes an added visitor.
|
||||
*
|
||||
* @param PHPParser_NodeVisitor $visitor
|
||||
*/
|
||||
function removeVisitor(PHPParser_NodeVisitor $visitor);
|
||||
|
||||
/**
|
||||
* Traverses an array of nodes using the registered visitors.
|
||||
*
|
||||
|
Reference in New Issue
Block a user