| 1 | type namedef = |
| 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 | |
| 9 | | Macro of string * (Ast_c.define_kind * Ast_c.define_val) |
| 10 | |
| 11 | (* have nested scope, so nested list*) |
| 12 | type environment = namedef list list |
| 13 | |
| 14 | (* can be set with init_env *) |
| 15 | val initial_env : environment ref |
| 16 | (* ex: config/envos/environment_unix.h *) |
| 17 | val init_env : Common.filename -> unit |
| 18 | |
| 19 | |
| 20 | |
| 21 | val annotate_type_and_localvar : |
| 22 | environment -> Ast_c.toplevel list -> |
| 23 | (Ast_c.toplevel * environment Common.pair) list |
| 24 | |
| 25 | (* julia: cocci *) |
| 26 | val annotate_test_expressions : |
| 27 | Ast_c.toplevel list -> unit |
| 28 | |
| 29 | |
| 30 | |
| 31 | (* !!Annotate via side effects!!. Fill in the type |
| 32 | * information that was put to None during parsing. |
| 33 | *) |
| 34 | val annotate_program : |
| 35 | environment -> Ast_c.toplevel list -> |
| 36 | (Ast_c.toplevel * environment Common.pair) list |
| 37 | |