Fantom

 

class

compiler::Loc

sys::Obj
  compiler::Loc

Loc provides a source file, line number, and column number.

Slots

colSource

Int? col

compareSource

override Int compare(Obj that)

Overrides sys::Obj.compare

Doc inherited from sys::Obj.compare

Return a negative integer, zero, or a positive integer if this object is less than, equal to, or greater than the specified object:

this < that   =>  <0
this == that  =>  0
this > that   =>  >0

This method may also be accessed via the < <= <=> >= and > shortcut operators. If not overridden the default implementation compares the toStr representations. Also see docLang.

Examples:

3.compare(8)  =>  -1
8.compare(3)  =>  1
8.compare(8)  =>  0
3 <=> 8       =>  -1  // shortcut for 3.compare(8)
equalsSource

override Bool equals(Obj? that)

Overrides sys::Obj.equals

Doc inherited from sys::Obj.equals

Compare this object to the specified for equality. This method may be accessed via the == and != shortcut operators. If not overridden the default implementation compares for reference equality using the === operator. If this method is overridden, then hash() must also be overridden such that any two objects which return true for equals() must return the same value for hash(). This method must accept null and return false.

fileSource

Str? file

fileUriSource

Str? fileUri()

filenameSource

Str? filename()

hashSource

override Int hash()

Overrides sys::Obj.hash

Doc inherited from sys::Obj.hash

Return a unique hashcode for this object. If a class overrides hash() then it must ensure if equals() returns true for any two objects then they have same hash code.

lineSource

Int? line

makeSource

new make(Str? file, Int? line := null, Int? col := null)

makeFileSource

new makeFile(File? file, Int? line := null, Int? col := null)

makeUninitSource

new makeUninit()

toLocStrSource

Str toLocStr()

toStrSource

override Str toStr()

Overrides sys::Obj.toStr

Doc inherited from sys::Obj.toStr

Return a string representation of this object.