Class QuestionMarkForms

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

final class QuestionMarkForms extends Object implements TextRule
The two ? spellings beside QuestionMarkWithValue's Type?: value that never parse:
  • <- rtn as String?? - a declaration's ? written twice (a tool rendering '<- rtn as T?' around a T? it was given, or a model doing the same): one ? is meant. Only at the END of a declaration - a ?? b elsewhere is E01096;
  • total ?:= 0 - "assign only if unset" with its two halves transposed: EK9 spells it :=?, and ?:= is no token (the lexer reads Elvis ?: then =). A declaration's name as T?:= v is QuestionMarkWithValue's.
  • Constructor Details

    • QuestionMarkForms

      QuestionMarkForms()
  • 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