FileLoc
@Js
const class FileLoc : Obj
FileLoc is a location within a text file or source string. It includes an optional one-base line number and column number. This class provides a standardized API for text based tools which need to report the line/column numbers of errors.
Constructor for file
Constructor for filename string
One based line column number or zero if unknown
Constant for synthetic location
Filename location
Constant for tool input location
One based line number or zero if unknown
Constant for an unknown location
Return string representation as "file", "file(line)", or "file(line,col)"
Comparison operator
Is this the unknown location
Equality operator
Hash code
const Int : col
One based line column number or zero if unknown
virtual Int compare(Obj that)
Comparison operator
virtual Bool equals(Obj? that)
Equality operator
const Str : file
Filename location
virtual Int hash()
Hash code
const static FileLoc : inputs
Constant for tool input location
Bool isUnknown()
Is this the unknown location
const Int : line
One based line number or zero if unknown
new make(Str file, Int line, Int col)
Constructor for filename string
static new makeFile(File file, Int line, Int col)
Constructor for file
const static FileLoc : synthetic
Constant for synthetic location
virtual Str toStr()
Return string representation as "file", "file(line)", or "file(line,col)". This is the standard format used by the Fantom compiler.
const static FileLoc : unknown
Constant for an unknown location