OSDN Git Service

Implement --use-network option parser
[happyabc/happyabc.git] / swflib / methodType.ml
1 open AbcType
2
3 type function_scope =
4     [ `Global
5     | `Class of Cpool.multiname]
6
7 type class_type     =
8     [ `Sealed
9     | `Final
10     | `Interface
11     | `ProtectedNs of Cpool.namespace]
12
13 type 'a method_ = {
14     method_name:  Cpool.multiname;
15     params:       int list;
16     return:       int;
17     method_flags: AbcType.method_flag list;
18     code:         'a list;
19     traits:       int list;
20     exceptions:   int list;
21     fun_scope:    function_scope;
22     method_attrs: [`Override | `Final] list
23 }
24
25 type 'a class_ = {
26   class_name:       Cpool.multiname;
27   super:            Cpool.multiname;
28   class_flags:      class_type list;
29   cinit:            'a method_;
30   iinit:            'a method_;
31   interface:        'a class_ list;
32   instance_methods: 'a method_ list;
33   static_methods:   'a method_ list;
34   attrs:       Cpool.multiname list
35 }
36
37 let empty = {
38   method_attrs = [];
39   method_name        = `QName (`Namespace "","");
40   params             = [];
41   return             = 0;
42   method_flags       = [];
43   code = [];
44   traits             = [];
45   exceptions         = [];
46   fun_scope          = `Global
47 }