Class OperatorSide
java.lang.Object
org.ek9lang.compiler.repair.OperatorSide
THE move of a prefix or suffix operator to its own side of a simple operand -
names$ to
$names, ?stored to stored? - for every editing tool. Use this; do not
re-derive the shape or the rule.
$, $$, #<, #>, #?, #^ and ~ are PREFIX
only and ? is SUFFIX only - the compiler's OperatorPositionMap. Written on the other
side, the parser stops at it (E01084 / E01085, "place BEFORE / AFTER the expression") and the text
has no other form it could be; bound to the operand it touches, as every language binds a unary
operator tighter than an infix one, the move has one reading. Only a SIMPLE operand moves - a name,
a member chain, a call - and never when another operand follows the operator; (a + b)$ and
x $y are left to the caller.
Measured (2026-09-28): 48 refusals across the record, nearly all Qwen3.8 create T4 - rtn:
names$$ sent five times in one failed run, against a pre-flight that named the fix each time.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordThe rewritten text and one note per rewrite;notesempty means nothing moved. -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanTrue whentexthas the shape at all - the cheap gate before a probe compile.(package private) static Stringlinewith the operator that starts atcolumnmoved to its side of the simple operand it touches; null when that is not exactly the shape.static StringmovedInEntry(String entry) entrywith every such operator moved, ONLY when the entry as sent does not parse and the moved one does - provable, not guessed; null otherwise.static OperatorSide.ResultMove the operator every E01084 / E01085 diagnostic sits on - the parser's own position for it - when it is exactly the shape.
-
Method Details
-
mayApply
True whentexthas the shape at all - the cheap gate before a probe compile. -
movedAt
-
movedInEntry
-
repair
Move the operator every E01084 / E01085 diagnostic sits on - the parser's own position for it - when it is exactly the shape. Anything less certain is skipped and the caller's refusal stands. Rewrites within one line, so the receipts can follow (SourceRepairs).
-