Generated

laika.parse.SourceCursor.Generated
object Generated extends SourceFragment

Represents a generated source, where an AST node has been created programmatically and cannot be traced back to the corresponding input source.

Attributes

Source
SourceCursor.scala
Graph
Supertypes
trait SourceCursor
class Object
trait Matchable
class Any
Self type
Generated.type

Members list

Type members

Types

type Self = Generated.type.this.type

Attributes

Source
SourceCursor.scala

Value members

Concrete methods

def atEnd: Boolean

Indicates whether this contexts offset is behind the last character of the input string

Indicates whether this contexts offset is behind the last character of the input string

Attributes

Source
SourceCursor.scala
def capture(numChars: Int): String

Captures a string containing the specified number of characters from the current offset.

Captures a string containing the specified number of characters from the current offset. If the number of remaining characters is less than the specified number, all remaining characters will be returned.

Attributes

Source
SourceCursor.scala
def consume(numChars: Int): Generated.type.this.type

Consumes the specified number of characters, returning a new SourceCursor with the new offset.

Consumes the specified number of characters, returning a new SourceCursor with the new offset.

Attributes

Source
SourceCursor.scala
def input: String

The full input string, containing the string portions before and after the current offset.

The full input string, containing the string portions before and after the current offset.

Attributes

Source
SourceCursor.scala
def nestLevel: Int

The nest level of this cursor in case of recursive parsing.

The nest level of this cursor in case of recursive parsing.

Attributes

Source
SourceCursor.scala
def nextNestLevel: Generated.type.this.type

Create a new instance of this cursor with the nestLevel incremented.

Create a new instance of this cursor with the nestLevel incremented.

Attributes

Source
SourceCursor.scala
def offset: Int

The offset of this cursor from the start of the source.

The offset of this cursor from the start of the source.

Attributes

Source
SourceCursor.scala

The current position in the input string.

The current position in the input string.

Attributes

Source
SourceCursor.scala
def remaining: Int

Indicates the number of characters remaining in the input string after the current offset.

Indicates the number of characters remaining in the input string after the current offset.

Attributes

Source
SourceCursor.scala
def reverse: Generated.type.this.type

Returns a new SourceCursor with the input string being reversed, but pointing to the same character as this context.

Returns a new SourceCursor with the input string being reversed, but pointing to the same character as this context.

This is a low-level optimization for parsers that look for strings like email addresses where the first character is not significant, so that parsing backwards from any @ encountered in the input provided better performance.

Attributes

Source
SourceCursor.scala

The source for the root input, positioned to match the offset of this (potentially nested) source.

The source for the root input, positioned to match the offset of this (potentially nested) source.

Attributes

Source
SourceCursor.scala

Inherited methods

def char: Char

The character at the current offset.

The character at the current offset.

Attributes

Inherited from:
SourceCursor
Source
SourceCursor.scala
def charAt(relativeOffset: Int): Char

The character at the specified offset, relative from the current offset.

The character at the specified offset, relative from the current offset.

Attributes

Inherited from:
SourceCursor
Source
SourceCursor.scala
def length: Int

The length of the input of this cursor.

The length of the input of this cursor.

Attributes

Inherited from:
SourceCursor
Source
SourceCursor.scala
def path: Option[Path]

The (virtual) path of the document this input originates from; may be empty in case of generated sources.

The (virtual) path of the document this input originates from; may be empty in case of generated sources.

Attributes

Inherited from:
SourceCursor
Source
SourceCursor.scala