Class LiteralExpression
java.lang.Object
dev.frostlake.executor.expressions.LiteralExpression
- All Implemented Interfaces:
Expression
Represents a literal value (string, number, boolean, null)
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<T> Taccept(ExpressionVisitor<T> visitor) Accept a visitor for the visitor patternWhere this literal was written, or null when it was synthesised.getType()getValue()voidsetPosition(SourcePosition where) Note where the literal was written.toString()
-
Constructor Details
-
LiteralExpression
-
-
Method Details
-
getValue
-
getPosition
Where this literal was written, or null when it was synthesised. Metadata only — it takes no part in equality, so the by-text AST cache is unaffected.- Returns:
- the position, or null
-
setPosition
Note where the literal was written.- Parameters:
where- the literal's own place in the fragment it was parsed from
-
getType
-
accept
Description copied from interface:ExpressionAccept a visitor for the visitor pattern- Specified by:
acceptin interfaceExpression
-
toString
-