classStringJoining
final class StringJoining
Restricted visibility: declared "@visibility Deriver\Deriver\Evaluator" and "@visibility Deriver\Deriver\Evaluator\Execution". Code outside that scope must not name this declaration.
Joins known array shapes and known heads of symbolic merges without losing string fragments around unknown elements.
Properties§
public Evaluator $machineMethods§
public function __construct(public Evaluator $machine)Parameters
$machine | Evaluator | Shared conversions and method calls |
public function apply(
CallableGraph $caller,
Instruction $instruction,
State $state,
list<Term> $values,
): list<State>|nullParameters
$caller | CallableGraph | Evaluator frame |
$instruction | Instruction | Intrinsic destination |
$state | State | Bound inputs |
$values | list<Term> | Separator and array |
Returns
list<State>|null Converted results, or a case for the ordinary intrinsicCalled from 1
Calls 11
- class-const TermKind::Constant() line 43
- static-call Term::constant() line 44
- method-call TypePredicates::apply() line 46
- new TypePredicates line 46
- method-call Arrays::tail() line 49
- new Arrays line 49
- method-call StringJoining::suffix() line 51
- method-call Arrays::split() line 53
- method-call StringJoining::partial() line 55
- class-const TermKind::Array() line 57
- method-call StringJoining::join() line 60
public function join(
CallableGraph $caller,
Instruction $instruction,
State $state,
Term $separator,
Term $array,
): list<State>Converts each known element in order, keeping user conversion effects and failures.
Parameters
$caller | CallableGraph | Evaluator frame |
$instruction | Instruction | Intrinsic destination |
$state | State | Bound inputs |
$separator | Term | String separator |
$array | Term | Closed array shape |
Returns
list<State> Joined results and conversion exceptionsCalled from 4
- method-call Deriver\Deriver\Evaluator\Execution\Operation\StringJoining::apply() packages/deriver/src/Deriver/Evaluator/Execution/Operation/StringJoining.php:60
- method-call Deriver\Deriver\Evaluator\Execution\Operation\StringJoining::partial() packages/deriver/src/Deriver/Evaluator/Execution/Operation/StringJoining.php:117
- method-call Deriver\Deriver\Evaluator\Execution\Operation\StringJoining::suffix() packages/deriver/src/Deriver/Evaluator/Execution/Operation/StringJoining.php:157
- method-call Deriver\Deriver\Evaluator\Execution\Operation\StringJoining::suffix() packages/deriver/src/Deriver/Evaluator/Execution/Operation/StringJoining.php:168
Calls 6
- static-call Term::constant() line 74
- method-call Conversions::string() line 80
- new Conversions line 80
- class-const CompletionKind::Normal() line 81
- new Operations line 85
- method-call Operations::binary() line 86
public function partial(
CallableGraph $caller,
Instruction $instruction,
State $state,
Term $separator,
array{Term, Term} $split,
): list<State>Joins the known head exactly when the appended source is empty, and otherwise keeps it before an explicit residual for the source.
Parameters
$caller | CallableGraph | Evaluator frame |
$instruction | Instruction | Intrinsic destination |
$state | State | Bound inputs |
$separator | Term | String separator |
$split | array{Term, Term} | Closed integer-keyed head and appended source |
Returns
list<State> Exact, partial, and exceptional resultsCalled from 1
Calls 10
- new Operations line 114
- method-call Operations::binary() line 115
- static-call Term::array() line 115
- method-call StringJoining::join() line 117
- class-const CompletionKind::Normal() line 118
- method-call Constraints::assume() line 124
- new Constraints line 124
- method-call UnknownCall::apply() line 130
- new UnknownCall line 130
- new PassedArgument line 130
public function suffix(
CallableGraph $caller,
Instruction $instruction,
State $state,
Term $separator,
array{Term, Term} $split,
): list<State>Keeps known trailing entries after a symbolic unpack, including the empty-prefix case.
Parameters
$caller | CallableGraph | Evaluator frame |
$instruction | Instruction | Intrinsic destination |
$state | State | Bound inputs |
$separator | Term | String separator |
$split | array{Term, Term} | Unknown prefix and known suffix |
Returns
list<State> Exact, partial, and exceptional pathsCalled from 1
Calls 12
- new Operations line 152
- method-call Operations::binary() line 153
- static-call Term::array() line 153
- method-call State::fork() line 155
- method-call Constraints::assume() line 156
- new Constraints line 156
- function-call
array_pushline 157 - method-call StringJoining::join() line 157
- method-call UnknownCall::apply() line 162
- new UnknownCall line 162
- new PassedArgument line 162
- class-const CompletionKind::Normal() line 163