function Parser::postInit
Post initialize operations
Return value
void
Overrides ParserAbstract::postInit
File
-
vendor/
mck89/ peast/ lib/ Peast/ Syntax/ Parser.php, line 158
Class
- Parser
- Parser class
Namespace
Peast\SyntaxCode
protected function postInit() {
//Remove exponentiation operator if the feature
//is not enabled
if (!$this->features->exponentiationOperator) {
Utils::removeArrayValue($this->assignmentOperators, "**=");
unset($this->logicalBinaryOperators["**"]);
}
//Remove coalescing operator if the feature
//is not enabled
if (!$this->features->coalescingOperator) {
unset($this->logicalBinaryOperators["??"]);
}
//Remove logical assignment operators if the
//feature is not enabled
if (!$this->features->logicalAssignmentOperators) {
foreach (array(
"&&=",
"||=",
"??=",
) as $op) {
Utils::removeArrayValue($this->assignmentOperators, $op);
}
}
}