packages/sql-semantics-sqlite/src/Model/Rendering/Piece.php
1<?php
2
3declare(strict_types=1);
4
5namespace SqlSemantics\Platform\Sqlite\Model\Rendering;
6
7/**
8 * One lexical unit of rendered SQL.
9 *
10 * @visibility SqlSemantics
11 */
12final class Piece
13{
14 /**
15 * @param PieceKind $kind What the piece is
16 * @param string $text The exact spelling
17 * @param bool $glued Whether the piece follows the previous one without a separating space
18 * @param string|null $gap The exact trivia written before the piece, from a layout; null for the regular spacing
19 */
20 public function __construct(public readonly PieceKind $kind, public readonly string $text, public readonly bool $glued = false, public readonly ?string $gap = null)
21 {
22 }
23}
24