Skip to content
Snippets Groups Projects
Commit fd19d190 authored by Pierre Loic Garoche's avatar Pierre Loic Garoche
Browse files

New function in Location to access to line number

parent 04257b1e
No related branches found
No related tags found
No related merge requests found
......@@ -78,11 +78,12 @@ let print loc =
print_string ":";
print_newline ()
let loc_line loc = loc.loc_start.Lexing.pos_lnum
let pp_loc fmt loc =
if loc == dummy_loc then () else
let filename = loc.loc_start.Lexing.pos_fname in
let line = loc.loc_start.Lexing.pos_lnum in
let line = loc_line loc in
let start_char =
loc.loc_start.Lexing.pos_cnum - loc.loc_start.Lexing.pos_bol
in
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment