forked from pEp.foundation/libpEpTransport
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
38 lines
634 B
Plaintext
38 lines
634 B
Plaintext
2 years ago
|
include yslt.yml2
|
||
|
|
||
|
tstylesheet {
|
||
|
include standardlib.ysl2
|
||
|
|
||
|
template "/enum"
|
||
|
||
|
||
|
namespace pEp {
|
||
|
enum «yml:CamelCase(@name)»
|
||
|
{
|
||
|
`` apply "item|doc", 2
|
||
|
}
|
||
|
}
|
||
|
||
|
||
|
|
||
|
template "item" {
|
||
|
param "hexdigits", 8;
|
||
|
indent 0;
|
||
|
choose {
|
||
|
when "@output='hex'"
|
||
|
> «yml:CamelCase(@name)» = 0x«yml:dec2hex(.,$hexdigits)»
|
||
|
otherwise
|
||
|
> «yml:CamelCase(@name)» = «.»
|
||
|
}
|
||
|
if "position()!=last()" > ,
|
||
|
if "@doc" > // «@doc»
|
||
|
> \n
|
||
|
}
|
||
|
|
||
|
template "doc"
|
||
|
||
|
||
|
|
||
|
// «.»
|
||
|
|
||
|
||
|
||
|
}
|
||
|
|