Use p() in pPrec() for easier extensibility

This commit is contained in:
Nikita Popov 2017-02-09 00:03:00 +01:00
parent 4e55897059
commit d18ccfeec7

View File

@ -247,11 +247,11 @@ abstract class PrettyPrinterAbstract
if ($childPrecedence > $parentPrecedence if ($childPrecedence > $parentPrecedence
|| ($parentPrecedence == $childPrecedence && $parentAssociativity != $childPosition) || ($parentPrecedence == $childPrecedence && $parentAssociativity != $childPosition)
) { ) {
return '(' . $this->{'p' . $type}($node) . ')'; return '(' . $this->p($node) . ')';
} }
} }
return $this->{'p' . $type}($node); return $this->p($node);
} }
/** /**