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.
 

180 lines
5.3 KiB

pEpACIDLang {
include pEpACIDLang.yml2
package ig_c99 {
version 1.0;
license "License text";
api test {
enum implicit_value_items {
item item1;
item item2;
item item3;
item item4;
};
enum explicit_dec_value_items {
item item1 0;
item item2 2;
item item3 987;
item item4 -3;
};
enum explicit_hex_value_items {
item item1 "0x0";
item item2 "0x2";
item item2 "0xFF";
item item2 "0xff";
item item3 "0x987";
item item4 "0x3";
};
enum doc_well_formatted {
item item1 doc="oneline doc";
item item2 doc="";
item item3
doc=
"""
item 3
------
multiline
doc
""";
item decitem1 23 doc="oneline doc";
item decitem2 42 doc="";
item decitem3 -9999
doc=
"""
item 3
------
multiline
doc
""";
item hexitem1 "0x23" doc="oneline doc";
item hexitem2 "0x42" doc="";
item hexitem3 "0x99FF"
doc=
"""
item 3
------
multiline
doc
""";
};
enum doc_badly_formattted {
item item1 0;
item item2 1;
item item3 2
doc=
"""
item 3
------
multiline
doc with bad formattting """;
};
// TEST
// ----
// Test comma after param
method test_one_param {
param borrow size p
doc="""
Multiline
Doc
""";
};
method test_two_param {
param borrow size p1
doc="""
Multiline
Doc
""";
param borrow size p2
doc="""
Multiline
Doc
""";
};
struct struct1 {
field int int1;
field size size1;
field string string1;
};
// TEST
// ----
deftype deftype1 as int;
deftype deftype2 as string;
deftype stringlist as list<string>;
enum enum1 {
item item1;
item item2;
item item3;
};
struct struct1 {
field int int1;
field size size1;
field string string1;
};
method method_test_all {
// primitive basetype
param borrow int borrow_primitive_basetype;
param mborrow int mborrow_primitive_basetype;
//param claim int claim_primitive_basetype; ERROR CASE
//param provide int provide_primitive_basetype; ERROR CASE
// object basetype
param borrow string borrow_obj_basetype;
param mborrow string mborrow_obj_basetype;
param claim string claim_obj_basetype;
param provide string provide_obj_basetype;
// enum
param borrow enum1 borrow_enum;
param mborrow enum1 mborrow_enum;
//param claim enum1 claim_enum; ERROR CASE
//param provide enum1 provide_enum; ERROR CASE
// struct
param borrow struct1 borrow_struct;
param mborrow struct1 mborrow_struct;
param claim struct1 claim_struct;
param provide struct1 provide_struct;
// deftype of primitive basetype
param borrow deftype1 borrow_deftype_primitive_basetype;
param mborrow deftype1 mborrow_deftype_primitive_basetype;
//param claim deftype1 claim_deftype_primitive_basetype; ERROR CASE
//param provide deftype1 provide_deftype_primitive_basetype; ERROR CASE
// deftype of object basetype object
param borrow deftype2 borrow_deftype_obj_basetype;
param mborrow deftype2 mborrow_deftype_obj_basetype;
param claim deftype2 claim_deftype_obj_basetype;
param provide deftype2 provide_deftype_obj_basetype;
// deftype of generic
param borrow stringlist borrow_deftype_generic;
param mborrow stringlist mborrow_deftype_generic;
param claim stringlist claim_deftype_generic;
param provide stringlist provide_deftype_generic;
};
};
};
};