permit multiline comments and strings in macros
[bpt/coccinelle.git] / parsing_c / cpp_ast_c.mli
CommitLineData
ae4735db 1type cpp_option =
91eba41f 2 | I of Common.dirname
485bce71
C
3 | D of string * string option
4
ae4735db 5val cpp_option_of_cmdline:
485bce71 6 Common.dirname list (* -I *) * string list (* -D *) -> cpp_option list
91eba41f
C
7val show_cpp_i_opts: string list -> unit
8val show_cpp_d_opts: string list -> unit
485bce71 9
91eba41f
C
10
11(* ---------------------------------------------------------------------- *)
113803cf 12(* cpp_expand_include below must internally use a cache of header files to
ae4735db
C
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
978fd7e5 17 * so take care!!
113803cf 18 *)
ae4735db 19val _headers_hash:
91eba41f 20 (Common.filename, Parse_c.program2 * Parsing_stat.parsing_stat) Hashtbl.t
91eba41f 21
ae4735db 22(* It can also try to find header files in nested directories if the
91eba41f
C
23 * caller use the function below first.
24 *)
ae4735db 25val _hcandidates:
978fd7e5
C
26 (string, Common.filename) Hashtbl.t
27
91eba41f
C
28val init_adjust_candidate_header_files: Common.dirname -> unit
29
30(* ---------------------------------------------------------------------- *)
31
978fd7e5 32(* #include *)
ae4735db 33val cpp_expand_include:
978fd7e5
C
34 ?depth_limit:int option ->
35 ?threshold_cache_nb_files:int ->
ae4735db 36 cpp_option list -> Common.dirname (* start point for relative paths *) ->
485bce71
C
37 Ast_c.program -> Ast_c.program
38
978fd7e5 39(* #ifdef *)
ae4735db 40val cpp_ifdef_statementize:
978fd7e5 41 Ast_c.program -> Ast_c.program
485bce71 42
978fd7e5 43(* #define *)
ae4735db
C
44val cpp_expand_macro_expr:
45 Ast_c.define_kind -> Ast_c.argument Ast_c.wrap2 list ->
91eba41f
C
46 Ast_c.expression option
47