SourcePosition

dotty.tools.dotc.util.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

Attributes

Graph
Supertypes
trait Product
trait Equals
trait Showable
trait SourcePosition
trait SrcPos
class Object
trait Matchable
class Any
Known subtypes
object NoSourcePosition.type

Members list

Concise view

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.

Attributes

def end: Int
def line: Int

The lines of the position

The lines of the position

Attributes

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

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

Attributes

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

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

Attributes

def point: Int
def start: Int
override def toString: String

Returns a string representation of the object.

Returns a string representation of the object.

The default representation is platform dependent.

Attributes

Returns:

a string representation of the object.

Definition Classes
Any
def toText(printer: Printer): Text

The text representation of this showable element. This normally dispatches to a pattern matching method in Printers.

The text representation of this showable element. This normally dispatches to a pattern matching method in Printers.

Attributes

Inherited methods

def endPos(using ctx: Context): SourcePosition

Attributes

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

Attributes

Inherited from:
Showable
def focus(using ctx: Context): SourcePosition

Attributes

Inherited from:
SrcPos
def line(using ctx: Context): Int

Attributes

Inherited from:
SrcPos

Attributes

Inherited from:
Product

Attributes

Inherited from:
Product
def show(using Context): String

The string representation of this showable element.

The string representation of this showable element.

Attributes

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).

Attributes

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.

Attributes

Inherited from:
Showable

Attributes

Inherited from:
SrcPos