From 5e805ef9592e7f94dfc46888ca1552411c2bb0d5 Mon Sep 17 00:00:00 2001 From: heck Date: Thu, 22 Jun 2023 10:13:23 +0200 Subject: [PATCH] style: s/};/}/g - never required. might be confusing for readers --- examples/example1/example1.yml2 | 10 ++++---- idl/idl_api.ysl2 | 18 +++++++-------- idl/pEpACIDLang.yml2 | 2 +- idl/test_api/test_api.yml2 | 8 +++---- idl/test_api/test_api.ysl2 | 3 +-- lm-c99/ig-c99.ysl2 | 2 +- lm-c99/tests/test_ig_c99/test_ig_c99.yml2 | 28 +++++++++++------------ 7 files changed, 35 insertions(+), 36 deletions(-) diff --git a/examples/example1/example1.yml2 b/examples/example1/example1.yml2 index abf0662..5fafd9e 100644 --- a/examples/example1/example1.yml2 +++ b/examples/example1/example1.yml2 @@ -25,7 +25,7 @@ pEpACIDLang { ------------- specify value in quotes """; - }; + } struct struct1 { field int int1; @@ -35,7 +35,7 @@ pEpACIDLang { Multiline Doc """; - }; + } @@ -104,7 +104,7 @@ pEpACIDLang { param provide struct1 param1; } - }; + } - }; -}; \ No newline at end of file + } +} \ No newline at end of file diff --git a/idl/idl_api.ysl2 b/idl/idl_api.ysl2 index 1620976..fd2a966 100644 --- a/idl/idl_api.ysl2 +++ b/idl/idl_api.ysl2 @@ -132,7 +132,7 @@ def "func:idl_get_package_license" { def "func:idl_get_basetypes" { result "/pEpACIDLang/idl/basetypes/*" -}; +} // TYPES // ----- @@ -253,44 +253,44 @@ function "idl_type_of_generic_deftype" { def "func:idl_method_get_params" { param "idl_method_name"; result "//method[@name=$idl_method_name]/*[name()='param']/@name" -}; +} def "func:idl_method_get_throws" { param "idl_method_name"; result "//method[@name=$idl_method_name]/*[name()='throws']/@name" -}; +} def "func:idl_method_param_get_mode" { param "idl_method_name"; param "param_name"; result "//method[@name=$idl_method_name]/param[@name=$param_name]/@mode" -}; +} def "func:idl_method_param_get_type" { param "idl_method_name"; param "param_name"; result "//method[@name=$idl_method_name]/param[@name=$param_name]/@type" -}; +} def "func:idl_method_param_get_doc" { param "idl_method_name"; param "param_name"; result "//method[@name=$idl_method_name]/param[@name=$param_name]/@doc" -}; +} def "func:idl_method_doc_get_brief" { param "idl_method_name"; result "//method[@name=$idl_method_name]/@brief" -}; +} def "func:idl_method_doc_get_note" { param "idl_method_name"; result "//method[@name=$idl_method_name]/@note" -}; +} def "func:idl_method_throw_get_doc" { param "idl_method_name"; param "throw_name"; result "//method[@name=$idl_method_name]/throws[@name=$throw_name]/@doc" -}; +} diff --git a/idl/pEpACIDLang.yml2 b/idl/pEpACIDLang.yml2 index abda80f..0762ce9 100644 --- a/idl/pEpACIDLang.yml2 +++ b/idl/pEpACIDLang.yml2 @@ -57,7 +57,7 @@ idl { // timestamp; // point of time opaque; // opaque type (was: 'any') } -}; +} decl package @name; diff --git a/idl/test_api/test_api.yml2 b/idl/test_api/test_api.yml2 index 12c8b89..95e5e43 100644 --- a/idl/test_api/test_api.yml2 +++ b/idl/test_api/test_api.yml2 @@ -15,12 +15,12 @@ pEpACIDLang { enum enum1 { item item1; item item2; - }; + } struct struct1 { field int int1; field size size1; - }; - }; - }; + } + } + } } diff --git a/idl/test_api/test_api.ysl2 b/idl/test_api/test_api.ysl2 index 5f12a27..542d186 100644 --- a/idl/test_api/test_api.ysl2 +++ b/idl/test_api/test_api.ysl2 @@ -46,8 +46,7 @@ tstylesheet { def "func:typeinfo" { param "idltype"; result call "typeinfo" with "idltype", "$idltype"; - }; - + } function "typeinfo" { param "idltype"; || diff --git a/lm-c99/ig-c99.ysl2 b/lm-c99/ig-c99.ysl2 index 2523fc5..1462ccf 100644 --- a/lm-c99/ig-c99.ysl2 +++ b/lm-c99/ig-c99.ysl2 @@ -106,7 +106,7 @@ tstylesheet { otherwise error > c99_typeclass_of_idltype - is not an idltype: «$idltype» } - }; + } def "func:c99_itemname_of_enumitem" { diff --git a/lm-c99/tests/test_ig_c99/test_ig_c99.yml2 b/lm-c99/tests/test_ig_c99/test_ig_c99.yml2 index 4750341..5a743f9 100644 --- a/lm-c99/tests/test_ig_c99/test_ig_c99.yml2 +++ b/lm-c99/tests/test_ig_c99/test_ig_c99.yml2 @@ -11,14 +11,14 @@ pEpACIDLang { 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"; @@ -27,7 +27,7 @@ pEpACIDLang { item item2 "0xff"; item item3 "0x987"; item item4 "0x3"; - }; + } enum doc_well_formatted { item item1 doc="oneline doc"; @@ -60,7 +60,7 @@ pEpACIDLang { multiline doc """; - }; + } enum doc_badly_formattted { item item1 0; @@ -77,7 +77,7 @@ pEpACIDLang { multiline doc with bad formattting """; - }; + } // TEST // ---- @@ -89,7 +89,7 @@ pEpACIDLang { Multiline Doc """; - }; + } method test_two_param { param borrow size p1 @@ -102,13 +102,13 @@ pEpACIDLang { Multiline Doc """; - }; + } struct struct1 { field int int1; field size size1; field string string1; - }; + } // TEST @@ -121,13 +121,13 @@ pEpACIDLang { item item1; item item2; item item3; - }; + } struct struct1 { field int int1; field size size1; field string string1; - }; + } method method_test_all { @@ -172,9 +172,9 @@ pEpACIDLang { param mborrow stringlist mborrow_deftype_generic; param claim stringlist claim_deftype_generic; param provide stringlist provide_deftype_generic; - }; + } - }; - }; -}; + } + } +}