Class ParseResult<T extends TSqlFragment>

java.lang.Object
io.github.fupacat.ParseResult<T>
Type Parameters:
T - The subtype of TSqlFragment produced (typically TSqlScript).
All Implemented Interfaces:
Serializable

public class ParseResult<T extends TSqlFragment> extends Object implements Serializable
Encapsulates the output of a T-SQL parsing operation, containing the generated Abstract Syntax Tree (AST) fragment and any syntax or compatibility errors encountered.
See Also:
  • Constructor Details

  • Method Details

    • fragment

      public T fragment()
      Returns the parsed AST fragment, or null if parsing failed catastrophically.
    • errors

      public List<ParseError> errors()
      Returns an unmodifiable list of any parse or compatibility errors.
    • hasErrors

      public boolean hasErrors()
      Checks if there are any parse or compatibility errors.
    • isSuccess

      public boolean isSuccess()
      Returns true if parsing succeeded without any errors and produced a non-null AST.
    • toString

      public String toString()
      Overrides:
      toString in class Object