java.lang.Object
org.kink_lang.kink.HostResultCore
org.kink_lang.kink.Val
org.kink_lang.kink.LocationVal
- All Implemented Interfaces:
HostResult
A location in a program.
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Returnstrue
if the two locations have the same vms, program names, program texts and pos indices.int
Returns the char index of the pos.int
Returns the char offset from the head of the line.int
Returns the rune offset from the head of the line.getDesc()
Returns the string ofTrace.desc
.Returns the string ofTrace.indicator
.getLine()
Returns the line string where the loc is located.int
Returns the one-based line number of the location on the program text.Returns the program name.Returns the program text.int
Returns the rune index of the pos.int
hashCode()
Returns the hash code of the loction val.toString()
Returns the string representation of the location val.Methods inherited from class org.kink_lang.kink.Val
getIdentity, getVar, getVarSymHandleSet, hasVar, makeHostResultCore, setVar
-
Method Details
-
getProgramName
Returns the program name.- Returns:
- the program name.
-
getProgramText
Returns the program text.- Returns:
- the program text.
-
getCharPos
public int getCharPos()Returns the char index of the pos.- Returns:
- the char index of the pos.
-
getRunePos
public int getRunePos()Returns the rune index of the pos.- Returns:
- the rune index of the pos.
-
getLineNum
public int getLineNum()Returns the one-based line number of the location on the program text.- Returns:
- the one-based line number of the location on the program text.
-
getColumnCharOffset
public int getColumnCharOffset()Returns the char offset from the head of the line.- Returns:
- the char offset from the head of the line.
-
getColumnRuneOffset
public int getColumnRuneOffset()Returns the rune offset from the head of the line.- Returns:
- the rune offset from the head of the line.
-
getLine
Returns the line string where the loc is located.- Returns:
- the line string where the loc is located.
-
getIndicator
Returns the string ofTrace.indicator
. The example result: "foo(-->bar)".- Returns:
- the string of
Trace.indicator
.
-
getDesc
Returns the string ofTrace.desc
. The example result: "foo.kn L10 C15".- Returns:
- the string of
Trace.desc
.
-
toString
Returns the string representation of the location val. -
hashCode
public int hashCode()Returns the hash code of the loction val. -
equals
Returnstrue
if the two locations have the same vms, program names, program texts and pos indices.
-