vala r1164 - in trunk: . vala
- From: juergbi svn gnome org
- To: svn-commits-list gnome org
- Subject: vala r1164 - in trunk: . vala
- Date: Mon, 31 Mar 2008 19:54:00 +0100 (BST)
Author: juergbi
Date: Mon Mar 31 19:54:00 2008
New Revision: 1164
URL: http://svn.gnome.org/viewvc/vala?rev=1164&view=rev
Log:
2008-03-31 Juerg Billeter <j bitron ch>
* vala/valainterfacewriter.vala: fix output of enums with methods
Modified:
trunk/ChangeLog
trunk/vala/valainterfacewriter.vala
Modified: trunk/vala/valainterfacewriter.vala
==============================================================================
--- trunk/vala/valainterfacewriter.vala (original)
+++ trunk/vala/valainterfacewriter.vala Mon Mar 31 19:54:00 2008
@@ -300,7 +300,7 @@
write_indent ();
- var first = true;
+ bool first = true;
string cheaders;
foreach (string cheader in en.get_cheader_filenames ()) {
if (first) {
@@ -330,16 +330,31 @@
write_identifier (en.name);
write_begin_block ();
- en.accept_children (this);
+ first = true;
+ foreach (EnumValue ev in en.get_values ()) {
+ if (first) {
+ first = false;
+ } else {
+ write_string (",");
+ write_newline ();
+ }
- write_end_block ();
- write_newline ();
- }
+ write_indent ();
+ write_identifier (ev.name);
+ }
- public override void visit_enum_value (EnumValue! ev) {
- write_indent ();
- write_identifier (ev.name);
- write_string (",");
+ if (!first) {
+ if (en.get_methods ().size > 0) {
+ write_string (";");
+ }
+ write_newline ();
+ }
+
+ foreach (Method m in en.get_methods ()) {
+ m.accept (this);
+ }
+
+ write_end_block ();
write_newline ();
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]