UplcSourceMap

scalus.uplc.internal.UplcSourceMap
final case class UplcSourceMap(schemaVersion: Int, uplc: String, files: Seq[String], functions: Seq[String], spans: Seq[UplcSpan])

The .uplc.json document consumed by the Scalus VS Code extension: the UPLC text of a compiled program plus a table mapping ranges of that text back to Scala source positions.

files and functions are string tables referenced by UplcSpan.file and UplcSpan.fn.

Value parameters

spans

the mapped regions, sorted by UplcSpan.s ascending, then UplcSpan.e descending, which orders enclosing spans before the spans they contain: binary-searching by offset and resolving a cursor to the innermost containing span work directly on the table. The spans are properly nested, so that resolution is well defined. (Documents written by earlier schema-1 producers carried the spans unsorted, so a defensive consumer may still sort.) The table is empty when nothing could be mapped; uplc is always the full program text.

Attributes

Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Value members

Inherited methods

def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product