Record Class DebugInfo
java.lang.Object
java.lang.Record
org.ek9lang.compiler.ir.DebugInfo
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
Returns the value of thecolumnNumber
record component.final boolean
Indicates whether some other object is "equal to" this one.static DebugInfo
from
(CompilableSource compilableSource, ISymbol symbol) Create DebugInfo from an ISymbol's source token.final int
hashCode()
Returns a hash code value for this object.boolean
Check if this debug info represents a valid source location.int
Returns the value of thelineNumber
record component.static DebugInfo
Create DebugInfo with just file and position (no original text).Returns the value of theoriginalText
record component.Returns the value of thesourceFile
record component.Format debug info as IR comment for output.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
DebugInfo
-
-
Method Details
-
from
Create DebugInfo from an ISymbol's source token. Returns null if the symbol has no source token information. Uses filename only (without path) for portability and consistency with EK9 error reporting. -
of
-
toIRComment
Format debug info as IR comment for output. Example: "// workarea.ek9:12:15" -
isValidLocation
public boolean isValidLocation()Check if this debug info represents a valid source location. -
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object)
; primitive components are compared with thecompare
method from their corresponding wrapper classes. -
sourceFile
Returns the value of thesourceFile
record component.- Returns:
- the value of the
sourceFile
record component
-
lineNumber
public int lineNumber()Returns the value of thelineNumber
record component.- Returns:
- the value of the
lineNumber
record component
-
columnNumber
public int columnNumber()Returns the value of thecolumnNumber
record component.- Returns:
- the value of the
columnNumber
record component
-
originalText
Returns the value of theoriginalText
record component.- Returns:
- the value of the
originalText
record component
-