Lines Matching refs:code

150     public function addProp(int $code, string $prop) {  argument
157 if ($code === $lastRange->end + 1) {
163 $this->propRanges[$propIdx][] = new Range($code, $code);
238 $code = intval($fields[0], 16);
252 $data->addPropRange($code, $nextCode, $generalCategory);
255 $data->addPropRange($code, $nextCode, $bidiClass);
260 $data->addProp($code, $generalCategory);
263 $data->addProp($code, $bidiClass);
269 $data->addCaseMapping('upper', $code, $upperCase);
272 $data->addCaseMapping('lower', $code, $lowerCase);
275 $data->addCaseMapping('title', $code, $titleCase);
294 $code = intval($fields[0], 16);
303 if (!isset($data->caseMaps['fold'][$code])) {
304 $data->addCaseMapping('fold', $code, $foldCode);
307 assert(is_array($data->caseMaps['fold'][$code]));
308 $data->caseMaps['fold'][$code][0] = $foldCode;
312 $existingFoldCode = $data->caseMaps['fold'][$code] ?? $code;
313 $data->caseMaps['fold'][$code] = array_merge([$code], $foldCodes);
320 function addSpecialCasing(UnicodeData $data, string $type, int $code, array $caseCodes) : void { argument
321 $simpleCaseCode = $data->caseMaps[$type][$code] ?? $code;
329 if ($type == 'title' && $code == $caseCodes[0]
330 && ($data->caseMaps['upper'][$code] ?? $code) != $code) {
331 $data->caseMaps['title'][$code] = $code;
340 $data->caseMaps[$type][$code] = array_merge([$simpleCaseCode], $caseCodes);
349 $code = intval($fields[0], 16);
360 addSpecialCasing($data, 'lower', $code, $lower);
361 addSpecialCasing($data, 'upper', $code, $upper);
364 addSpecialCasing($data, 'title', $code, $title);
417 $code = intval($fields[0], 16);
421 if ($code == $lastRange->end + 1) {
427 $wideRanges[] = new Range($code, $code);
515 foreach ($data->caseMaps['title'] as $code => $titleCode) {
516 if ($titleCode == ($data->caseMaps['upper'][$code] ?? $code)) {
517 unset($data->caseMaps['title'][$code]);
524 foreach ($caseMap as $code => $caseCode) {
529 $data->caseMaps[$type][$code] = ($len << 24) | $idx;