Debian Codegraph @

lib/mlrisc-lib/MLRISC/Tools/SourceMap/sourceMap.sig

raw
1 (*
2 * This maps character position in the input stream to
3 * the source file location(s).
4 *)
5 signature SOURCE_MAPPING =
6 sig
7
8 type charpos = int
9
10 type region = charpos * charpos
11
12 datatype location = LOC of {srcFile : UniqueSymbol.symbol,
13 beginLine : int,
14 beginCol : int,
15 endLine : int,
16 endCol : int
17 }
18
19 type sourcemap
20 type state
21
22 val dummyLoc : location
23 val newmap : {srcFile : string} -> sourcemap
24 val newline : sourcemap -> charpos -> unit
25 val resynch : sourcemap -> {pos:charpos, srcFile:string, line:int} -> unit
26
27 val state : sourcemap -> state
28 val reset : sourcemap -> state -> unit
29
30 val parseDirective : sourcemap -> charpos * string -> unit
31 val location : sourcemap -> region -> location
32 val currPos : sourcemap -> charpos
33 val toString : location -> string
34 val directive : location -> string
35
36 end
37