Class PlainStringLiteralOrError
java.lang.Object
org.ek9lang.compiler.phase1.PlainStringLiteralOrError
- All Implemented Interfaces:
BiConsumer<EK9Parser.StringLitContext, String>
final class PlainStringLiteralOrError
extends Object
implements BiConsumer<EK9Parser.StringLitContext, String>
Where EK9 needs a String it can read at compile time - a constant, a constraint, a text's language, a service
parameter's name - only a plain
"..." literal will do (E07902). A backtick String, interpolated or not, is
not a compile-time literal: it used to be accepted and then read from its raw source text, so its lexeme - backticks
and all - became the value (front-end audit FE30, FE75). Steve: "only \"\" allowed".-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaccept(EK9Parser.StringLitContext ctx, String what) Check the String literal.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface BiConsumer
andThen
-
Constructor Details
-
PlainStringLiteralOrError
PlainStringLiteralOrError(ErrorListener errorListener)
-
-
Method Details
-
accept
Check the String literal.- Specified by:
acceptin interfaceBiConsumer<EK9Parser.StringLitContext, String>- Parameters:
ctx- the String literalwhat- what it is, for the message - "a constant", "a text's language"
-