Interface SyntaxErrorReportable

All Known Implementing Classes:
AbstractLexer, AbstractParser, GroovyLangLexer, GroovyLangParser, GroovyLexer, GroovyParser

public interface SyntaxErrorReportable
A SyntaxErrorReportable is a recognizer that can report syntax error
  • Field Details

  • Method Details

    • require

      default void require(boolean condition, String msg, int offset, boolean toAttachPositionInfo)
    • require

      default void require(boolean condition, String msg, Tuple2<Integer,Integer> offset, boolean toAttachPositionInfo)
    • require

      default void require(boolean condition, String msg, boolean toAttachPositionInfo)
    • require

      default void require(boolean condition, String msg, int offset)
    • require

      default void require(boolean condition, String msg, Tuple2<Integer,Integer> offset)
    • require

      default void require(boolean condition, String msg)
    • throwSyntaxError

      default void throwSyntaxError(String msg, int offset, boolean toAttachPositionInfo)
    • throwSyntaxError

      default void throwSyntaxError(String msg, Tuple2<Integer,Integer> offset, boolean toAttachPositionInfo)
      Parameters:
      toAttachPositionInfo - if true, append " @ line N, column M" to the exception message. Leave false when the error will be wrapped in SyntaxException, which already appends the same location (otherwise the displayed message repeats the position).
    • getSyntaxErrorSource

      int getSyntaxErrorSource()
    • genPositionInfo

      default PositionInfo genPositionInfo(int offset)
    • genPositionInfo

      default PositionInfo genPositionInfo(Tuple2<Integer,Integer> offset)
    • getErrorLine

      int getErrorLine()
    • getErrorColumn

      int getErrorColumn()