vala r2077 - in trunk: . vapigen
- From: juergbi svn gnome org
- To: svn-commits-list gnome org
- Subject: vala r2077 - in trunk: . vapigen
- Date: Fri, 28 Nov 2008 19:36:44 +0000 (UTC)
Author: juergbi
Date: Fri Nov 28 19:36:44 2008
New Revision: 2077
URL: http://svn.gnome.org/viewvc/vala?rev=2077&view=rev
Log:
2008-11-28 JÃrg Billeter <j bitron ch>
* vapigen/valagirparser.vala:
Support interface prerequisites
Modified:
trunk/ChangeLog
trunk/vapigen/valagirparser.vala
Modified: trunk/vapigen/valagirparser.vala
==============================================================================
--- trunk/vapigen/valagirparser.vala (original)
+++ trunk/vapigen/valagirparser.vala Fri Nov 28 19:36:44 2008
@@ -68,6 +68,8 @@
next ();
parse_repository ();
+ var remove_queue = new ArrayList<CodeNode> ();
+
foreach (CodeNode node in source_file.get_nodes ()) {
if (node is Class) {
var cl = (Class) node;
@@ -76,7 +78,7 @@
var class_struct = ns.scope.lookup (cl.name + "Class") as Struct;
if (class_struct != null) {
ns.remove_struct ((Struct) class_struct);
- source_file.remove_node (class_struct);
+ remove_queue.add (class_struct);
}
} else if (node is Interface) {
var iface = (Interface) node;
@@ -85,11 +87,15 @@
var iface_struct = ns.scope.lookup (iface.name + "Iface") as Struct;
if (iface_struct != null) {
ns.remove_struct ((Struct) iface_struct);
- source_file.remove_node (iface_struct);
+ remove_queue.add (iface_struct);
}
}
}
+ foreach (CodeNode node in remove_queue) {
+ source_file.remove_node (node);
+ }
+
reader = null;
this.current_source_file = null;
}
@@ -589,7 +595,12 @@
next ();
var methods = new ArrayList<Method> ();
while (current_token == MarkupTokenType.START_ELEMENT) {
- if (reader.name == "field") {
+ if (reader.name == "prerequisite") {
+ start_element ("prerequisite");
+ iface.add_prerequisite (parse_type_from_name (reader.get_attribute ("name")));
+ next ();
+ end_element ("prerequisite");
+ } else if (reader.name == "field") {
parse_field ();
} else if (reader.name == "property") {
iface.add_property (parse_property ());
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]