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



commit c9a37de9131ae1b05fc23b01abab535fc12430cf
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 2844faa5f..1d17542c6 100644
--- a/libvaladoc/api/field.vala
+++ b/libvaladoc/api/field.vala
@@ -36,6 +36,7 @@ public class Valadoc.Api.Field : Member {
                base (parent, file, name, accessibility, comment, data);
 
                this.is_static = !(parent is Namespace) && is_static;
+               this.is_class = ((Vala.Field) data).binding == Vala.MemberBinding.CLASS;
                this.is_volatile = is_volatile;
 
                this.cname = cname;
@@ -64,6 +65,14 @@ public class Valadoc.Api.Field : Member {
                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 : Member {
                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]