permit multiline comments and strings in macros
[bpt/coccinelle.git] / parsing_c / cpp_ast_c.mli
1 type cpp_option =
2 | I of Common.dirname
3 | D of string * string option
4
5 val cpp_option_of_cmdline:
6 Common.dirname list (* -I *) * string list (* -D *) -> cpp_option list
7 val show_cpp_i_opts: string list -> unit
8 val show_cpp_d_opts: string list -> unit
9
10
11 (* ---------------------------------------------------------------------- *)
12 (* cpp_expand_include below must internally use a cache of header files to
13 * speedup as programs very often reinclude the same basic set of
14 * header files.
15 *
16 * note: that also means that the asts of those headers are then shared
17 * so take care!!
18 *)
19 val _headers_hash:
20 (Common.filename, Parse_c.program2 * Parsing_stat.parsing_stat) Hashtbl.t
21
22 (* It can also try to find header files in nested directories if the
23 * caller use the function below first.
24 *)
25 val _hcandidates:
26 (string, Common.filename) Hashtbl.t
27
28 val init_adjust_candidate_header_files: Common.dirname -> unit
29
30 (* ---------------------------------------------------------------------- *)
31
32 (* #include *)
33 val cpp_expand_include:
34 ?depth_limit:int option ->
35 ?threshold_cache_nb_files:int ->
36 cpp_option list -> Common.dirname (* start point for relative paths *) ->
37 Ast_c.program -> Ast_c.program
38
39 (* #ifdef *)
40 val cpp_ifdef_statementize:
41 Ast_c.program -> Ast_c.program
42
43 (* #define *)
44 val cpp_expand_macro_expr:
45 Ast_c.define_kind -> Ast_c.argument Ast_c.wrap2 list ->
46 Ast_c.expression option
47