File: cpp_ast_c.mli

package info (click to toggle)
coccinelle 1.0.8.deb-5
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 26,148 kB
  • sloc: ml: 136,392; ansic: 23,594; sh: 2,189; makefile: 2,157; perl: 1,576; lisp: 840; python: 823; awk: 70; csh: 12
file content (42 lines) | stat: -rw-r--r-- 1,337 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
type cpp_option =
  | I of Common.dirname
  | D of string * string option

val cpp_option_of_cmdline:
  Common.dirname list (* -I *) * string list (* -D *) -> cpp_option list
val show_cpp_i_opts: string list -> unit
val show_cpp_d_opts: string list -> unit


(* ---------------------------------------------------------------------- *)
(* cpp_expand_include below must internally use a cache of header files to
 * speedup as programs very often reinclude the same basic set of
 * header files.
 *
 * note: that also means that the asts of those headers are then shared
 * so take care!!
 *)
val _headers_hash:
  (Common.filename, Parse_c.program2 * Parsing_stat.parsing_stat) Hashtbl.t

(* It can also try to find header files in nested directories if the
 * caller use the function below first.
 *)
val _hcandidates:
  (string, Common.filename) Hashtbl.t

val init_adjust_candidate_header_files: Common.dirname -> unit

(* ---------------------------------------------------------------------- *)

(* #include *)
val cpp_expand_include:
  ?depth_limit:int option ->
  ?threshold_cache_nb_files:int ->
  cpp_option list -> Common.dirname (* start point for relative paths *) ->
  Ast_c.program -> Ast_c.program

(* #define *)
val cpp_expand_macro_expr:
  Ast_c.define_kind -> Ast_c.argument Ast_c.wrap2 list ->
  Ast_c.expression option