Package io.github.fupacat
Class ParseResult<T extends TSqlFragment>
java.lang.Object
io.github.fupacat.ParseResult<T>
- Type Parameters:
T- The subtype ofTSqlFragmentproduced (typicallyTSqlScript).
- All Implemented Interfaces:
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionerrors()Returns an unmodifiable list of any parse or compatibility errors.fragment()Returns the parsed AST fragment, ornullif parsing failed catastrophically.booleanChecks if there are any parse or compatibility errors.booleanReturns true if parsing succeeded without any errors and produced a non-null AST.toString()
-
Constructor Details
-
ParseResult
-
-
Method Details
-
fragment
Returns the parsed AST fragment, ornullif parsing failed catastrophically. -
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
-