|
@@ -85,16 +85,14 @@ let gen_constr e =
|
|
|
let gen_field att f =
|
|
|
let add_get_set acc name att =
|
|
|
match acc with
|
|
|
- | NormalAccess | ResolveAccess | MethodAccess _ -> att
|
|
|
+ | NormalAccess | ResolveAccess -> att
|
|
|
+ | MethodAccess dyn -> (name, if dyn then "dynamic" else "method") :: att
|
|
|
| NoAccess | NeverAccess -> (name, "null") :: att
|
|
|
- | CallAccess m -> (name, if m = name ^ "_" ^ f.cf_name then "dynamic" else m) :: att
|
|
|
- | InlineAccess -> assert false
|
|
|
+ | CallAccess m -> (name,m) :: att
|
|
|
+ | InlineAccess -> (name,"inline") :: att
|
|
|
in
|
|
|
let att = (match f.cf_expr with None -> att | Some e -> ("line",string_of_int (Lexer.get_error_line e.epos)) :: att) in
|
|
|
- let att = (match f.cf_get with
|
|
|
- | InlineAccess -> att
|
|
|
- | g -> add_get_set f.cf_get "get" (add_get_set f.cf_set "set" att)
|
|
|
- ) in
|
|
|
+ let att = add_get_set f.cf_get "get" (add_get_set f.cf_set "set" att) in
|
|
|
let att = (match f.cf_params with [] -> att | l -> ("params", String.concat ":" (List.map (fun (n,_) -> n) l)) :: att) in
|
|
|
node f.cf_name (if f.cf_public then ("public","1") :: att else att) (gen_type f.cf_type :: gen_doc_opt f.cf_doc)
|
|
|
|
|
@@ -122,10 +120,10 @@ let gen_type_decl com t =
|
|
|
| TClassDecl c ->
|
|
|
let stats = List.map (gen_field ["static","1"]) c.cl_ordered_statics in
|
|
|
let fields = (match c.cl_super with
|
|
|
- | None -> c.cl_ordered_fields
|
|
|
- | Some (csup,_) -> List.filter (fun f -> exists f csup) c.cl_ordered_fields
|
|
|
+ | None -> List.map (fun f -> f,[]) c.cl_ordered_fields
|
|
|
+ | Some (csup,_) -> List.map (fun f -> if exists f csup then (f,["override","1"]) else (f,[])) c.cl_ordered_fields
|
|
|
) in
|
|
|
- let fields = List.map (gen_field []) fields in
|
|
|
+ let fields = List.map (fun (f,att) -> gen_field att f) fields in
|
|
|
let constr = (match c.cl_constructor with None -> [] | Some f -> [gen_field [] f]) in
|
|
|
let impl = List.map (gen_class_path "implements") c.cl_implements in
|
|
|
let tree = (match c.cl_super with
|