packages/sql-faker/src/Generation/Lexeme/Lexeme.php
1<?php
2
3declare(strict_types=1);
4
5namespace SqlFaker\Generation\Lexeme;
6
7use SqlFaker\Generation\Token\TerminalOccurrence;
8
9/**
10 * Concrete text and its lexical use, without a decision about surrounding spaces.
11 */
12final class Lexeme
13{
14 /**
15 * Keeps spelling, lexical category and occurrence provenance together as immutable output.
16 */
17 public function __construct(
18 public readonly string $text,
19 public readonly string $kind,
20 public readonly TerminalOccurrence $origin,
21 public readonly string $definition,
22 public readonly ?string $phrase = null,
23 ) {
24 }
25}
26