Class CanonicalIndenter
java.lang.Object
org.ek9lang.compiler.formatter.CanonicalIndenter
Pass 1 of the EK9 source formatter: Canonical Indentation.
Parses the EK9 source to obtain the token stream with INDENT/DEDENT tokens, builds a map of line numbers to indent levels, then re-writes each source line with canonical 2-space indentation.
Also handles:
- Trailing whitespace stripping on every line
- Maximum 1 consecutive blank line
- File ends with exactly one newline
#!ek9always at line 1, column 0
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
CanonicalIndenter
public CanonicalIndenter()
-
-
Method Details
-
indent
-