Class DefinesPlacement
java.lang.Object
org.ek9lang.compiler.repair.DefinesPlacement
- All Implemented Interfaces:
TextRule
A
defines <block> line (class, function, program, ...) at any indent but two. Only defines module
sits at column 0; every other defines opens a block of that module and sits at exactly two spaces - the
grammar admits no other place, so moving it there is the only reading. Measured: 48 harness events (22 at column
0), nearly all from multi-line edit_file replacements.
The block's content moves WITH the header when it was written relative to it (header at 0, content at 2), and stays when it already sits at 4 - the depth it belongs at. Content at any other depth leaves the rule out.
-
Nested Class Summary
Nested classes/interfaces inherited from interface TextRule
TextRule.Rewrite -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionapply(List<String> lines, SyntaxProbe.SyntaxError failure) The rewrite oflinesansweringfailure, or null.
-
Constructor Details
-
DefinesPlacement
DefinesPlacement()
-
-
Method Details