]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
libvaladoc: Support exporting the `class` modifier on fields
authorRico Tzschichholz <ricotz@ubuntu.com>
Fri, 17 Jul 2020 10:29:25 +0000 (12:29 +0200)
committerRico Tzschichholz <ricotz@ubuntu.com>
Fri, 17 Jul 2020 10:39:21 +0000 (12:39 +0200)
libvaladoc/api/field.vala

index 21948f035d3ec705347f3606b44788d58e6710ee..8b95035bdb3e49dcccd1d494b97c6972e049e7e6 100644 (file)
@@ -36,6 +36,7 @@ public class Valadoc.Api.Field : Symbol {
                base (parent, file, name, accessibility, comment, data);
 
                this.is_static = !(parent is Namespace) && data.binding == Vala.MemberBinding.STATIC;
+               this.is_class = data.binding == Vala.MemberBinding.CLASS;
                this.is_volatile = data.is_volatile;
 
                this.cname = Vala.get_ccode_name (data);
@@ -64,6 +65,14 @@ public class Valadoc.Api.Field : Symbol {
                get;
        }
 
+       /**
+        * Specifies whether this field is a class field.
+        */
+       public bool is_class {
+               private set;
+               get;
+       }
+
        /**
         * Specifies whether the field is volatile.
         */
@@ -81,6 +90,8 @@ public class Valadoc.Api.Field : Symbol {
                signature.append_keyword (accessibility.to_string ());
                if (is_static) {
                        signature.append_keyword ("static");
+               } else if (is_class) {
+                       signature.append_keyword ("class");
                }
                if (is_volatile) {
                        signature.append_keyword ("volatile");