You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
70 lines
2.0 KiB
70 lines
2.0 KiB
include yslt.yml2
|
|
|
|
tstylesheet {
|
|
include idl_api.ysl2
|
|
|
|
template "api" document "output/typesys.out", "text" {
|
|
||
|
|
// basetypes
|
|
«func:typeinfo('string')»
|
|
«func:typeinfo('binary')»
|
|
«func:typeinfo('int')»
|
|
«func:typeinfo('uint')»
|
|
«func:typeinfo('size')»
|
|
«func:typeinfo('bool')»
|
|
«func:typeinfo('opaque')»
|
|
|
|
// enum
|
|
«func:typeinfo('enum1')»
|
|
|
|
// struct
|
|
«func:typeinfo('struct1')»
|
|
|
|
// deftypes basetype
|
|
«func:typeinfo('dt_int')»
|
|
«func:typeinfo('dt_string')»
|
|
|
|
// deftype enum
|
|
«func:typeinfo('dt_enum')»
|
|
|
|
// deftype struct
|
|
«func:typeinfo('dt_struct')»
|
|
|
|
// deftypes generics
|
|
«func:typeinfo('dt_list_of_string')»
|
|
«func:typeinfo('dt_pair_int_string')»
|
|
|
|
// deftypes recursive
|
|
«func:typeinfo('dt_dt_list_of_string')»
|
|
«func:typeinfo('dt_dt_dt_list_of_string')»
|
|
|
|
// undefined
|
|
«func:typeinfo('undefined garbage')»
|
|
||
|
|
}
|
|
|
|
def "func:typeinfo" {
|
|
param "idltype";
|
|
result call "typeinfo" with "idltype", "$idltype";
|
|
};
|
|
|
|
function "typeinfo" {
|
|
param "idltype";
|
|
||
|
|
type: «$idltype»
|
|
idl_type_is_defined: «func:idl_type_is_defined($idltype)»
|
|
idl_type_is_generic: «func:idl_type_is_generic($idltype)»
|
|
idl_type_get_typekind_of_type: «func:idl_type_get_typekind_of_type($idltype)»
|
|
||
|
|
const "resolved_type", "func:idl_type_get_resolved_type($idltype)";
|
|
||
|
|
resolved type: «$resolved_type»
|
|
idl_type_is_defined: «func:idl_type_is_defined($resolved_type)»
|
|
idl_type_is_generic: «func:idl_type_is_generic($resolved_type)»
|
|
idl_type_get_typekind_of_type: «func:idl_type_get_typekind_of_type($resolved_type)»
|
|
|
|
||
|
|
}
|
|
|
|
}
|
|
|
|
|