[vala] girparser: support class methods
- From: Evan Nemerson <evann src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala] girparser: support class methods
- Date: Sat, 28 Jul 2012 17:52:25 +0000 (UTC)
commit 018816f42f7319f4d5dac07b254c90ae7a90bd00
Author: Evan Nemerson <evan coeus-group com>
Date: Wed Jul 25 15:37:47 2012 -0700
girparser: support class methods
Fixes bug 666800.
vala/valagirparser.vala | 22 ++++++++++++++++++++++
1 files changed, 22 insertions(+), 0 deletions(-)
---
diff --git a/vala/valagirparser.vala b/vala/valagirparser.vala
index 8bf0284..7d7ee72 100644
--- a/vala/valagirparser.vala
+++ b/vala/valagirparser.vala
@@ -761,6 +761,28 @@ public class Vala.GirParser : CodeVisitor {
}
}
+ if (symbol is Class && girdata != null) {
+ var class_struct = girdata["glib:type-struct"];
+ if (class_struct != null) {
+ var klass = parser.resolve_node (parent, parser.parse_symbol_from_string (class_struct, source_reference));
+ if (klass != null) {
+ var i = 0;
+ while ( i < klass.members.size ) {
+ var node = klass.members[i];
+ if (node.symbol is Method) {
+ klass.remove_member (node);
+ this.add_member (node);
+
+ Method m = (Method) node.symbol;
+ m.binding = MemberBinding.CLASS;
+ } else {
+ i++;
+ }
+ }
+ }
+ }
+ }
+
// process children
foreach (var node in members) {
node.process (parser);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]