PreviousUpNext

15.3.179  src/lib/compiler/back/low/tools/line-number-db/line-number-database.api


# Compiled by:
#     src/lib/compiler/back/low/tools/line-number-database.lib

# This maps character position in the input stream to 
# the source file location(s).

api Line_Number_Database {


    Charpos = Int; 

    Region = (Charpos, Charpos); 

    Location = LOC  { src_file:    unique_symbol::Symbol,
                               begin_line:  Int,
                               begin_col:   Int,
                               end_line:    Int,
                               end_col:     Int
                              };

    Sourcemap;
    State;

    dummy_loc:  Location; 
    newmap:    { src_file:  String } -> Sourcemap;
    newline:   Sourcemap -> Charpos -> Void;
    resynch:   Sourcemap -> { pos: Charpos, src_file: String, line: Int } -> Void;

    state:     Sourcemap -> State;
    reset:     Sourcemap -> State -> Void;

    parse_directive:  Sourcemap -> (Charpos, String) -> Void;
    location:  Sourcemap -> Region -> Location;
    curr_pos:   Sourcemap -> Charpos;
    to_string:  Location -> String;
    directive:  Location -> String;

};


Comments and suggestions to: bugs@mythryl.org

PreviousUpNext