[vala] girparser: Fix support for signals metadata.



commit acee522e36e37ec9d358938c91d1986be7ccee2c
Author: Luca Bruno <lucabru src gnome org>
Date:   Wed Nov 17 21:05:31 2010 +0100

    girparser: Fix support for signals metadata.

 vala/valagirparser.vala |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)
---
diff --git a/vala/valagirparser.vala b/vala/valagirparser.vala
index 306299b..6e3fd12 100644
--- a/vala/valagirparser.vala
+++ b/vala/valagirparser.vala
@@ -289,11 +289,11 @@ public class Vala.GirParser : CodeVisitor {
 				next ();
 				return MetadataType.GENERIC;
 			case TokenType.COLON:
-				if (next () == TokenType.COLON) {
-					next ();
-					return MetadataType.SIGNAL;
-				}
+				next ();
 				return MetadataType.PROPERTY;
+			case TokenType.DOUBLE_COLON:
+				next ();
+				return MetadataType.SIGNAL;
 			default:
 				return null;
 			}
@@ -982,6 +982,7 @@ public class Vala.GirParser : CodeVisitor {
 
 		var type = MetadataType.GENERIC;
 		if (name == "glib:signal") {
+			child_name = child_name.replace ("-", "_");
 			type = MetadataType.SIGNAL;
 		} else if (name == "property") {
 			type = MetadataType.PROPERTY;



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