permit multiline comments and strings in macros
[bpt/coccinelle.git] / parsing_c / type_annoter_c.mli
CommitLineData
ae4735db 1type namedef =
91eba41f
C
2 | VarOrFunc of string * Ast_c.exp_type
3 | EnumConstant of string * string option
4
5 | TypeDef of string * Ast_c.fullType
6 | StructUnionNameDef of string *
7 (Ast_c.structUnion * Ast_c.structType) Ast_c.wrap
8
b1b2de81 9 | Macro of string * (Ast_c.define_kind * Ast_c.define_val)
34e49164 10
91eba41f 11(* have nested scope, so nested list*)
ae4735db 12type environment = namedef list list
34e49164 13
91eba41f
C
14(* can be set with init_env *)
15val initial_env : environment ref
16(* ex: config/envos/environment_unix.h *)
17val init_env : Common.filename -> unit
34e49164 18
91eba41f
C
19
20
ae4735db
C
21val annotate_type_and_localvar :
22 environment -> Ast_c.toplevel list ->
91eba41f
C
23 (Ast_c.toplevel * environment Common.pair) list
24
25(* julia: cocci *)
ae4735db 26val annotate_test_expressions :
91eba41f
C
27 Ast_c.toplevel list -> unit
28
29
30
ae4735db 31(* !!Annotate via side effects!!. Fill in the type
91eba41f 32 * information that was put to None during parsing.
34e49164 33 *)
ae4735db
C
34val annotate_program :
35 environment -> Ast_c.toplevel list ->
34e49164 36 (Ast_c.toplevel * environment Common.pair) list
91eba41f 37