Class SourceTextForMessage

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

public final class SourceTextForMessage extends Object implements Function<org.antlr.v4.runtime.ParserRuleContext, String>
THE source text of an expression as a run-time message shows it (an assert or require failure): SourceTextOnOneLine, cut to SourceText.MESSAGE_LENGTH characters with a ... suffix when longer. Hold one and apply it.
  • Constructor Details

    • SourceTextForMessage

      public SourceTextForMessage()
  • Method Details

    • apply

      public String apply(org.antlr.v4.runtime.ParserRuleContext ctx)
      Specified by:
      apply in interface Function<org.antlr.v4.runtime.ParserRuleContext, String>