Skip to main content

UplcSourceMap

export interface UplcSourceMap {
  apply(root: UplcTerm): void
  indices: number[]
  sourceNames: string[]
  termDescriptions: [number, string][]
  toJsonSafe(): UplcSourceMapJsonSafe
  variableNames: [number, string][]
}

Properties

apply

apply(root: UplcTerm): void

indices

indices: number[]
Tuples of 4 indices

  • First index in each tuple is the uplc term 'preorder' index
  • Second index in each tuple is the source index (i.e. index in this.sourceNames)
  • Third index in each tuple is the line number (0-based)
  • Fourth index in each tuple is the column number (0-based)

sourceNames

sourceNames: string[]
Eg. file names or helios header names

termDescriptions

termDescriptions: [number, string][]
Tuple of uplc term index and description string

toJsonSafe

toJsonSafe(): UplcSourceMapJsonSafe

variableNames

variableNames: [number, string][]
Tuple of uplc lambda term index and variable name