mirror of
https://github.com/danog/PHP-Parser.git
synced 2024-11-27 04:14:44 +01:00
Preserve case of "static" class name
This commit is contained in:
parent
c0340053d1
commit
ef121e690c
@ -678,7 +678,7 @@ function_call:
|
||||
;
|
||||
|
||||
class_name:
|
||||
T_STATIC { $$ = Name['static']; }
|
||||
T_STATIC { $$ = Name[$1]; }
|
||||
| name { $$ = $1; }
|
||||
;
|
||||
|
||||
|
@ -2167,7 +2167,7 @@ class Parser extends ParserAbstract
|
||||
}
|
||||
|
||||
protected function reduceRule289($attributes) {
|
||||
$this->semValue = new Node\Name('static', $attributes);
|
||||
$this->semValue = new Node\Name($this->semStack[$this->stackPos-(1-1)], $attributes);
|
||||
}
|
||||
|
||||
protected function reduceRule290($attributes) {
|
||||
|
@ -343,6 +343,6 @@ EOC;
|
||||
|
||||
$this->assertEquals('SELF', (string)$methodStmt->stmts[0]->class);
|
||||
$this->assertEquals('PARENT', (string)$methodStmt->stmts[1]->class);
|
||||
$this->assertEquals('static', (string)$methodStmt->stmts[2]->class);
|
||||
$this->assertEquals('STATIC', (string)$methodStmt->stmts[2]->class);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user