FeatherPosition

data class FeatherPosition(val source: String?, val line: Int, val column: Int, val debug: Boolean)

Identifies a position within a piece of source code, most commonly to indicate the position of an error. See FeatherException. Note that line and column are zero based (i.e. the first character is line 0, column 0). The toString method adds one to the line and column to make it more human readable.

Constructors

Link copied to clipboard
constructor(source: String?, line: Int, column: Int, debug: Boolean)

Properties

Link copied to clipboard
val column: Int

Zero based. Note, toString add one, to make it human readable

Link copied to clipboard
Link copied to clipboard
val line: Int

Zero based. Note, toString add one, to make it human readable

Link copied to clipboard

Usually the file's path, but if the compiler was passed a simple block of text to compile, then this will be null (as there is no name to associate it with).

Functions

Link copied to clipboard
open override fun toString(): String

A human readable representation of this error. The line and column numners are 1-based. i.e. the first character is reported as line 1, column 1, which is NOT how they are store in line and column.