Span

tastyquery.Spans$.Span
final class Span extends AnyVal

A span indicates a range between a start offset and an end offset. Spans can be synthetic or source-derived. A source-derived span has in addition a point. The point lies somewhere between start and end. The point is roughly where the ^ would go if an error was diagnosed at that position. All quantities are encoded opaquely in a Long.

Attributes

Graph
Supertypes
class AnyVal
trait Matchable
class Any

Members list

Value members

Concrete methods

def !=(that: Span): Boolean
def ==(that: Span): Boolean
def contains(that: Span): Boolean

Does the range of this span contain the one of that span?

Does the range of this span contain the one of that span?

Attributes

def end: Int

The end of this span

The end of this span

Attributes

def endPos: Span

The zero-extent span with start and end at the end of this span

The zero-extent span with start and end at the end of this span

Attributes

def exists: Boolean

Is this span different from NoSpan?

Is this span different from NoSpan?

Attributes

def focus: Span

The zero-extent span with start and end at the point of this span

The zero-extent span with start and end at the point of this span

Attributes

def isSourceDerived: Boolean

Is this span source-derived?

Is this span source-derived?

Attributes

def isSynthetic: Boolean

Is this span synthetic?

Is this span synthetic?

Attributes

def isZeroExtent: Boolean

Is this a zero-extent span?

Is this a zero-extent span?

Attributes

def orElse(that: Span): Span
def overlaps(that: Span): Boolean

Does the range of this span overlap with the range of that span at more than a single point?

Does the range of this span overlap with the range of that span at more than a single point?

Attributes

def point: Int

The point of this span, returns start for synthetic spans

The point of this span, returns start for synthetic spans

Attributes

def pointDelta: Int

The difference between point and start in this span

The difference between point and start in this span

Attributes

def shift(offset: Int): Span

A span where all components are shifted by a given offset relative to this span.

A span where all components are shifted by a given offset relative to this span.

Attributes

def start: Int

The start of this span.

The start of this span.

Attributes

def startPos: Span

The zero-extent span with start and end at the start of this span

The zero-extent span with start and end at the start of this span

Attributes

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

A synthetic copy of this span

A synthetic copy of this span

Attributes

def union(that: Span): Span

The union of two spans. This is the least range that encloses both spans. It is always a synthetic span.

The union of two spans. This is the least range that encloses both spans. It is always a synthetic span.

Attributes

def withEnd(end: Int): Span

A copy of this span with a different end

A copy of this span with a different end

Attributes

def withPoint(point: Int): Span

A copy of this span with a different point

A copy of this span with a different point

Attributes

def withStart(start: Int): Span

A copy of this span with a different start

A copy of this span with a different start

Attributes