Class MaskedLiterals

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

final class MaskedLiterals extends Object implements UnaryOperator<String>
THE line with its literals masked out, for a text rule searching for code (was SourceLines.masked): the content of every String, backtick String and character literal replaced by MASK, and a trailing // comment likewise - same length, so an index found in the mask is an index in the line. A rule searching for code (&&, a comma, /*) searches the mask, so it never rewrites text inside a literal.
  • Field Details

    • MASK

      static final char MASK
      What a masked character inside a String, backtick String or character literal is replaced by.
      See Also:
  • Constructor Details

    • MaskedLiterals

      MaskedLiterals()
  • Method Details