~ubuntu-branches/ubuntu/karmic/coccinelle/karmic

« back to all changes in this revision

Viewing changes to parsing_cocci/compute_lines.ml

  • Committer: Bazaar Package Importer
  • Author(s): Євгеній Мещеряков
  • Date: 2009-05-11 15:32:24 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20090511153224-1odv41d4dkr3y80v
Tags: 0.1.8.deb-2
Use common install Makefile target for both native and bytecode
build. This hopefully fixes FTBFS on bytecode archs 

Show diffs side-by-side

added added

removed removed

Lines of Context:
38
38
      Ast0.logical_start = lstart.Ast0.pos_info.Ast0.logical_start;
39
39
      Ast0.logical_end = lend.Ast0.pos_info.Ast0.logical_end;
40
40
      Ast0.column = lstart.Ast0.pos_info.Ast0.column;
41
 
      Ast0.offset = lstart.Ast0.pos_info.Ast0.offset; } in
 
41
      Ast0.offset = lstart.Ast0.pos_info.Ast0.offset;} in
42
42
  let info =
43
43
    { Ast0.pos_info = pos_info;
44
44
      Ast0.attachable_start = lstart.Ast0.attachable_start;
79
79
(* --------------------------------------------------------------------- *)
80
80
(* Mcode *)
81
81
 
82
 
let promote_mcode (_,_,info,mcodekind,_) =
 
82
let promote_mcode (_,_,info,mcodekind,_,_) =
83
83
  let new_info =
84
84
    {info with
85
85
      Ast0.mcode_start = [mcodekind]; Ast0.mcode_end = [mcodekind]} in
86
86
  {(Ast0.wrap ()) with Ast0.info = new_info; Ast0.mcodekind = ref mcodekind}
87
87
 
88
 
let promote_mcode_plus_one (_,_,info,mcodekind,_) =
 
88
let promote_mcode_plus_one (_,_,info,mcodekind,_,_) =
89
89
  let new_pos_info = 
90
90
    {info.Ast0.pos_info with
91
91
      Ast0.line_start = info.Ast0.pos_info.Ast0.line_start + 1;
125
125
  {(Ast0.wrap ()) with Ast0.info = new_info; Ast0.mcodekind = ref mcodekind}
126
126
 
127
127
(* mcode is good by default *)
128
 
let bad_mcode (t,a,info,mcodekind,pos) =
 
128
let bad_mcode (t,a,info,mcodekind,pos,adj) =
129
129
  let new_info =
130
130
    {info with Ast0.attachable_start = false; Ast0.attachable_end = false} in
131
 
  (t,a,new_info,mcodekind,pos)
 
131
  (t,a,new_info,mcodekind,pos,adj)
132
132
 
133
133
let get_all_start_info l =
134
134
  (List.for_all (function x -> (Ast0.get_info x).Ast0.attachable_start) l,