let update_loc c file line absolute chars =
let lexbuf = c.lexbuf in
let pos = lexbuf.lex_curr_p in
let new_file =
match file with | None -> pos.pos_fname | Some s -> s
in
lexbuf.lex_curr_p <-
{
(pos)
with
pos_fname = new_file;
pos_lnum = if absolute then line else pos.pos_lnum + line;
pos_bol = pos.pos_cnum - chars;
}