classLiteralRule
final class LiteralRule
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
$lowering | Lowering | The lowering this rule belongs to |
Lowers a literal term.
Parameters
$term | Node |
Returns
Throws
ImplementationGap When the production has no ruleCalls 9
- method-call LiteralRule::plain() line 56
- new TextLiteral line 57
- method-call Identifiers::decode() line 57
- new Identifiers line 57
- method-call LiteralRule::number() line 58
- new CurrentTime line 59
- static-call TimeKeyword::from() line 59
- function-call
strtoupperline 59 - static-call ImplementationGap::production() line 60
Lowers the token of the NULL, floating point and BLOB class by its terminal.
Parameters
$token | Token |
Returns
Called from 1
Calls 5
- new NullLiteral line 70
- new BlobLiteral line 73
- function-call
strtoupperline 73 - function-call
substrline 73 - method-call LiteralRule::number() line 76
public function number(Token $token): IntegerLiteral|HexLiteral|RealLiteralLowers a numeric token: a decimal integer, a hexadecimal integer or a floating point literal.
Parameters
$token | Token |
Returns
Called from 2
Calls 7
- function-call
str_replaceline 84 - function-call
preg_matchline 85 - new HexLiteral line 86
- function-call
strtoupperline 86 - new IntegerLiteral line 89
- static-call Check::invariant() line 92
- new RealLiteral line 94
Private surface 1§
Implementation details, listed for orientation only.
private Lowering $loweringTest cases 1§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 1
LiteralRuleTestcalls