Project

General

Profile

Revision ef34b4ae src/location.ml

View differences:

src/location.ml
10 10
(********************************************************************)
11 11

  
12 12
type t = { loc_start: Lexing.position; loc_end: Lexing.position }
13

  
14
type filename = string
15

  
13 16
let dummy_loc = {loc_start=Lexing.dummy_pos; loc_end=Lexing.dummy_pos}
14 17

  
15
let input_name = ref ""
18
let set_input, get_input, get_module =
19
  let input_name : filename ref = ref "__UNINITIALIZED__" in
20
  let module_name : filename ref = ref "__UNINITIALIZED__" in
21
  (fun name -> input_name := name; module_name := Filename.chop_extension name),
22
  (fun () -> !input_name),
23
  (fun () -> !module_name)
16 24

  
17 25
let curr lexbuf = {
18 26
  loc_start = lexbuf.Lexing.lex_start_p;

Also available in: Unified diff