package rescriptdep

All checked builds pass
  1. Overview
  2. Docs
A dependency analyzer for ReScript modules

Install

dune-project
 Dependency

Authors

Maintainers

Sources

0.2.0.tar.gz
md5=ee82c85fb01239fb6b617b23521c1441
sha512=726c28f71ccb0ded5c3e15079ab3c95f635aa24f7c2ae6f8557c3677a11f42f7c4b8f406517ac3694c1bf1b06927eacd930938d01adb7d20c3b36135b0b395b7

doc/src/rescriptdep.vendor/typedtree_v12.ml.html

Source file typedtree_v12.ml

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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
(* Typedtree layout written by ReScript 12 (compiler/ml/typedtree.mli), which
   ReScript 13.0.0-alpha.1 to alpha.3 keep unchanged. 13.0.0-alpha.5 adds the
   [Texp_break] and [Texp_continue] constants and appends [Texp_for_of] and
   [Texp_for_await_of]; ReScript 12 never writes them, so they are declared
   here too and one definition reads all of these releases.

   CMT files are read with [input_value], so constructor order and arity must
   match the compiler exactly. Only the nodes that value usage analysis walks
   are spelled out; everything it never inspects is kept opaque. *)

type opaque = Obj.t

type pattern = {
  pat_desc : pattern_desc;
  pat_loc : Location.t;
  pat_extra : opaque;
  pat_type : opaque;
  mutable pat_env : opaque;
  pat_attributes : opaque;
}

and pattern_desc =
  | Tpat_any
  | Tpat_var of Ident.t * string Asttypes.loc
  | Tpat_alias of pattern * Ident.t * string Asttypes.loc
  | Tpat_constant of opaque
  | Tpat_tuple of pattern list
  | Tpat_construct of opaque * opaque * pattern list
  | Tpat_variant of opaque * pattern option * opaque
  | Tpat_record of opaque * opaque
  | Tpat_array of pattern list
  | Tpat_or of pattern * pattern * opaque

and expression = {
  exp_desc : expression_desc;
  exp_loc : Location.t;
  exp_extra : opaque;
  exp_type : opaque;
  exp_env : opaque;
  exp_attributes : opaque;
}

and expression_desc =
  | Texp_ident of Path.t * opaque * opaque
  | Texp_constant of opaque
  | Texp_let of opaque * value_binding list * expression
  | Texp_function of {
      arg_label : opaque;
      arity : opaque;
      param : Ident.t;
      case : case;
      partial : opaque;
      async : bool;
    }
  | Texp_apply of {
      funct : expression;
      args : (opaque * expression option) list;
      partial : bool;
      transformed_jsx : bool;
    }
  | Texp_match of expression * case list * case list * opaque
  | Texp_try of expression * case list
  | Texp_tuple of expression list
  | Texp_construct of opaque * opaque * expression list
  | Texp_variant of opaque * expression option
  | Texp_record of {
      fields : (opaque * record_label_definition * bool) array;
      representation : opaque;
      extended_expression : expression option;
    }
  | Texp_field of expression * opaque * opaque
  | Texp_setfield of expression * opaque * opaque * expression
  | Texp_array of expression list
  | Texp_ifthenelse of expression * expression * expression option
  | Texp_sequence of expression * expression
  | Texp_break
  | Texp_continue
  | Texp_while of expression * expression
  | Texp_for of opaque * opaque * expression * expression * opaque * expression
  | Texp_send of expression * opaque * expression option
  | Texp_letmodule of Ident.t * opaque * module_expr * expression
  | Texp_letexception of opaque * expression
  | Texp_assert of expression
  | Texp_pack of module_expr
  | Texp_extension_constructor of opaque * Path.t
  | Texp_for_of of Ident.t * opaque * expression * expression
  | Texp_for_await_of of Ident.t * opaque * expression * expression

and case = { c_lhs : pattern; c_guard : expression option; c_rhs : expression }

and record_label_definition =
  | Kept of opaque
  | Overridden of opaque * expression

and value_binding = {
  vb_pat : pattern;
  vb_expr : expression;
  vb_attributes : opaque;
  vb_loc : Location.t;
}

and module_expr = {
  mod_desc : module_expr_desc;
  mod_loc : Location.t;
  mod_type : opaque;
  mod_env : opaque;
  mod_attributes : opaque;
}

and module_expr_desc =
  | Tmod_ident of Path.t * opaque
  | Tmod_structure of structure
  | Tmod_functor of Ident.t * opaque * opaque * module_expr
  | Tmod_apply of module_expr * module_expr * opaque
  | Tmod_constraint of module_expr * opaque * opaque * opaque
  | Tmod_unpack of expression * opaque

and structure = {
  str_items : structure_item list;
  str_type : opaque;
  str_final_env : opaque;
}

and structure_item = {
  str_desc : structure_item_desc;
  str_loc : Location.t;
  str_env : opaque;
}

and structure_item_desc =
  | Tstr_eval of expression * opaque
  | Tstr_value of opaque * value_binding list
  | Tstr_primitive of opaque
  | Tstr_type of opaque * opaque
  | Tstr_typext of opaque
  | Tstr_exception of opaque
  | Tstr_module of module_binding
  | Tstr_recmodule of module_binding list
  | Tstr_modtype of opaque
  | Tstr_open of opaque
  | Tstr_include of include_declaration
  | Tstr_attribute of opaque

and module_binding = {
  mb_id : Ident.t;
  mb_name : opaque;
  mb_expr : module_expr;
  mb_attributes : opaque;
  mb_loc : Location.t;
}

and include_declaration = {
  incl_mod : module_expr;
  incl_type : opaque;
  incl_loc : Location.t;
  incl_attributes : opaque;
}