SourcePosition

case class SourcePosition(source: SourceFile, span: Span, outer: SourcePosition) extends SrcPos with SourcePosition with Showable

A source position is comprised of a span and a source file

trait Product
trait Equals
trait Showable
trait SourcePosition
trait SrcPos
class Object
trait Matchable
class Any

Value members

Concrete methods

def column: Int

Is that a source position contained in this source position ? outer is not taken into account.

Is that a source position contained in this source position ? outer is not taken into account.

def end: Int
def endLine: Int
def line: Int
def lines: Range

The lines of the position

The lines of the position

Extracts the lines from the underlying source file as Array[Char]

Extracts the lines from the underlying source file as Array[Char]

Inner most position that is contained within the outermost position. Most precise position that that comes from the call site.

Inner most position that is contained within the outermost position. Most precise position that that comes from the call site.

def point: Int
def start: Int
override def toString: String
Definition Classes
Any
def toText(printer: Printer): Text

Inherited methods

def endPos(using ctx: Context): SourcePosition
Inherited from
SrcPos
def fallbackToText(printer: Printer): Text

A fallback text representation, if the pattern matching in Printers does not have a case for this showable element

A fallback text representation, if the pattern matching in Printers does not have a case for this showable element

Inherited from
Showable
def focus(using ctx: Context): SourcePosition
Inherited from
SrcPos
def line(using ctx: Context): Int
Inherited from
SrcPos
Inherited from
Product
def show(using Context): String

The string representation of this showable element.

The string representation of this showable element.

Inherited from
Showable
def showIndented(margin: Int)(using Context): String

The string representation with each line after the first one indented by the given given margin (in spaces).

The string representation with each line after the first one indented by the given given margin (in spaces).

Inherited from
Showable
def showSummary(depth: Int)(using Context): String

The summarized string representation of this showable element. Recursion depth is limited to some smallish value. Default is Config.summarizeDepth.

The summarized string representation of this showable element. Recursion depth is limited to some smallish value. Default is Config.summarizeDepth.

Inherited from
Showable
def startPos(using ctx: Context): SourcePosition
Inherited from
SrcPos