Volker Birk 10 years ago
parent
commit
5605e04d89
  1. 2
      src/gen_throw_pEp_exception.ysl2
  2. 2
      src/pEp.yml2
  3. 16
      src/types_java.ysl2

2
src/gen_throw_pEp_exception.ysl2

@ -35,7 +35,7 @@ tstylesheet {
const char *ex_name;
switch (status) {
`` apply "enum/*[text()!=0]", 4, mode=case
`` apply "exception/*[text()!=0]", 4, mode=case
default:
assert(0);
ex_name = "Exception";

2
src/pEp.yml2

@ -4,7 +4,7 @@ decl interface @name;
decl method @name;
namespace pEp {
enum pEp_status {
exception pEp_status {
pEp_status_ok > 0
pEp_init_cannot_load_gpgme > 0x0110

16
src/types_java.ysl2

@ -4,14 +4,16 @@ function "toJava" {
param "type";
choose {
when "string" > String
when "stringlist" > String[]
when "message" > MimeMessage
when "pEp-identity" > Identity
when "identity_list" > Identity[]
when "timestamp" > Date
when "pEp_enc_format" > MimeMessage.EncFormat
when "$type='stringlist'" > String[]
when "$type='string'" > String
when "$type='message'" > MimeMessage
when "$type='pEp-identity'" > Identity
when "$type='identity-list'" > Identity[]
when "$type='timestamp'" > Date
when "$type='pEp-enc-format'" > MimeMessage.EncFormat
otherwise call "CamelCase" with "text", "$type";
}
}
define operator "†([$@]?[a-zA-Z0-9_]+)" as call "toJava" with "type", "%1";

Loading…
Cancel
Save