classLabelFacts
final class LabelFacts
Restricted visibility: declared "@visibility SqlSemantics\Platform\MySql". Code outside that scope must not name this declaration.
Derives the labels of blocks and loops.
Rule: MYSQL-PROGRAM-LABELS-001. A label is in scope inside the statement it begins. A label that an enclosing statement already uses is reported (ER_SP_LABEL_REDEFINE); an end label that differs from the begin label is reported (ER_SP_LABEL_MISMATCH). Labels are compared without regard to letter case. Terminates: the label lists are finite. Source: https://dev.mysql.com/doc/refman/8.4/en/statement-labels.html. Status: Implemented.
Methods§
public function enter(
?Name $label,
?Name $end,
bool $loop,
Derivation $derivation,
ProgramScope $scope,
): ProgramScopeChecks the labels of a block or loop and answers the scope inside it.
Parameters
$label | ?Name | |
$end | ?Name | |
$loop | bool | |
$derivation | Derivation | |
$scope | ProgramScope |
Returns
Called from 2
Calls 7
- method-call ProgramScope::holds() line 32
- method-call Derivation::report() line 33
- new ProgramProblem line 33
- class-const ProgramRule::RedefinedLabel() line 33
- function-call
strcasecmpline 35 - class-const ProgramRule::EndLabelMismatch() line 36
- method-call ProgramScope::labeled() line 39
Test cases 1§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 1
LabelFactsTestcalls