Class SyntaxError

java.lang.Object
io.karatelabs.parser.SyntaxError

public class SyntaxError extends Object
Represents a recoverable syntax error during lenient parsing. Unlike ParserException which is thrown for fatal errors, SyntaxError is collected during error-tolerant parsing to enable IDE features like syntax coloring even when the source code is incomplete.
  • Field Details

    • token

      public final Token token
    • message

      public final String message
    • expected

      public final NodeType expected
  • Constructor Details

  • Method Details

    • getLine

      public int getLine()
    • getColumn

      public int getColumn()
    • getOffset

      public long getOffset()
    • toString

      public String toString()
      Overrides:
      toString in class Object