Class ConcatChainRenderer
java.lang.Object
org.ek9lang.compiler.repair.ConcatChainRenderer
THE rendering of a
+ chain as one backtick String - shared by the rewrite tool (StringConcatRewriter)
and the E11068 repair (ConcatenationInterpolation); hold one, do not re-derive the operand rules (was
StringConcatRewriter.renderChain). The chain is flattened, each literal becomes a segment (escaped by
LiteralBacktickString) and every other operand a ${...}, provided its SHAPE is admissible and
typeProblem (the semantic gate: a reason, or null when the operand is fine) accepts it. The repair passes a
gate that accepts everything: E11068 is raised after resolution, on a chain the compiler already typed as String
concatenation.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static final recordA+chain rendered as a backtick String, or the first operand that cannot be one: setrenderedwith the operand counts, orconflictKind/reasonnaming the refusal. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) ConcatChainRenderer.ChainRenderingapply(EK9Parser.ExpressionContext chain, String sourceText, Function<EK9Parser.ExpressionContext, String> typeProblem) The chain rendered, or the first operand refused - see the class javadoc.
-
Constructor Details
-
ConcatChainRenderer
ConcatChainRenderer()
-
-
Method Details
-
apply
ConcatChainRenderer.ChainRendering apply(EK9Parser.ExpressionContext chain, String sourceText, Function<EK9Parser.ExpressionContext, String> typeProblem) The chain rendered, or the first operand refused - see the class javadoc.
-