Class PlainStringValue
java.lang.Object
org.ek9lang.compiler.support.literals.PlainStringValue
- All Implemented Interfaces:
Function<EK9Parser.StringLitContext, Optional<String>>
public final class PlainStringValue
extends Object
implements Function<EK9Parser.StringLitContext, Optional<String>>
THE value of a plain
"..." String literal - the only String form EK9 reads at compile time: a constant, a
constraint, a text's language, a service parameter's name. Use this wherever one of those is read. The value is
the text with its quotes removed and its escapes decoded (DecodedEscapes), exactly as the String would hold
it - or empty for a backtick String.
Those were read from the raw source text, so a backtick String reached run time as its own lexeme: a constant held
`Welcome to ${APP_NAME}` backticks and all, for `fr ${"de"}` registered the text as 'de', and
HEADER `X-Token` bound to a header named with its backticks (front-end audit FE30, FE75). A backtick String
is not a compile-time literal, so it has no value here (E07902) - interpolated or not. The sibling for a Character
literal is CharacterLiteralText.
-
Constructor Details
-
PlainStringValue
public PlainStringValue()
-
-
Method Details
-
apply
- Specified by:
applyin interfaceFunction<EK9Parser.StringLitContext, Optional<String>>
-