final class Reductions
Restricted visibility: declared "@visibility SqlFormatter". Code outside that scope must not name this declaration.

Collects grammar-owned reductions that must be validated by reparsing.

Methods§

public function __construct(
    private Grouping $grouping,
    private array<string, string|null> $aliases,
)

Parameters

$groupingGrouping
$aliasesarray<string, string|null>Alias owners and optional required parents
public function candidates(Node $tree, array<int, true> $protected): list<list<int>>

Excludes candidates that cross or carry directives.

Parameters

$treeNode
$protectedarray<int, true>

Returns

list<list<int>> Token offsets to omit together
Test cases 1
Called from 1
Calls 8
public function aliases(Node $node, ?Node $parent = null): list<int>

Finds AS only in alias productions, never inside CAST or CTE syntax.

Parameters

$nodeNode
$parent?Node

Returns

list<int>
Test cases 1
Called from 2
Calls 3

Private surface 2§

Implementation details, listed for orientation only.

private Grouping $grouping
private array<string, string|null> $aliases

Test cases 17§

Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.

Dedicated tests 2
Other tests reaching this symbol 15

Relations§

Instantiated in 1
Method calls 1