2 | VarOrFunc
of string * Ast_c.exp_type
3 | EnumConstant
of string * string option
5 | TypeDef
of string * Ast_c.fullType
6 | StructUnionNameDef
of string *
7 (Ast_c.structUnion
* Ast_c.structType
) Ast_c.wrap
9 | Macro
of string * (Ast_c.define_kind
* Ast_c.define_val
)
11 (* have nested scope, so nested list*)
12 type environment
= namedef list list
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
21 val annotate_type_and_localvar
:
22 environment
-> Ast_c.toplevel list
->
23 (Ast_c.toplevel
* environment
Common.pair
) list
26 val annotate_test_expressions
:
27 Ast_c.toplevel list
-> unit
31 (* !!Annotate via side effects!!. Fill in the type
32 * information that was put to None during parsing.
34 val annotate_program
:
35 environment
-> Ast_c.toplevel list
->
36 (Ast_c.toplevel
* environment
Common.pair
) list