Compare commits

...

3 Commits

Author SHA1 Message Date
ef70767475 Release version 0.9.5 2014-07-23 20:24:17 +02:00
1cecf9efc5 Revert change to NodeTraverserInterface
Only add this method in 1.0, to avoid any BC breaks.
2014-07-23 20:21:42 +02:00
5960ecfc10 Disable xdebug.scream while lexing 2014-04-19 22:26:05 +02:00
4 changed files with 15 additions and 14 deletions

View File

@ -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

View File

@ -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
-----------------------------

View File

@ -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;

View File

@ -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.
*