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

The state one PostgreSQL tokenization carries from token to token.

Properties§

public Cursor $cursor
public KeywordTable $keywords

Methods§

public function __construct(public Cursor $cursor, public KeywordTable $keywords)

Parameters

$cursorCursorReads the SQL text
$keywordsKeywordTableKeywords of the release
public function lexeme(string $name, int $start): Lexeme

Makes the lexeme spanning from an offset to the cursor.

Parameters

$namestringTerminal name
$startintByte offset the lexeme began at

Returns

Lexeme The lexeme
Test cases 1
Called from 12
Calls 3
public static function startsIdentifier(string $byte): bool

Reports whether a byte can begin an unquoted identifier.

Parameters

$bytestringThe byte, or an empty string at the end

Returns

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

Test cases 26§

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 24

Relations§

Instantiated in 1
Static calls 1
Method calls 12
Type declarations 11