function PrettyPrinterAbstract::initializeLabelCharMap
Lazily initializes label char map.
The label char map determines whether a certain character may occur in a label.
1 call to PrettyPrinterAbstract::initializeLabelCharMap()
- PrettyPrinterAbstract::printFormatPreserving in vendor/
nikic/ php-parser/ lib/ PhpParser/ PrettyPrinterAbstract.php - Perform a format-preserving pretty print of an AST.
File
-
vendor/
nikic/ php-parser/ lib/ PhpParser/ PrettyPrinterAbstract.php, line 1276
Class
Namespace
PhpParserCode
protected function initializeLabelCharMap() : void {
if (isset($this->labelCharMap)) {
return;
}
$this->labelCharMap = [];
for ($i = 0; $i < 256; $i++) {
$chr = chr($i);
$this->labelCharMap[$chr] = $i >= 0x80 || ctype_alnum($chr);
}
if ($this->phpVersion
->allowsDelInIdentifiers()) {
$this->labelCharMap[""] = true;
}
}