|
@@ -1071,6 +1071,14 @@ let s_const = function
|
|
| TThis -> "this"
|
|
| TThis -> "this"
|
|
| TSuper -> "super"
|
|
| TSuper -> "super"
|
|
|
|
|
|
|
|
+let s_field_access s_type fa = match fa with
|
|
|
|
+ | FStatic (c,f) -> "static(" ^ s_type_path c.cl_path ^ "." ^ f.cf_name ^ ")"
|
|
|
|
+ | FInstance (c,_,f) -> "inst(" ^ s_type_path c.cl_path ^ "." ^ f.cf_name ^ " : " ^ s_type f.cf_type ^ ")"
|
|
|
|
+ | FClosure (c,f) -> "closure(" ^ (match c with None -> f.cf_name | Some (c,_) -> s_type_path c.cl_path ^ "." ^ f.cf_name) ^ ")"
|
|
|
|
+ | FAnon f -> "anon(" ^ f.cf_name ^ ")"
|
|
|
|
+ | FEnum (en,f) -> "enum(" ^ s_type_path en.e_path ^ "." ^ f.ef_name ^ ")"
|
|
|
|
+ | FDynamic f -> "dynamic(" ^ f ^ ")"
|
|
|
|
+
|
|
let rec s_expr s_type e =
|
|
let rec s_expr s_type e =
|
|
let sprintf = Printf.sprintf in
|
|
let sprintf = Printf.sprintf in
|
|
let slist f l = String.concat "," (List.map f l) in
|
|
let slist f l = String.concat "," (List.map f l) in
|
|
@@ -1090,14 +1098,7 @@ let rec s_expr s_type e =
|
|
| TEnumParameter (e1,_,i) ->
|
|
| TEnumParameter (e1,_,i) ->
|
|
sprintf "%s[%i]" (loop e1) i
|
|
sprintf "%s[%i]" (loop e1) i
|
|
| TField (e,f) ->
|
|
| TField (e,f) ->
|
|
- let fstr = (match f with
|
|
|
|
- | FStatic (c,f) -> "static(" ^ s_type_path c.cl_path ^ "." ^ f.cf_name ^ ")"
|
|
|
|
- | FInstance (c,_,f) -> "inst(" ^ s_type_path c.cl_path ^ "." ^ f.cf_name ^ " : " ^ s_type f.cf_type ^ ")"
|
|
|
|
- | FClosure (c,f) -> "closure(" ^ (match c with None -> f.cf_name | Some (c,_) -> s_type_path c.cl_path ^ "." ^ f.cf_name) ^ ")"
|
|
|
|
- | FAnon f -> "anon(" ^ f.cf_name ^ ")"
|
|
|
|
- | FEnum (en,f) -> "enum(" ^ s_type_path en.e_path ^ "." ^ f.ef_name ^ ")"
|
|
|
|
- | FDynamic f -> "dynamic(" ^ f ^ ")"
|
|
|
|
- ) in
|
|
|
|
|
|
+ let fstr = s_field_access s_type f in
|
|
sprintf "%s.%s" (loop e) fstr
|
|
sprintf "%s.%s" (loop e) fstr
|
|
| TTypeExpr m ->
|
|
| TTypeExpr m ->
|
|
sprintf "TypeExpr %s" (s_type_path (t_path m))
|
|
sprintf "TypeExpr %s" (s_type_path (t_path m))
|