[vala/0.36] girparser: Add support for NoAccessorMethod metadata



commit 1c99915f50a13b402ce08ae482015dfc8be94ecd
Author: Rico Tzschichholz <ricotz ubuntu com>
Date:   Sat Apr 14 00:59:44 2018 +0200

    girparser: Add support for NoAccessorMethod metadata

 vala/valagirparser.vala |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/vala/valagirparser.vala b/vala/valagirparser.vala
index 15ce297..f708375 100644
--- a/vala/valagirparser.vala
+++ b/vala/valagirparser.vala
@@ -85,7 +85,8 @@ public class Vala.GirParser : CodeVisitor {
                RETURN_VOID,
                RETURNS_MODIFIED_POINTER,
                DELEGATE_TARGET_CNAME,
-               FINISH_VFUNC_NAME;
+               FINISH_VFUNC_NAME,
+               NO_ACCESSOR_METHOD:
 
                public static ArgumentType? from_string (string name) {
                        var enum_class = (EnumClass) typeof(ArgumentType).class_ref ();
@@ -1060,6 +1061,10 @@ public class Vala.GirParser : CodeVisitor {
                                                }
                                        }
 
+                                       if (metadata.has_argument (ArgumentType.NO_ACCESSOR_METHOD)) {
+                                               prop.set_attribute ("NoAccessorMethod", metadata.get_bool 
(ArgumentType.NO_ACCESSOR_METHOD));
+                                       }
+
                                        if (prop.get_attribute ("NoAccessorMethod") != null) {
                                                // gobject defaults
                                                if (prop.get_accessor != null) {


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