accept interfaces with base types
authorJürg Billeter <j@bitron.ch>
Tue, 27 Feb 2007 18:50:16 +0000 (18:50 +0000)
committerJürg Billeter <juergbi@src.gnome.org>
Tue, 27 Feb 2007 18:50:16 +0000 (18:50 +0000)
2007-02-27  Jürg Billeter  <j@bitron.ch>

* vala/parser.y: accept interfaces with base types

svn path=/trunk/; revision=202

vala/ChangeLog
vala/vala/parser.y

index 1f94e5c..5459746 100644 (file)
@@ -1,3 +1,7 @@
+2007-02-27  Jürg Billeter  <j@bitron.ch>
+
+       * vala/parser.y: accept interfaces with base types
+
 2007-02-26  Jürg Billeter  <j@bitron.ch>
 
        * vala/valasymbolresolver.vala: fix error handling with unknown
index a27468c..3e7bed7 100644 (file)
@@ -2632,7 +2632,7 @@ struct_member_declaration
        ;
 
 interface_declaration
-       : comment opt_attributes opt_access_modifier INTERFACE IDENTIFIER opt_name_specifier opt_type_parameter_list
+       : comment opt_attributes opt_access_modifier INTERFACE IDENTIFIER opt_name_specifier opt_type_parameter_list opt_class_base
          {
                char *name = $5;
          
@@ -2666,6 +2666,14 @@ interface_declaration
                        }
                        g_list_free ($7);
                }
+               if ($8 != NULL) {
+                       GList *l;
+                       for (l = $8; l != NULL; l = l->next) {
+                               vala_interface_add_base_type (current_interface, l->data);
+                               g_object_unref (l->data);
+                       }
+                       g_list_free ($8);
+               }
          }
          interface_body
          {