From 705b212cdd1a5f4db94fd74c3884a28d20042df9 Mon Sep 17 00:00:00 2001 From: heck Date: Thu, 22 Jun 2023 11:59:26 +0200 Subject: [PATCH] struct field add mandatory param 'optional' --- examples/example1/example1.yml2 | 6 +++--- idl/pEpACIDLang.yml2 | 2 ++ idl/test_api/test_api.yml2 | 4 ++-- lm-c99/tests/test_ig_c99/test_ig_c99.yml2 | 12 ++++++------ 4 files changed, 13 insertions(+), 11 deletions(-) diff --git a/examples/example1/example1.yml2 b/examples/example1/example1.yml2 index 5fafd9e..37a41c7 100644 --- a/examples/example1/example1.yml2 +++ b/examples/example1/example1.yml2 @@ -28,9 +28,9 @@ pEpACIDLang { } struct struct1 { - field int int1; - field size size1 doc="short doc"; - field string string1 + field required int int1; + field required size size1 doc="short doc"; + field optional string string1 doc=""" Multiline Doc diff --git a/idl/pEpACIDLang.yml2 b/idl/pEpACIDLang.yml2 index 745b28f..7ef6913 100644 --- a/idl/pEpACIDLang.yml2 +++ b/idl/pEpACIDLang.yml2 @@ -82,9 +82,11 @@ decl item @name; // ------ decl struct @name; decl field @optional @type @name; +// @optional valid values are 'optional' and 'required' // optional attrib 'doc' // optional attrib 'deallocator' (for non-idl types) + // Method // ------ decl method @name; diff --git a/idl/test_api/test_api.yml2 b/idl/test_api/test_api.yml2 index 95e5e43..6dba5e6 100644 --- a/idl/test_api/test_api.yml2 +++ b/idl/test_api/test_api.yml2 @@ -18,8 +18,8 @@ pEpACIDLang { } struct struct1 { - field int int1; - field size size1; + field optional int int1; + field optional size size1; } } } 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 5a743f9..9ad8140 100644 --- a/lm-c99/tests/test_ig_c99/test_ig_c99.yml2 +++ b/lm-c99/tests/test_ig_c99/test_ig_c99.yml2 @@ -105,9 +105,9 @@ pEpACIDLang { } struct struct1 { - field int int1; - field size size1; - field string string1; + field optinal int int1; + field optional size size1; + field optional string string1; } @@ -124,9 +124,9 @@ pEpACIDLang { } struct struct1 { - field int int1; - field size size1; - field string string1; + field optional int int1; + field optional size size1; + field optional string string1; }