Class WritingOperator

java.lang.Object
org.ek9lang.compiler.support.WritingOperator
All Implemented Interfaces:
Function<org.antlr.v4.runtime.ParserRuleContext, String>

public final class WritingOperator extends Object implements Function<org.antlr.v4.runtime.ParserRuleContext, String>
THE grammar's write positions: which operator, if any, writes the thing an identifier occurrence names (SymbolWrites collects these over a symbol's uses). Was SymbolWrites.writingOperator (no-statics lane S3, 2026-10-29).
  • Constructor Details

    • WritingOperator

      public WritingOperator()
  • Method Details

    • apply

      public String apply(org.antlr.v4.runtime.ParserRuleContext node)
      The operator that writes the thing node names, or null when this occurrence only reads it. Purely structural (it needs no recorded symbol), so a caller holding an identifier occurrence - of the compiled tree or of a re-parsed body - asks HERE whether it is written rather than re-deriving the grammar's write positions.
      Specified by:
      apply in interface Function<org.antlr.v4.runtime.ParserRuleContext, String>
      Parameters:
      node - the identifier node of the occurrence (as RecordedSymbols.Reference.node())