Class ForeignLogicalOperators

java.lang.Object
org.ek9lang.compiler.repair.ForeignLogicalOperators
All Implemented Interfaces:
TextRule

final class ForeignLogicalOperators extends Object implements TextRule
A foreign spelling (was ForeignSyntax.logicalOperators): a && b / a || b - EK9's a and b / a or b. Only code is rewritten (never the inside of a String or a comment - see MaskedLiterals), and only on the line the parser stopped on. The other foreign spellings are ForeignBlockColon, ForeignHashComment, ForeignBlockComment and ForeignGenericType.
  • Constructor Details

    • ForeignLogicalOperators

      ForeignLogicalOperators()
  • Method Details

    • apply

      public TextRule.Rewrite apply(List<String> lines, SyntaxProbe.SyntaxError failure)
      Description copied from interface: TextRule
      The rewrite of lines answering failure, or null.
      Specified by:
      apply in interface TextRule
      Parameters:
      lines - the source's lines (never modified by a rule - a rewrite carries its own copy)
      failure - the first syntax error, as the parser reported it