|
|
@ -17,19 +17,29 @@ tstylesheet { |
|
|
|
// * object |
|
|
|
def "func:ig_c99_typeclass" { |
|
|
|
param "idltype"; |
|
|
|
const "resolved_type", "func:idl_type_get_resolved_type($idltype)"; |
|
|
|
const "resolved_typekind", "func:idl_type_get_typekind_of_type($resolved_type)"; |
|
|
|
|
|
|
|
choose { |
|
|
|
when "func:idl_type_is_defined($idltype)" |
|
|
|
choose { |
|
|
|
when "func:idl_type_is_of_typekind_basetype($idltype)" |
|
|
|
when "$resolved_typekind = 'basetype'" |
|
|
|
choose { |
|
|
|
when "$resolved_type = 'string'" |
|
|
|
result > object |
|
|
|
when "$resolved_type = 'binary'" |
|
|
|
result > object |
|
|
|
otherwise |
|
|
|
result > primitive |
|
|
|
} |
|
|
|
when "$resolved_typekind = 'enum'" |
|
|
|
result > primitive |
|
|
|
when "func:idl_type_is_of_typekind_deftype($idltype)" |
|
|
|
result > primitive |
|
|
|
when "func:idl_type_is_of_typekind_enum($idltype)" |
|
|
|
result > primitive |
|
|
|
when "func:idl_type_is_of_typekind_struct($idltype)" |
|
|
|
result > primitive |
|
|
|
|
|
|
|
when "$resolved_typekind = 'struct'" |
|
|
|
result > object |
|
|
|
when "$resolved_typekind = 'generic'" |
|
|
|
result > object |
|
|
|
otherwise |
|
|
|
error > ig_c99_typeclass - cant determine typeclass of: «$idltype» |
|
|
|
} |
|
|
|
otherwise |
|
|
|
error > ig_c99_typeclass - is not a type: «$idltype» |
|
|
|