[vala/switch-to-gir] girparser: Add type_arguments metadata
- From: Luca Bruno <lucabru src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/switch-to-gir] girparser: Add type_arguments metadata
- Date: Fri, 27 Aug 2010 11:12:13 +0000 (UTC)
commit 482bf33a4fcbdea2cb20d05bc923a9d77408659d
Author: Luca Bruno <lethalman88 gmail com>
Date: Fri Aug 27 13:11:25 2010 +0200
girparser: Add type_arguments metadata
vala/valagirparser.vala | 13 ++++++++++++-
1 files changed, 12 insertions(+), 1 deletions(-)
---
diff --git a/vala/valagirparser.vala b/vala/valagirparser.vala
index 4e84ca2..0bbe1c9 100644
--- a/vala/valagirparser.vala
+++ b/vala/valagirparser.vala
@@ -51,6 +51,7 @@ public class Vala.GirParser : CodeVisitor {
SKIP,
HIDDEN,
TYPE,
+ TYPE_ARGUMENTS,
CHEADER_FILENAME,
NAME,
OWNED,
@@ -751,7 +752,7 @@ public class Vala.GirParser : CodeVisitor {
}
}
- DataType? element_get_type (DataType type, bool owned_by_default, out bool changed = null, ArgumentType arg_type = ArgumentType.TYPE) {
+ DataType? element_get_type (DataType type, bool owned_by_default, out bool changed = null, ArgumentType arg_type = ArgumentType.TYPE, ArgumentType arg_type_arguments = ArgumentType.TYPE_ARGUMENTS) {
if (&changed != null) {
changed = false;
}
@@ -764,6 +765,13 @@ public class Vala.GirParser : CodeVisitor {
return new_type;
}
+ if (metadata.has_argument (arg_type_arguments)) {
+ parse_type_arguments_from_string (type, metadata.get_string (arg_type_arguments), metadata.get_source_reference (arg_type_arguments));
+ if (&changed != null) {
+ changed = true;
+ }
+ }
+
if (!(type is VoidType)) {
if (owned_by_default) {
if (metadata.has_argument (ArgumentType.UNOWNED)) {
@@ -782,6 +790,9 @@ public class Vala.GirParser : CodeVisitor {
}
if (metadata.has_argument (ArgumentType.NULLABLE)) {
type.nullable = metadata.get_bool (ArgumentType.NULLABLE);
+ if (&changed != null) {
+ changed = true;
+ }
}
}
return type;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]