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.
36 lines
1.1 KiB
36 lines
1.1 KiB
include ./textutils.ysl2
|
|
|
|
function "toJava" {
|
|
param "type";
|
|
|
|
choose {
|
|
when "$type='stringlist'" > ArrayList<String>
|
|
when "$type='string'" > String
|
|
when "$type='message'" > MimeMessage
|
|
when "$type='identity'" > Identity
|
|
when "$type='identitylist'" > ArrayList<Identity>
|
|
when "$type='timestamp'" > Date
|
|
when "$type='encformat'" > MimeMessage.EncFormat
|
|
when "$type='bloblist'" > ArrayList<Blob>
|
|
when "$type='stringpairlist'" > ArrayList<Pair<String, String>>
|
|
when "$type='message'" > MimeMessage
|
|
|
|
otherwise call "CamelCase" with "text", "$type";
|
|
}
|
|
}
|
|
|
|
function "toIntermediate" {
|
|
param "type";
|
|
|
|
choose {
|
|
when "$type='stringlist'" > ArrayList<byte[]>
|
|
when "$type='stringpairlist'" > ArrayList<Pair<byte[], byte[]>>
|
|
when "$type='string'" > byte[]
|
|
|
|
otherwise call "toJava" with "type", "$type";
|
|
}
|
|
}
|
|
|
|
define operator "†([$@]?[a-zA-Z0-9_]+)" as call "toJava" with "type", "%1";
|
|
define operator "¡([$@]?[a-zA-Z0-9_]+)" as call "toIntermediate" with "type", "%1";
|
|
|
|
|