File: type_c.mli

package info (click to toggle)
coccinelle 1.0.8.deb-5
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 26,148 kB
  • sloc: ml: 136,392; ansic: 23,594; sh: 2,189; makefile: 2,157; perl: 1,576; lisp: 840; python: 823; awk: 70; csh: 12
file content (54 lines) | stat: -rw-r--r-- 1,458 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54

type finalType = Ast_c.fullType

(* completed TypeName, removed ParenType, use StructUnionName when can *)
type completed_and_simplified = Ast_c.fullType

type completed_typedef = Ast_c.fullType
type removed_typedef = Ast_c.fullType

val is_completed_and_simplified: finalType -> bool
val is_completed_typedef_fullType : finalType -> bool
val is_removed_typedef_fullType: finalType -> bool

val remove_typedef: completed_typedef -> removed_typedef



(* lookup *)
val type_field:
  string -> (Ast_c.structUnion * Ast_c.structType) -> Ast_c.fullType

(* typing rules *)
val lub:
  Ast_c.arithOp -> finalType option -> finalType option -> Ast_c.exp_info

(* helpers *)
val structdef_to_struct_name:
  finalType -> finalType
val fake_function_type:
  finalType option -> Ast_c.argument Ast_c.wrap2 list -> finalType option

(* return normalize types ? *)
val type_of_function:
  Ast_c.definition -> finalType
val type_of_decl:
  Ast_c.declaration -> finalType
val structdef_of_decl:
  Ast_c.declaration -> Ast_c.structUnion * Ast_c.structType


(* builders *)
val make_info_def: finalType -> Ast_c.exp_info
val make_info: Ast_c.exp_type -> Ast_c.exp_info

val noTypeHere: Ast_c.exp_info

val do_with_type:
  (finalType -> Ast_c.exp_info) -> Ast_c.exp_info -> Ast_c.exp_info
val get_opt_type:
  Ast_c.expression -> finalType option

(* helpers bis *)
val is_function_type: finalType -> bool
val function_pointer_type_opt: finalType -> Ast_c.functionType option