kinds = $kinds; $this->prefix = $prefix; $this->leftSide = $leftSide; $this->leftSideNode = $leftSideNode; $this->leftSideTypes = (array) $leftSideTypes; $this->leftSideValue = $leftSideValue; $this->tokens = $tokens; $this->input = $input; $this->readlineInfo = $readlineInfo; $this->parseSucceeded = $parseSucceeded; } /** * Return a copy with updated completion context for a later pipeline stage. */ public function withContext(int $kinds, string $prefix = '', ?string $leftSide = null, ?Node $leftSideNode = null): self { // Types and value are cleared because CompletionEngine re-resolves // them after all refiners have run. $copy = clone $this; $copy->kinds = $kinds; $copy->prefix = $prefix; $copy->leftSide = $leftSide; $copy->leftSideNode = $leftSideNode; $copy->leftSideTypes = []; $copy->leftSideValue = null; return $copy; } }