private static class JavadocDetailNodeParser.DescriptiveErrorListener
extends org.antlr.v4.runtime.BaseErrorListener
Modifier and Type | Field and Description |
---|---|
private JavadocDetailNodeParser.ParseErrorMessage |
errorMessage
Error message that appeared while parsing.
|
private int |
offset
Offset is line number of beginning of the Javadoc comment.
|
Modifier | Constructor and Description |
---|---|
private |
DescriptiveErrorListener() |
Modifier and Type | Method and Description |
---|---|
private JavadocDetailNodeParser.ParseErrorMessage |
getErrorMessage()
Getter for error message during parsing.
|
void |
setOffset(int offset)
Sets offset.
|
void |
syntaxError(org.antlr.v4.runtime.Recognizer<?,?> recognizer,
java.lang.Object offendingSymbol,
int line,
int charPositionInLine,
java.lang.String msg,
org.antlr.v4.runtime.RecognitionException ex)
Logs parser errors in Checkstyle manner.
|
private int offset
private JavadocDetailNodeParser.ParseErrorMessage errorMessage
private JavadocDetailNodeParser.ParseErrorMessage getErrorMessage()
public void setOffset(int offset)
offset
- offset line numberpublic void syntaxError(org.antlr.v4.runtime.Recognizer<?,?> recognizer, java.lang.Object offendingSymbol, int line, int charPositionInLine, java.lang.String msg, org.antlr.v4.runtime.RecognitionException ex)
"no viable alternative at input 'b \n *\n'"
and it
is not clear that error is about missed close HTML tag. Other error
messages are not special and logged simply as "Parse Error...".
syntaxError
in interface org.antlr.v4.runtime.ANTLRErrorListener
syntaxError
in class org.antlr.v4.runtime.BaseErrorListener