+struct type_sequence {
+ struct type p;
+ struct type_class_sequence *_class;
+ struct declaration_scope *scope;
+ struct type_integer *len;
+ struct field current_element; /* struct field */
+};
+
+/* Type declaration scope */
+struct declaration_scope {
+ /* Hash table mapping type name GQuark to struct type_class */
+ GHashTable *type_classes;
+ struct declaration_scope *parent_scope;
+};
+
+struct type_class *lookup_type_class(GQuark qname,
+ struct declaration_scope *scope);
+int register_type_class(struct type_class *type_class,
+ struct declaration_scope *scope);
+
+void type_class_ref(struct type_class *type_class);
+void type_class_unref(struct type_class *type_class);
+
+struct declaration_scope *
+new_declaration_scope(struct declaration_scope *parent_scope);
+void free_declaration_scope(struct declaration_scope *scope);