Class TextLanguageDefinedOrError
- All Implemented Interfaces:
BiConsumer<ISymbol, EK9Parser.ParamExpressionContext>
defines text for block is an error
(E07157, Steve 2026-11-02).
Say("fr") is lowered to the base's generated _textFactory(lang), which compares the String EXACTLY
with each block's language and, when none matches, returns an UNSET Say whose messages are unset Strings.
For a language computed at run time that is right - the program asks with ? or falls back with
Say(lang) ?: Say("en"). But a literal is known now: Say("de") with only "en", "fr" and "zh" blocks,
or Report("en") with only an "en_GB" block (there is no fallback from a region to its language), can never
be set. Both the assigned form and the chained form, Say("de").hello(), are calls, so both come here.
The languages are THE text's variants (TextVariantsOf), read across every file of the module. Only a plain
"..." literal (PlainStringValue), perhaps in parentheses, is judged: a variable, a call or a
backtick String is never this error.
-
Field Summary
Fields inherited from class RuleSupport
errorListener, symbolsAndScopes -
Constructor Summary
ConstructorsConstructorDescriptionTextLanguageDefinedOrError(SymbolsAndScopes symbolsAndScopes, ErrorListener errorListener) -
Method Summary
Modifier and TypeMethodDescriptionvoidaccept(ISymbol resolved, EK9Parser.ParamExpressionContext paramExpression) Check a call that has been resolved.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface BiConsumer
andThen
-
Constructor Details
-
TextLanguageDefinedOrError
TextLanguageDefinedOrError(SymbolsAndScopes symbolsAndScopes, ErrorListener errorListener)
-
-
Method Details
-
accept
Check a call that has been resolved.- Specified by:
acceptin interfaceBiConsumer<ISymbol, EK9Parser.ParamExpressionContext>- Parameters:
resolved- what the call resolved to - a text base's constructor is the case judgedparamExpression- the arguments as written
-