mirror of
https://github.com/danog/PHP-Parser.git
synced 2024-11-26 11:54:52 +01:00
Fix bug in pretty printer
This commit is contained in:
parent
46221a0914
commit
9407d9a4b9
@ -1032,8 +1032,11 @@ class Standard extends PrettyPrinterAbstract
|
||||
}
|
||||
|
||||
protected function pNewVariable(Node $node) {
|
||||
// TODO: This is not fully accurate.
|
||||
return $this->pDereferenceLhs($node);
|
||||
if (!$node instanceof Scalar\String_) {
|
||||
return $this->pDereferenceLhs($node);
|
||||
} else {
|
||||
return '(' . $this->p($node) . ')';
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user