Lines Matching defs:context
22 * Represents `$` in an array in full context mode, when `$` doesn't mean
101 * context is in set.
190 * @param bool $rootIsWildcard `true` if this is a local-context merge,
191 * otherwise false to indicate a full-context merge
312 * These local-context merge operations are used when `rootIsWildcard`
325 * Special case of last merge if local context.
331 * These full-context merge operations are used when `rootIsWildcard`
561 PredictionContext $context,
565 if ($context->isEmpty()) {
566 return $context;
569 $existing = $visited[\spl_object_id($context)] ?? null;
575 $existing = $contextCache->get($context);
578 $visited[\spl_object_id($context)] = $existing;
585 for ($i = 0; $i < $context->getLength(); $i++) {
586 $parentContext = $context->getParent($i);
598 for ($j = 0; $j < $context->getLength(); $j++) {
599 $parents[$j] = $context->getParent($j);
610 $contextCache->add($context);
612 $visited[\spl_object_id($context)] = $context;
614 return $context;
622 $updated = SingletonPredictionContext::create($parents[0], $context->getReturnState(0));
624 if (!$context instanceof ArrayPredictionContext) {
625 throw new \RuntimeException('Unexpected context type.');
628 $updated = new ArrayPredictionContext($parents, $context->returnStates);
633 $visited[\spl_object_id($context)] = $updated;