Class Mark

Description of a source position, identified by byte offset, line, and column number, with an optional note.

Hierarchy

Properties

column: number

The one-based column number of this position.

line: number

The one-based line number of this position.

note: string

The note attached to the marked position, or null if this position has no attached note.

offset: number

The zero-based byte offset of this position.

Accessors

  • get end(): Mark
  • The last source position covered by this Tag.

    Returns Mark

  • get start(): Mark
  • The first source position covered by this Tag.

    Returns Mark

  • get zero(): Mark
  • Returns a Mark at byte offset 0, line 1, and column 1, with no attached note.

    Returns Mark

Methods

  • Writes a developer readable, debug-formatted string representation of this object to output.

    Type Parameters

    • T

    Parameters

    Returns Output<T>

    the continuation of the output.

    Throws

    [[OutputException]] if the output exits the cont state before the full debug string has been written.

  • Writes a human readable, display-formatted string representation of this object to output.

    Type Parameters

    • T

    Parameters

    Returns Output<T>

    the continuation of the output.

    Throws

    [[OutputException]] if the output exits the cont state before the full display string has been written.

  • Parameters

    • that: unknown

    Returns boolean

  • Returns number

  • Returns this position, if its byte offset is greater than or equal to that position; otherwise returns that position.

    Parameters

    Returns Mark

  • Returns this position, if its byte offset is less than or equal to that position; otherwise returns that position.

    Parameters

    Returns Mark

  • Returns the position of this Tag relative to the given mark.

    Parameters

    Returns Mark

  • Returns string

  • Returns a Tag that includes all source locations covered by both this tag, and that tag.

    Parameters

    Returns Tag

  • Parameters

    • note: string

    Returns Mark

  • Returns a new Mark at the given zero-based byte offset, one-based line number, and one-based column number, with an optionally attached note.

    Parameters

    • offset: number
    • line: number
    • column: number
    • Optional note: string

    Returns Mark

Generated using TypeDoc