|
@@ -26,6 +26,16 @@ open Common
|
|
|
|
|
|
let unsupported p = error "This expression cannot be generated to Cpp" p
|
|
let unsupported p = error "This expression cannot be generated to Cpp" p
|
|
|
|
|
|
|
|
+(*
|
|
|
|
+ Generators do not care about non-core-type abstracts, so let us follow them
|
|
|
|
+ away by default.
|
|
|
|
+*)
|
|
|
|
+let rec follow t = match Type.follow t with
|
|
|
|
+ | TAbstract(a,tl) when not (Meta.has Meta.CoreType a.a_meta) ->
|
|
|
|
+ follow (Codegen.Abstract.get_underlying_type a tl)
|
|
|
|
+ | t ->
|
|
|
|
+ t
|
|
|
|
+
|
|
(*
|
|
(*
|
|
Code for generating source files.
|
|
Code for generating source files.
|
|
It manages creating diretories, indents, blocks and only modifying files
|
|
It manages creating diretories, indents, blocks and only modifying files
|
|
@@ -313,7 +323,7 @@ let has_meta_key meta key =
|
|
|
|
|
|
let get_field_access_meta field_access key =
|
|
let get_field_access_meta field_access key =
|
|
match field_access with
|
|
match field_access with
|
|
- | FInstance(_,class_field)
|
|
|
|
|
|
+ | FInstance(_,class_field)
|
|
| FStatic(_,class_field) -> get_meta_string class_field.cf_meta key
|
|
| FStatic(_,class_field) -> get_meta_string class_field.cf_meta key
|
|
| _ -> ""
|
|
| _ -> ""
|
|
;;
|
|
;;
|