final class Lexeme

Concrete text and its lexical use, without a decision about surrounding spaces.

Properties§

public string $text
public string $kind
public string $definition
public ?string $phrase = null

Methods§

public function __construct(
    public string $text,
    public string $kind,
    public TerminalOccurrence $origin,
    public string $definition,
    public ?string $phrase = null,
)

Keeps spelling, lexical category and occurrence provenance together as immutable output.

Parameters

$textstring
$kindstring
$originTerminalOccurrence
$definitionstring
$phrase?string
Test cases 1

Test cases 71§

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

Dedicated tests 1
Other tests reaching this symbol 70

Relations§

Instantiated in 12
Type declarations 6