[vala/0.40] girparser: Handle "function-macro" by skipping them



commit 09bd6df58259989bef7a935534c21dfbb4e6c2e5
Author: Rico Tzschichholz <ricotz ubuntu com>
Date:   Mon Jul 22 09:29:37 2019 +0200

    girparser: Handle "function-macro" by skipping them
    
    See https://gitlab.gnome.org/GNOME/gobject-introspection/merge_requests/159

 vala/valagirparser.vala | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
---
diff --git a/vala/valagirparser.vala b/vala/valagirparser.vala
index 2cf283c98..eaff9f39b 100644
--- a/vala/valagirparser.vala
+++ b/vala/valagirparser.vala
@@ -2170,6 +2170,8 @@ public class Vala.GirParser : CodeVisitor {
                                parse_bitfield ();
                        } else if (reader.name == "function") {
                                parse_method ("function");
+                       } else if (reader.name == "function-macro") {
+                               skip_element ();
                        } else if (reader.name == "callback") {
                                parse_callback ();
                        } else if (reader.name == "record") {
@@ -2372,6 +2374,8 @@ public class Vala.GirParser : CodeVisitor {
                                }
                        } else if (reader.name == "function") {
                                skip_element ();
+                       } else if (reader.name == "function-macro") {
+                               skip_element ();
                        } else {
                                // error
                                Report.error (get_current_src (), "unknown child element `%s' in `%s'".printf 
(reader.name, element_name));
@@ -2822,6 +2826,8 @@ public class Vala.GirParser : CodeVisitor {
                                parse_method ("method");
                        } else if (reader.name == "function") {
                                skip_element ();
+                       } else if (reader.name == "function-macro") {
+                               skip_element ();
                        } else if (reader.name == "union") {
                                parse_union ();
                        } else {
@@ -2899,6 +2905,8 @@ public class Vala.GirParser : CodeVisitor {
                                parse_constructor ();
                        } else if (reader.name == "function") {
                                parse_method ("function");
+                       } else if (reader.name == "function-macro") {
+                               skip_element ();
                        } else if (reader.name == "method") {
                                parse_method ("method");
                        } else if (reader.name == "virtual-method") {
@@ -2961,6 +2969,8 @@ public class Vala.GirParser : CodeVisitor {
                                parse_method ("virtual-method");
                        } else if (reader.name == "function") {
                                parse_method ("function");
+                       } else if (reader.name == "function-macro") {
+                               skip_element ();
                        } else if (reader.name == "method") {
                                parse_method ("method");
                        } else if (reader.name == "glib:signal") {
@@ -3425,6 +3435,8 @@ public class Vala.GirParser : CodeVisitor {
                                }
                        } else if (reader.name == "function") {
                                skip_element ();
+                       } else if (reader.name == "function-macro") {
+                               skip_element ();
                        } else if (reader.name == "union") {
                                parse_union ();
                        } else {
@@ -3513,6 +3525,8 @@ public class Vala.GirParser : CodeVisitor {
                                parse_method ("method");
                        } else if (reader.name == "function") {
                                skip_element ();
+                       } else if (reader.name == "function-macro") {
+                               skip_element ();
                        } else if (reader.name == "record") {
                                parse_record ();
                        } else {


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