public class Location
extends java.lang.Object
Both start and end line/column indices are inclusive.
Modifier and Type | Field and Description |
---|---|
int |
endLine |
int |
endOffset |
static int |
NaN |
Location |
parentLocation |
int |
startLine |
int |
startOffset |
Constructor and Description |
---|
Location() |
Location(int startLine,
int startOffset,
int endLine,
int endOffset) |
Location(Location other) |
Location(org.antlr.v4.runtime.ParserRuleContext context) |
Location(org.antlr.v4.runtime.Token start,
org.antlr.v4.runtime.Token end) |
Modifier and Type | Method and Description |
---|---|
boolean |
contains(Location other) |
LocationScopeProvider |
createScope() |
boolean |
equals(java.lang.Object o) |
static Location |
fromUserReadableString(java.lang.String str) |
int |
hashCode() |
boolean |
isValid() |
void |
setParentLocation(Location parentLocation) |
Location |
toAbsoluteLocation() |
java.lang.String |
toString() |
java.lang.String |
toUserReadableString() |
public static final int NaN
public int startLine
public int startOffset
public int endLine
public int endOffset
public Location parentLocation
public Location()
public Location(Location other)
public Location(org.antlr.v4.runtime.Token start, org.antlr.v4.runtime.Token end)
public Location(org.antlr.v4.runtime.ParserRuleContext context)
public Location(int startLine, int startOffset, int endLine, int endOffset)
public java.lang.String toString()
toString
in class java.lang.Object
public void setParentLocation(Location parentLocation)
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public boolean isValid()
public boolean contains(Location other)
public Location toAbsoluteLocation()
public java.lang.String toUserReadableString()
public static Location fromUserReadableString(java.lang.String str)
public LocationScopeProvider createScope()