final class Spelled
    uses Snapshot
Public API: explicitly declared with @visibility public.

How one token of a spelled region was written: the trivia before it and its own spelling.

The spelling is a choice among the equivalent spellings of the token the rendering produces at that position, such as the letter case of a keyword or the quoting of a name. It never adds or removes a token.

Reading the spelling of a tokendoctest
$token = new \SqlSemantics\Platform\Sqlite\Model\Statement\Spelling\Spelled(' ', 'and');
    [$token->gap, $token->text] // => [' ', 'and']

Properties§

public string $gap
public string $text

Methods§

public function __construct(public string $gap, public string $text)

Parameters

$gapstringThe whitespace and comments written before the token; empty for the first token of a region
$textstringThe spelling of the token
Calls 1

Test cases 20§

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 18

Relations§

Instantiated in 2
Constant reads 1