final class Scan
Restricted visibility: declared "@visibility root". Code outside that scope must not name this declaration.

The state one SQLite tokenization carries from token to token.

Properties§

public list<Lexeme> $lexemes = []

Lexemes read so far, in text order.

public Cursor $cursor
public KeywordTable $keywords
public array<string, true> $fallbacks = []

Methods§

public function __construct(
    public Cursor $cursor,
    public KeywordTable $keywords,
    public array<string, true> $fallbacks = [],
)

Parameters

$cursorCursorReads the SQL text
$keywordsKeywordTableKeywords of the release
$fallbacksarray<string, true>Keywords the grammar lets fall back to identifiers
public function last(): Lexeme|null

Answers the lexeme read last, if any.

Returns

Lexeme|null The last lexeme
Test cases 1
Called from 2
Calls 1
public static function isIdentifierByte(string $byte): bool

Reports whether a byte can be part of an unquoted identifier.

Parameters

$bytestringThe byte, or an empty string at the end

Returns

bool True for letters, digits, underscore, dollar and every byte of a multi-byte character
Test cases 1
Called from 2
Calls 2

Test cases 23§

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

Dedicated tests 3
Other tests reaching this symbol 20

Relations§

Instantiated in 2
Static calls 2
Method calls 10
Type declarations 9