- java.lang.Object
-
- org.kink_lang.kink.HostResultCore
-
- org.kink_lang.kink.Val
-
- org.kink_lang.kink.LocVal
-
- All Implemented Interfaces:
HostResult
public class LocVal extends Val
A trace location, which is a part of a trace entry.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object arg)
Returnstrue
if the two locs have the same vms, program names, program texts and pos indices.int
getCharPos()
Returns the char index of the pos.int
getColumnCharOffset()
Returns the char offset from the head of the line.int
getColumnRuneOffset()
Returns the rune offset from the head of the line.String
getDesc()
Returns the string ofTrace.desc
.String
getIndicator()
Returns the string ofTrace.indicator
.String
getLine()
Returns the line string where the loc is located.int
getLineNum()
Returns the one-based line number of the loc on the program text.String
getProgramName()
Returns the program name.String
getProgramText()
Returns the program text.int
getRunePos()
Returns the rune index of the pos.int
hashCode()
Returns the hash code of the loc val.String
toString()
Returns the string representation of the loc val.-
Methods inherited from class org.kink_lang.kink.Val
getIdentity, getVar, getVarSymHandleSet, hasVar, makeHostResultCore, setVar
-
-
-
-
Method Detail
-
getProgramName
public String getProgramName()
Returns the program name.- Returns:
- the program name.
-
getProgramText
public String 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 loc on the program text.- Returns:
- the one-based line number of the loc 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
public String getLine()
Returns the line string where the loc is located.- Returns:
- the line string where the loc is located.
-
getIndicator
public String getIndicator()
Returns the string ofTrace.indicator
. The example result: "foo(-->bar)".- Returns:
- the string of
Trace.indicator
.
-
getDesc
public String getDesc()
Returns the string ofTrace.desc
. The example result: "foo.kn L10 C15".- Returns:
- the string of
Trace.desc
.
-
toString
public String toString()
Returns the string representation of the loc val.
-
hashCode
public int hashCode()
Returns the hash code of the loc val.
-
-