Class LayoutTabsReplaced

java.lang.Object
org.ek9lang.compiler.repair.LayoutTabsReplaced
All Implemented Interfaces:
Function<String,String>, UnaryOperator<String>

final class LayoutTabsReplaced extends Object implements UnaryOperator<String>
THE tab rule: a source with each LAYOUT tab replaced by two spaces (was LayoutRepairs.replaceLayoutTabs). The EK9 lexer decides which tabs are layout: a tab it reads as part of an INDENT/DEDENT/NL (in the indentation, or between tokens) is one the compiler rejects, and is replaced here. A tab inside any other token - a String, a backtick String, a character or regex literal, a comment - is part of that token's text and is kept, because replacing it would change what the program does. Outside this package, reach it through SourceRepairs.layoutTabsReplaced.