Span

io.github.iltotore.pureparser.Span
case class Span(start: Int, end: Int)

A span between two positions in the input list, typically used to track the position of each parsed node.

Value parameters

end

the end of this Span (exclusive).

start

the start of this Span (inclusive).

Attributes

Note

it is always assumed that start < end.

Source
Span.scala
Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

def merge(other: Span): Span

Merge this Span with another.

Merge this Span with another.

Value parameters

other

the other Span to combine with this one.

Attributes

Returns

a Span covering both merged ones. Since Spans cannot be discontinuous, anything between the two merged Spans is also covered by the merge result.

Source
Span.scala
def size: Int

The size of this span.

The size of this span.

Attributes

Returns

the difference between end and start.

Source
Span.scala

Inherited methods

def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product