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

The state one MySQL tokenization carries from token to token.

Properties§

public LexerState $next = LexerState::Start

State the next token is read in.

public bool $inVersionComment = false

Whether the text is inside a /*! comment whose body is read as SQL.

public Cursor $cursor
public KeywordTable $keywords
public SqlMode $mode
public MySqlVersion $version

Methods§

public function __construct(
    public Cursor $cursor,
    public KeywordTable $keywords,
    public SqlMode $mode,
    public MySqlVersion $version,
)

Parameters

$cursorCursorReads the SQL text
$keywordsKeywordTableKeywords of the release
$modeSqlModeMode the text is read under
$versionMySqlVersionRelease the text is read for
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 20
Calls 3

Test cases 36§

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 34

Relations§

Instantiated in 1
Static calls 8
Method calls 20
Type declarations 20