From 3f22b2fc55e5da8ab4068eb54490d440288a16ca Mon Sep 17 00:00:00 2001 From: Pavel Shevaev Date: Wed, 8 Nov 2023 17:07:59 +0300 Subject: [PATCH] Adding initial support for @cs_implements:IFoo,IBar --- src/codegen.inc.php | 1 + tpl/macro.twig | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/src/codegen.inc.php b/src/codegen.inc.php index dc57829..ebd715c 100644 --- a/src/codegen.inc.php +++ b/src/codegen.inc.php @@ -31,6 +31,7 @@ function supported_tokens() 'diffable', 'table_pkey', 'bhl_bind', + 'cs_implements', 'cs_attributes', 'cs_accessor_interface', 'cs_propget_interface', diff --git a/tpl/macro.twig b/tpl/macro.twig index 64d8d3c..6bfeecc 100644 --- a/tpl/macro.twig +++ b/tpl/macro.twig @@ -204,6 +204,10 @@ ResetFieldMask(); : {{o.parent ? o.parent.name : 'BaseMetaStruct'}} {{- has_token(o, 'cloneable') and not o.parent ? ', IMetaCloneable' -}} {%- endif -%} +{%- for ifs in token(o, "cs_implements", "")|split(',') -%} +, {{ifs}} +{%- endfor -%} + {%- for ai in get_accessor_interfaces(o) -%} , {{ai.interfacename}} {%- endfor -%}