The SOURCE_MAP signature


Synopsis

signature SOURCE_MAP
structure SourceMap : SOURCE_MAP

Interface

type charpos
type 'a pair
type region
val span : (region * region) -> region
val nullRegion : region
type sourceloc
type sourcemap
val newmap : (charpos * sourceloc) -> sourcemap
val newline : sourcemap -> charpos -> unit
val resynch : sourcemap -> (charpos * {fileName : string option, line : int, column : int option}) -> unit
val forgetOldPositions : sourcemap -> unit
val filepos : sourcemap -> charpos -> sourceloc
val fileregion : sourcemap -> region -> sourceloc pair list
val positions : sourcemap -> sourceloc -> charpos list
val lastChange : sourcemap -> charpos
val newlineCount : sourcemap -> region -> int

Description

type charpos

type 'a pair

type region

span (re, re2)


nullRegion


type sourceloc

type sourcemap

newmap (ch, so)


newline so ch


resynch so (ch, {fileName, line, column})


forgetOldPositions so


filepos so ch


fileregion so re


positions so so


lastChange so


newlineCount so re