]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
libvaladoc: Support exporting the `class` modifier on methods
authorCorentin Noël <corentin.noel@collabora.com>
Fri, 17 Jul 2020 08:35:37 +0000 (10:35 +0200)
committerRico Tzschichholz <ricotz@ubuntu.com>
Fri, 17 Jul 2020 10:39:21 +0000 (12:39 +0200)
libvaladoc/api/method.vala

index be803db89b4501610b448d59d44ab8bad82deb6f..93f9c0bd2cc34cb5da3dd64d1f6dc05901799d9f 100644 (file)
@@ -142,6 +142,15 @@ public class Valadoc.Api.Method : Symbol, Callable {
                }
        }
 
+       /**
+        * Specifies whether this method is a class method
+        */
+       public bool is_class {
+               get {
+                       return ((Vala.Method) data).binding == Vala.MemberBinding.CLASS;
+               }
+       }
+
        /**
         * Specifies whether this method is a creation method
         */
@@ -178,6 +187,8 @@ public class Valadoc.Api.Method : Symbol, Callable {
                if (!is_constructor) {
                        if (is_static) {
                                signature.append_keyword ("static");
+                       } else if (is_class) {
+                               signature.append_keyword ("class");
                        } else if (is_abstract) {
                                signature.append_keyword ("abstract");
                        } else if (is_override) {