final class PreparedGrammar

Restores source grammar identities before dialect rewrites and retains scoped lexical conditions.

Properties§

public Grammar $grammar

Methods§

public function __construct(
    public Grammar $grammar,
    private array<string, array<int, array<string, LexemeConstraint>>> $lexemes,
)

Parameters

$grammarGrammar
$lexemesarray<string, array<int, array<string, LexemeConstraint>>>
public function restore(TerminalSequence $sequence): ScopedGeneration

Private surface 1§

Implementation details, listed for orientation only.

private array<string, array<int, array<string, LexemeConstraint>>> $lexemes

Test cases 7§

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 5

Relations§

Instantiated in 1
Type declarations 2