4 #define DECLARE(x) struct _##x;typedef struct _##x x##_t;
5 #define DECLARE_LIST(x) \
8 struct _##x##_list*next; \
10 typedef struct _##x##_list x##_list_t; \
13 DECLARE(abc_method_body);
14 DECLARE(abc_interface);
15 DECLARE(abc_multiname);
16 DECLARE(abc_namespace);
18 DECLARE_LIST(abc_multiname);
20 typedef struct _abc_method {
21 abc_multiname_t*return_type;
22 abc_multiname_list_t*parameters;
27 int method_body_index;
30 typedef enum multiname_type
43 struct _abc_namespace {
48 struct _abc_multiname {
49 multiname_type_t type;
51 const char*namespace_set_name; // FIXME should be a struct
55 typedef struct _dict_entry {
60 typedef struct _dict {
75 dict_t*namespace_sets;
87 abc_file_t*abc_file_new();
89 typedef struct _abc_trait {
108 typedef struct _abc_class {
112 const char*classname;
113 const char*superclass;
114 const char*protectedNS;
116 abc_multiname_list_t*interfaces;
121 int static_constructor_index;
122 dict_t*static_constructor_traits;
127 abc_class_t* abc_class_new(abc_file_t*pool, char*classname, char*superclass);
128 void abc_class_sealed(abc_class_t*c);
129 void abc_class_final(abc_class_t*c);
130 void abc_class_interface(abc_class_t*c);
131 void abc_class_protectedNS(abc_class_t*c, char*namespace);
133 abc_method_body_t* abc_class_staticconstructor(abc_class_t*cls, char*returntype, int num_params, ...);
134 abc_method_body_t* abc_class_constructor(abc_class_t*cls, char*returntype, int num_params, ...);
135 abc_method_body_t* abc_class_method(abc_class_t*cls, char*returntype, char*name, int num_params, ...);
137 struct _abc_method_body {
145 int init_scope_depth;
151 typedef struct _abc_label {
154 typedef struct _abc_script {
160 abc_script_t* abc_initscript(abc_file_t*pool, char*returntype, int num_params, ...);