Commit d5ff25e4 authored by Sylvain Dailler's avatar Sylvain Dailler

Commit by Andrei for adding location of labels as attribute in terms

parent 46ecb6d8
......@@ -233,14 +233,20 @@ let rec dterm ns km crcmap gvars at denv {term_desc = desc; term_loc = loc} =
in
let qualid_app q el = match gvars at q with
| Some v ->
begin match at with
| Some l -> (* check for impact *)
let u = Opt.get (gvars None q) in
if not (pv_equal v u) then
Hstr.replace at_uses l true
| None -> ()
end;
func_app (DTgvar v.pv_vs) el
let attrs = match at with
| Some l -> (* check for impact *)
let u = Opt.get (gvars None q) in
if pv_equal v u then Sattr.empty else begin
let attr = create_attribute ("at:" ^ l) in
Hstr.replace at_uses l true;
Sattr.singleton attr
end
| None -> Sattr.empty
in
let e = DTgvar v.pv_vs in
let e = if Sattr.is_empty attrs then e else
DTattr (Dterm.dterm crcmap ~loc e, attrs) in
func_app e el
| None ->
let ls = find_lsymbol_ns ns q in
apply_ls (qloc q) ls [] ls.ls_args el
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment