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

Skips the whitespace and comments between MySQL tokens.

A /*! comment is versioned: when the release it names is not newer than the release being read for, its body is SQL and only the markers are skipped, with the closing marker recognised later at a token boundary. Any other block comment, a # comment, and a -- comment followed by a space are skipped whole.

Methods§

public function skip(Scan $scan): void

Skips every whitespace and comment at the cursor.

Parameters

$scanScanThe tokenization in progress

Throws

LexicalException When a block comment never closes
Test cases 3
Called from 1
Calls 3
public function blockComment(Scan $scan): void

Skips a block comment, or only its opening marker when its body is SQL.

Parameters

$scanScanThe tokenization in progress, positioned on the comment

Throws

LexicalException When the comment never closes
Test cases 2
Called from 1
Calls 1

Test cases 7§

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

Dedicated tests 5
Other tests reaching this symbol 2

Relations§

Instantiated in 1
Method calls 1
Type declarations 1