#116: Returns reference results in parsing error
Issue revisions
- new by Manuel Pichler at 2010-F-21 13:31
- assigned by Manuel Pichler at 2010-F-21 13:31
- assigned by Manuel Pichler at 2010-F-21 13:31
- closed by Manuel Pichler at 2010-F-22 8:23
| Type | |
|---|---|
| State | |
| Priority | |
| Resolution | |
| Assigned to | Manuel Pichler |
| Scheduled for | 0.9.10 |
| Affected versions | 0.9.x |
| Affected components | Tokenizer, Parser |
| Last change | Monday 22 February 2010 08:23:17 UTC by Manuel Pichler |
Short description
The current parser/tokenizer implementation throws an exception when a method/function that is named like a reserved php keyword and returns by reference.
Environment
PHP 5.3.1 PHP_Depend latest checkout of version 0.9.10
Steps to reproduce
<?php
/**
* @package bug
*/
class Foo {
function &parent() {}
}
mapi@arwen ~ $ pdepend.php --summary-xml=/tmp/sum.xml /tmp/bug.php
Expected behavior
No error occures.
Actual behavior
Following errors occured: Unexpected token: parent, line: 6, col: 15, file: /tmp/bug.php.
Manuel Pichler at Sunday 21 February 2010 13:31:44 UTC
Scheduled for version 0.9.10
Manuel Pichler at Monday 22 February 2010 08:23:17 UTC
Fixed in svn revision #1090