Package org.apache.groovy.parser.antlr4
Class GroovySyntaxError
java.lang.Object
java.lang.Throwable
java.lang.Error
java.lang.AssertionError
org.apache.groovy.parser.antlr4.GroovySyntaxError
- All Implemented Interfaces:
Serializable
Represents a syntax error of a Groovy program, raised by the lexer or parser.
The message is the diagnostic as produced by the recogniser (for example
Unclosed string literal or Unexpected character: '\u200b').
Line and column are 1-based caret coordinates. On the compiler's normal lexer
path (SyntaxErrorReportable.require(boolean, java.lang.String, int, boolean) with toAttachPositionInfo
false), the location is not part of the message string —
SyntaxException appends
@ line N, column M when wrapping the error. The public
SyntaxErrorReportable.throwSyntaxError(java.lang.String, int, boolean) path can still append
PositionInfo when toAttachPositionInfo is true (IDE /
highlighter callers).
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Field Details
-
LEXER
public static final int LEXER- See Also:
-
PARSER
public static final int PARSER- See Also:
-
-
Constructor Details
-
GroovySyntaxError
-
-
Method Details
-
getSource
public int getSource() -
getLine
public int getLine() -
getColumn
public int getColumn()
-