final class LiteralRule
Restricted visibility: declared "@visibility SqlSemantics\Platform\Sqlite". Code outside that scope must not name this declaration.

Lowers literal tokens into exact literal values.

Rule: SQLITE-LITERAL-001. Scope: term and the numeric token classes. A numeric token loses its digit separators and becomes a decimal integer, a hexadecimal integer or a floating point literal by its spelling; a string is decoded; a BLOB keeps its hexadecimal digits in upper case. Each literal is recorded as an operand leaf. Source: https://sqlite.org/lang_expr.html#literal_values_constants_. Status: Implemented.

Methods§

public function __construct(private Lowering $lowering)

Parameters

$loweringLoweringThe lowering this rule belongs to
public function term(Node $term): Scalar

Lowers a literal term.

Parameters

$termNode

Returns

Throws

ImplementationGap When the production has no rule
Calls 9
public function plain(Token $token): Scalar

Lowers the token of the NULL, floating point and BLOB class by its terminal.

Parameters

$tokenToken

Returns

Called from 1
Calls 5
public function number(Token $token): IntegerLiteral|HexLiteral|RealLiteral

Lowers a numeric token: a decimal integer, a hexadecimal integer or a floating point literal.

Parameters

$tokenToken
Called from 2
Calls 7

Private surface 1§

Implementation details, listed for orientation only.

private Lowering $lowering

Test cases 1§

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

Dedicated tests 1

Relations§

Instantiated in 1
Type declarations 1