Package org.openrewrite.javascript.table
Class ParseExceptionAnalysis
java.lang.Object
org.openrewrite.DataTable<ParseExceptionAnalysis.Row>
org.openrewrite.javascript.table.ParseExceptionAnalysis
@Incubating(since="0.0")
public class ParseExceptionAnalysis
extends org.openrewrite.DataTable<ParseExceptionAnalysis.Row>
WIP data table analysis to accelerate implementing language parsing.
The analysis is likely generalizable to other languages, and might be moved to a common module after testing.
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic String
getAnalysisMessage
(String nodeType) Generate a parsing exception message from a given node type for analysis.static String
getAnalysisMessage
(String nodeType, @Nullable String sourceSnippet) Generate a parsing exception message from a given node type for analysis.static String
getNodeType
(String message) static String
getSourceSnippet
(String message) Methods inherited from class org.openrewrite.DataTable
getDescription, getDisplayName, getName, getRowsTypeReference, getType, insertRow, isEnabled, setEnabled
-
Constructor Details
-
ParseExceptionAnalysis
public ParseExceptionAnalysis(org.openrewrite.Recipe recipe)
-
-
Method Details
-
getAnalysisMessage
Generate a parsing exception message from a given node type for analysis.- Parameters:
nodeType
- A unique name that represents the node type that caused the parsing exception.- Returns:
- analysis message.
-
getAnalysisMessage
Generate a parsing exception message from a given node type for analysis.- Parameters:
nodeType
- A unique name that represents the node type that caused the parsing exception.sourceSnippet
- Optional source snippet to identify where the exception occurred.- Returns:
- analysis message.
-
getNodeType
-
getSourceSnippet
-