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
public ParameterSyntax $parameters = ParameterSyntax::Native

Methods§

public function __construct(
    public Cursor $cursor,
    public KeywordTable $keywords,
    public SqlMode $mode,
    public MySqlVersion $version,
    public ParameterSyntax $parameters = ParameterSyntax::Native,
)

Parameters

$cursorCursorReads the SQL text
$keywordsKeywordTableKeywords of the release
$modeSqlModeMode the text is read under
$versionMySqlVersionRelease the text is read for
$parametersParameterSyntaxWhich parameter markers are read
Calls 1
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 21
Calls 3

Test cases 37§

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 35

Relations§

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