[vala/0.48] libvaladoc: Support exporting the `class` modifier on fields



commit 5d06ec7f76f73d0ccbd3788d7f2e6aa8657957d1
Author: Rico Tzschichholz <ricotz ubuntu com>
Date:   Fri Jul 17 12:29:25 2020 +0200

    libvaladoc: Support exporting the `class` modifier on fields

 libvaladoc/api/field.vala | 11 +++++++++++
 1 file changed, 11 insertions(+)
---
diff --git a/libvaladoc/api/field.vala b/libvaladoc/api/field.vala
index 21948f035..8b95035bd 100644
--- a/libvaladoc/api/field.vala
+++ b/libvaladoc/api/field.vala
@@ -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");


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]