Logo Search packages:      
Sourcecode: vala-0.12 version File versions  Download package

valagirparser.c

/* valagirparser.c generated by valac, the Vala compiler
 * generated from valagirparser.vala, do not modify */

/* valagirparser.vala
 *
 * Copyright (C) 2008-2010  Jürg Billeter
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.

 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.

 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
 *
 * Author:
 *    Jürg Billeter <j@bitron.ch>
 */

#include <glib.h>
#include <glib-object.h>
#include <stdlib.h>
#include <string.h>
#include <valagee.h>
#include <glib/gstdio.h>
#include <float.h>
#include <math.h>
#include <gobject/gvaluecollector.h>


#define VALA_TYPE_CODE_VISITOR (vala_code_visitor_get_type ())
#define VALA_CODE_VISITOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALA_TYPE_CODE_VISITOR, ValaCodeVisitor))
#define VALA_CODE_VISITOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VALA_TYPE_CODE_VISITOR, ValaCodeVisitorClass))
#define VALA_IS_CODE_VISITOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VALA_TYPE_CODE_VISITOR))
#define VALA_IS_CODE_VISITOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VALA_TYPE_CODE_VISITOR))
#define VALA_CODE_VISITOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VALA_TYPE_CODE_VISITOR, ValaCodeVisitorClass))

typedef struct _ValaCodeVisitor ValaCodeVisitor;
typedef struct _ValaCodeVisitorClass ValaCodeVisitorClass;
typedef struct _ValaCodeVisitorPrivate ValaCodeVisitorPrivate;

#define VALA_TYPE_SOURCE_FILE (vala_source_file_get_type ())
#define VALA_SOURCE_FILE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALA_TYPE_SOURCE_FILE, ValaSourceFile))
#define VALA_SOURCE_FILE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VALA_TYPE_SOURCE_FILE, ValaSourceFileClass))
#define VALA_IS_SOURCE_FILE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VALA_TYPE_SOURCE_FILE))
#define VALA_IS_SOURCE_FILE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VALA_TYPE_SOURCE_FILE))
#define VALA_SOURCE_FILE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VALA_TYPE_SOURCE_FILE, ValaSourceFileClass))

typedef struct _ValaSourceFile ValaSourceFile;
typedef struct _ValaSourceFileClass ValaSourceFileClass;

#define VALA_TYPE_CODE_NODE (vala_code_node_get_type ())
#define VALA_CODE_NODE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALA_TYPE_CODE_NODE, ValaCodeNode))
#define VALA_CODE_NODE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VALA_TYPE_CODE_NODE, ValaCodeNodeClass))
#define VALA_IS_CODE_NODE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VALA_TYPE_CODE_NODE))
#define VALA_IS_CODE_NODE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VALA_TYPE_CODE_NODE))
#define VALA_CODE_NODE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VALA_TYPE_CODE_NODE, ValaCodeNodeClass))

typedef struct _ValaCodeNode ValaCodeNode;
typedef struct _ValaCodeNodeClass ValaCodeNodeClass;

#define VALA_TYPE_SYMBOL (vala_symbol_get_type ())
#define VALA_SYMBOL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALA_TYPE_SYMBOL, ValaSymbol))
#define VALA_SYMBOL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VALA_TYPE_SYMBOL, ValaSymbolClass))
#define VALA_IS_SYMBOL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VALA_TYPE_SYMBOL))
#define VALA_IS_SYMBOL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VALA_TYPE_SYMBOL))
#define VALA_SYMBOL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VALA_TYPE_SYMBOL, ValaSymbolClass))

typedef struct _ValaSymbol ValaSymbol;
typedef struct _ValaSymbolClass ValaSymbolClass;

#define VALA_TYPE_NAMESPACE (vala_namespace_get_type ())
#define VALA_NAMESPACE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALA_TYPE_NAMESPACE, ValaNamespace))
#define VALA_NAMESPACE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VALA_TYPE_NAMESPACE, ValaNamespaceClass))
#define VALA_IS_NAMESPACE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VALA_TYPE_NAMESPACE))
#define VALA_IS_NAMESPACE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VALA_TYPE_NAMESPACE))
#define VALA_NAMESPACE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VALA_TYPE_NAMESPACE, ValaNamespaceClass))

typedef struct _ValaNamespace ValaNamespace;
typedef struct _ValaNamespaceClass ValaNamespaceClass;

#define VALA_TYPE_TYPESYMBOL (vala_typesymbol_get_type ())
#define VALA_TYPESYMBOL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALA_TYPE_TYPESYMBOL, ValaTypeSymbol))
#define VALA_TYPESYMBOL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VALA_TYPE_TYPESYMBOL, ValaTypeSymbolClass))
#define VALA_IS_TYPESYMBOL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VALA_TYPE_TYPESYMBOL))
#define VALA_IS_TYPESYMBOL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VALA_TYPE_TYPESYMBOL))
#define VALA_TYPESYMBOL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VALA_TYPE_TYPESYMBOL, ValaTypeSymbolClass))

typedef struct _ValaTypeSymbol ValaTypeSymbol;
typedef struct _ValaTypeSymbolClass ValaTypeSymbolClass;

#define VALA_TYPE_OBJECT_TYPE_SYMBOL (vala_object_type_symbol_get_type ())
#define VALA_OBJECT_TYPE_SYMBOL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALA_TYPE_OBJECT_TYPE_SYMBOL, ValaObjectTypeSymbol))
#define VALA_OBJECT_TYPE_SYMBOL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VALA_TYPE_OBJECT_TYPE_SYMBOL, ValaObjectTypeSymbolClass))
#define VALA_IS_OBJECT_TYPE_SYMBOL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VALA_TYPE_OBJECT_TYPE_SYMBOL))
#define VALA_IS_OBJECT_TYPE_SYMBOL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VALA_TYPE_OBJECT_TYPE_SYMBOL))
#define VALA_OBJECT_TYPE_SYMBOL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VALA_TYPE_OBJECT_TYPE_SYMBOL, ValaObjectTypeSymbolClass))

typedef struct _ValaObjectTypeSymbol ValaObjectTypeSymbol;
typedef struct _ValaObjectTypeSymbolClass ValaObjectTypeSymbolClass;

#define VALA_TYPE_CLASS (vala_class_get_type ())
#define VALA_CLASS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALA_TYPE_CLASS, ValaClass))
#define VALA_CLASS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VALA_TYPE_CLASS, ValaClassClass))
#define VALA_IS_CLASS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VALA_TYPE_CLASS))
#define VALA_IS_CLASS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VALA_TYPE_CLASS))
#define VALA_CLASS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VALA_TYPE_CLASS, ValaClassClass))

typedef struct _ValaClass ValaClass;
typedef struct _ValaClassClass ValaClassClass;

#define VALA_TYPE_STRUCT (vala_struct_get_type ())
#define VALA_STRUCT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALA_TYPE_STRUCT, ValaStruct))
#define VALA_STRUCT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VALA_TYPE_STRUCT, ValaStructClass))
#define VALA_IS_STRUCT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VALA_TYPE_STRUCT))
#define VALA_IS_STRUCT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VALA_TYPE_STRUCT))
#define VALA_STRUCT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VALA_TYPE_STRUCT, ValaStructClass))

typedef struct _ValaStruct ValaStruct;
typedef struct _ValaStructClass ValaStructClass;

#define VALA_TYPE_INTERFACE (vala_interface_get_type ())
#define VALA_INTERFACE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALA_TYPE_INTERFACE, ValaInterface))
#define VALA_INTERFACE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VALA_TYPE_INTERFACE, ValaInterfaceClass))
#define VALA_IS_INTERFACE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VALA_TYPE_INTERFACE))
#define VALA_IS_INTERFACE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VALA_TYPE_INTERFACE))
#define VALA_INTERFACE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VALA_TYPE_INTERFACE, ValaInterfaceClass))

typedef struct _ValaInterface ValaInterface;
typedef struct _ValaInterfaceClass ValaInterfaceClass;

#define VALA_TYPE_ENUM (vala_enum_get_type ())
#define VALA_ENUM(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALA_TYPE_ENUM, ValaEnum))
#define VALA_ENUM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VALA_TYPE_ENUM, ValaEnumClass))
#define VALA_IS_ENUM(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VALA_TYPE_ENUM))
#define VALA_IS_ENUM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VALA_TYPE_ENUM))
#define VALA_ENUM_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VALA_TYPE_ENUM, ValaEnumClass))

typedef struct _ValaEnum ValaEnum;
typedef struct _ValaEnumClass ValaEnumClass;

#define VALA_TYPE_CONSTANT (vala_constant_get_type ())
#define VALA_CONSTANT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALA_TYPE_CONSTANT, ValaConstant))
#define VALA_CONSTANT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VALA_TYPE_CONSTANT, ValaConstantClass))
#define VALA_IS_CONSTANT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VALA_TYPE_CONSTANT))
#define VALA_IS_CONSTANT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VALA_TYPE_CONSTANT))
#define VALA_CONSTANT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VALA_TYPE_CONSTANT, ValaConstantClass))

typedef struct _ValaConstant ValaConstant;
typedef struct _ValaConstantClass ValaConstantClass;

#define VALA_TYPE_ENUM_VALUE (vala_enum_value_get_type ())
#define VALA_ENUM_VALUE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALA_TYPE_ENUM_VALUE, ValaEnumValue))
#define VALA_ENUM_VALUE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VALA_TYPE_ENUM_VALUE, ValaEnumValueClass))
#define VALA_IS_ENUM_VALUE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VALA_TYPE_ENUM_VALUE))
#define VALA_IS_ENUM_VALUE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VALA_TYPE_ENUM_VALUE))
#define VALA_ENUM_VALUE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VALA_TYPE_ENUM_VALUE, ValaEnumValueClass))

typedef struct _ValaEnumValue ValaEnumValue;
typedef struct _ValaEnumValueClass ValaEnumValueClass;

#define VALA_TYPE_ERROR_DOMAIN (vala_error_domain_get_type ())
#define VALA_ERROR_DOMAIN(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALA_TYPE_ERROR_DOMAIN, ValaErrorDomain))
#define VALA_ERROR_DOMAIN_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VALA_TYPE_ERROR_DOMAIN, ValaErrorDomainClass))
#define VALA_IS_ERROR_DOMAIN(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VALA_TYPE_ERROR_DOMAIN))
#define VALA_IS_ERROR_DOMAIN_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VALA_TYPE_ERROR_DOMAIN))
#define VALA_ERROR_DOMAIN_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VALA_TYPE_ERROR_DOMAIN, ValaErrorDomainClass))

typedef struct _ValaErrorDomain ValaErrorDomain;
typedef struct _ValaErrorDomainClass ValaErrorDomainClass;

#define VALA_TYPE_ERROR_CODE (vala_error_code_get_type ())
#define VALA_ERROR_CODE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALA_TYPE_ERROR_CODE, ValaErrorCode))
#define VALA_ERROR_CODE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VALA_TYPE_ERROR_CODE, ValaErrorCodeClass))
#define VALA_IS_ERROR_CODE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VALA_TYPE_ERROR_CODE))
#define VALA_IS_ERROR_CODE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VALA_TYPE_ERROR_CODE))
#define VALA_ERROR_CODE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VALA_TYPE_ERROR_CODE, ValaErrorCodeClass))

typedef struct _ValaErrorCode ValaErrorCode;
typedef struct _ValaErrorCodeClass ValaErrorCodeClass;

#define VALA_TYPE_DELEGATE (vala_delegate_get_type ())
#define VALA_DELEGATE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALA_TYPE_DELEGATE, ValaDelegate))
#define VALA_DELEGATE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VALA_TYPE_DELEGATE, ValaDelegateClass))
#define VALA_IS_DELEGATE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VALA_TYPE_DELEGATE))
#define VALA_IS_DELEGATE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VALA_TYPE_DELEGATE))
#define VALA_DELEGATE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VALA_TYPE_DELEGATE, ValaDelegateClass))

typedef struct _ValaDelegate ValaDelegate;
typedef struct _ValaDelegateClass ValaDelegateClass;

#define VALA_TYPE_VARIABLE (vala_variable_get_type ())
#define VALA_VARIABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALA_TYPE_VARIABLE, ValaVariable))
#define VALA_VARIABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VALA_TYPE_VARIABLE, ValaVariableClass))
#define VALA_IS_VARIABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VALA_TYPE_VARIABLE))
#define VALA_IS_VARIABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VALA_TYPE_VARIABLE))
#define VALA_VARIABLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VALA_TYPE_VARIABLE, ValaVariableClass))

typedef struct _ValaVariable ValaVariable;
typedef struct _ValaVariableClass ValaVariableClass;

#define VALA_TYPE_FIELD (vala_field_get_type ())
#define VALA_FIELD(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALA_TYPE_FIELD, ValaField))
#define VALA_FIELD_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VALA_TYPE_FIELD, ValaFieldClass))
#define VALA_IS_FIELD(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VALA_TYPE_FIELD))
#define VALA_IS_FIELD_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VALA_TYPE_FIELD))
#define VALA_FIELD_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VALA_TYPE_FIELD, ValaFieldClass))

typedef struct _ValaField ValaField;
typedef struct _ValaFieldClass ValaFieldClass;

#define VALA_TYPE_SUBROUTINE (vala_subroutine_get_type ())
#define VALA_SUBROUTINE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALA_TYPE_SUBROUTINE, ValaSubroutine))
#define VALA_SUBROUTINE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VALA_TYPE_SUBROUTINE, ValaSubroutineClass))
#define VALA_IS_SUBROUTINE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VALA_TYPE_SUBROUTINE))
#define VALA_IS_SUBROUTINE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VALA_TYPE_SUBROUTINE))
#define VALA_SUBROUTINE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VALA_TYPE_SUBROUTINE, ValaSubroutineClass))

typedef struct _ValaSubroutine ValaSubroutine;
typedef struct _ValaSubroutineClass ValaSubroutineClass;

#define VALA_TYPE_METHOD (vala_method_get_type ())
#define VALA_METHOD(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALA_TYPE_METHOD, ValaMethod))
#define VALA_METHOD_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VALA_TYPE_METHOD, ValaMethodClass))
#define VALA_IS_METHOD(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VALA_TYPE_METHOD))
#define VALA_IS_METHOD_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VALA_TYPE_METHOD))
#define VALA_METHOD_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VALA_TYPE_METHOD, ValaMethodClass))

typedef struct _ValaMethod ValaMethod;
typedef struct _ValaMethodClass ValaMethodClass;

#define VALA_TYPE_CREATION_METHOD (vala_creation_method_get_type ())
#define VALA_CREATION_METHOD(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALA_TYPE_CREATION_METHOD, ValaCreationMethod))
#define VALA_CREATION_METHOD_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VALA_TYPE_CREATION_METHOD, ValaCreationMethodClass))
#define VALA_IS_CREATION_METHOD(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VALA_TYPE_CREATION_METHOD))
#define VALA_IS_CREATION_METHOD_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VALA_TYPE_CREATION_METHOD))
#define VALA_CREATION_METHOD_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VALA_TYPE_CREATION_METHOD, ValaCreationMethodClass))

typedef struct _ValaCreationMethod ValaCreationMethod;
typedef struct _ValaCreationMethodClass ValaCreationMethodClass;

#define VALA_TYPE_PARAMETER (vala_parameter_get_type ())
#define VALA_PARAMETER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALA_TYPE_PARAMETER, ValaParameter))
#define VALA_PARAMETER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VALA_TYPE_PARAMETER, ValaParameterClass))
#define VALA_IS_PARAMETER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VALA_TYPE_PARAMETER))
#define VALA_IS_PARAMETER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VALA_TYPE_PARAMETER))
#define VALA_PARAMETER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VALA_TYPE_PARAMETER, ValaParameterClass))

typedef struct _ValaParameter ValaParameter;
typedef struct _ValaParameterClass ValaParameterClass;

#define VALA_TYPE_PROPERTY (vala_property_get_type ())
#define VALA_PROPERTY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALA_TYPE_PROPERTY, ValaProperty))
#define VALA_PROPERTY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VALA_TYPE_PROPERTY, ValaPropertyClass))
#define VALA_IS_PROPERTY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VALA_TYPE_PROPERTY))
#define VALA_IS_PROPERTY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VALA_TYPE_PROPERTY))
#define VALA_PROPERTY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VALA_TYPE_PROPERTY, ValaPropertyClass))

typedef struct _ValaProperty ValaProperty;
typedef struct _ValaPropertyClass ValaPropertyClass;

#define VALA_TYPE_PROPERTY_ACCESSOR (vala_property_accessor_get_type ())
#define VALA_PROPERTY_ACCESSOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALA_TYPE_PROPERTY_ACCESSOR, ValaPropertyAccessor))
#define VALA_PROPERTY_ACCESSOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VALA_TYPE_PROPERTY_ACCESSOR, ValaPropertyAccessorClass))
#define VALA_IS_PROPERTY_ACCESSOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VALA_TYPE_PROPERTY_ACCESSOR))
#define VALA_IS_PROPERTY_ACCESSOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VALA_TYPE_PROPERTY_ACCESSOR))
#define VALA_PROPERTY_ACCESSOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VALA_TYPE_PROPERTY_ACCESSOR, ValaPropertyAccessorClass))

typedef struct _ValaPropertyAccessor ValaPropertyAccessor;
typedef struct _ValaPropertyAccessorClass ValaPropertyAccessorClass;

#define VALA_TYPE_SIGNAL (vala_signal_get_type ())
#define VALA_SIGNAL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALA_TYPE_SIGNAL, ValaSignal))
#define VALA_SIGNAL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VALA_TYPE_SIGNAL, ValaSignalClass))
#define VALA_IS_SIGNAL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VALA_TYPE_SIGNAL))
#define VALA_IS_SIGNAL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VALA_TYPE_SIGNAL))
#define VALA_SIGNAL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VALA_TYPE_SIGNAL, ValaSignalClass))

typedef struct _ValaSignal ValaSignal;
typedef struct _ValaSignalClass ValaSignalClass;

#define VALA_TYPE_CONSTRUCTOR (vala_constructor_get_type ())
#define VALA_CONSTRUCTOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALA_TYPE_CONSTRUCTOR, ValaConstructor))
#define VALA_CONSTRUCTOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VALA_TYPE_CONSTRUCTOR, ValaConstructorClass))
#define VALA_IS_CONSTRUCTOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VALA_TYPE_CONSTRUCTOR))
#define VALA_IS_CONSTRUCTOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VALA_TYPE_CONSTRUCTOR))
#define VALA_CONSTRUCTOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VALA_TYPE_CONSTRUCTOR, ValaConstructorClass))

typedef struct _ValaConstructor ValaConstructor;
typedef struct _ValaConstructorClass ValaConstructorClass;

#define VALA_TYPE_DESTRUCTOR (vala_destructor_get_type ())
#define VALA_DESTRUCTOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALA_TYPE_DESTRUCTOR, ValaDestructor))
#define VALA_DESTRUCTOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VALA_TYPE_DESTRUCTOR, ValaDestructorClass))
#define VALA_IS_DESTRUCTOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VALA_TYPE_DESTRUCTOR))
#define VALA_IS_DESTRUCTOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VALA_TYPE_DESTRUCTOR))
#define VALA_DESTRUCTOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VALA_TYPE_DESTRUCTOR, ValaDestructorClass))

typedef struct _ValaDestructor ValaDestructor;
typedef struct _ValaDestructorClass ValaDestructorClass;

#define VALA_TYPE_TYPEPARAMETER (vala_typeparameter_get_type ())
#define VALA_TYPEPARAMETER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALA_TYPE_TYPEPARAMETER, ValaTypeParameter))
#define VALA_TYPEPARAMETER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VALA_TYPE_TYPEPARAMETER, ValaTypeParameterClass))
#define VALA_IS_TYPEPARAMETER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VALA_TYPE_TYPEPARAMETER))
#define VALA_IS_TYPEPARAMETER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VALA_TYPE_TYPEPARAMETER))
#define VALA_TYPEPARAMETER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VALA_TYPE_TYPEPARAMETER, ValaTypeParameterClass))

typedef struct _ValaTypeParameter ValaTypeParameter;
typedef struct _ValaTypeParameterClass ValaTypeParameterClass;

#define VALA_TYPE_USING_DIRECTIVE (vala_using_directive_get_type ())
#define VALA_USING_DIRECTIVE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALA_TYPE_USING_DIRECTIVE, ValaUsingDirective))
#define VALA_USING_DIRECTIVE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VALA_TYPE_USING_DIRECTIVE, ValaUsingDirectiveClass))
#define VALA_IS_USING_DIRECTIVE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VALA_TYPE_USING_DIRECTIVE))
#define VALA_IS_USING_DIRECTIVE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VALA_TYPE_USING_DIRECTIVE))
#define VALA_USING_DIRECTIVE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VALA_TYPE_USING_DIRECTIVE, ValaUsingDirectiveClass))

typedef struct _ValaUsingDirective ValaUsingDirective;
typedef struct _ValaUsingDirectiveClass ValaUsingDirectiveClass;

#define VALA_TYPE_DATA_TYPE (vala_data_type_get_type ())
#define VALA_DATA_TYPE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALA_TYPE_DATA_TYPE, ValaDataType))
#define VALA_DATA_TYPE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VALA_TYPE_DATA_TYPE, ValaDataTypeClass))
#define VALA_IS_DATA_TYPE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VALA_TYPE_DATA_TYPE))
#define VALA_IS_DATA_TYPE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VALA_TYPE_DATA_TYPE))
#define VALA_DATA_TYPE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VALA_TYPE_DATA_TYPE, ValaDataTypeClass))

typedef struct _ValaDataType ValaDataType;
typedef struct _ValaDataTypeClass ValaDataTypeClass;

#define VALA_TYPE_BLOCK (vala_block_get_type ())
#define VALA_BLOCK(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALA_TYPE_BLOCK, ValaBlock))
#define VALA_BLOCK_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VALA_TYPE_BLOCK, ValaBlockClass))
#define VALA_IS_BLOCK(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VALA_TYPE_BLOCK))
#define VALA_IS_BLOCK_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VALA_TYPE_BLOCK))
#define VALA_BLOCK_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VALA_TYPE_BLOCK, ValaBlockClass))

typedef struct _ValaBlock ValaBlock;
typedef struct _ValaBlockClass ValaBlockClass;

#define VALA_TYPE_EMPTY_STATEMENT (vala_empty_statement_get_type ())
#define VALA_EMPTY_STATEMENT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALA_TYPE_EMPTY_STATEMENT, ValaEmptyStatement))
#define VALA_EMPTY_STATEMENT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VALA_TYPE_EMPTY_STATEMENT, ValaEmptyStatementClass))
#define VALA_IS_EMPTY_STATEMENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VALA_TYPE_EMPTY_STATEMENT))
#define VALA_IS_EMPTY_STATEMENT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VALA_TYPE_EMPTY_STATEMENT))
#define VALA_EMPTY_STATEMENT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VALA_TYPE_EMPTY_STATEMENT, ValaEmptyStatementClass))

typedef struct _ValaEmptyStatement ValaEmptyStatement;
typedef struct _ValaEmptyStatementClass ValaEmptyStatementClass;

#define VALA_TYPE_DECLARATION_STATEMENT (vala_declaration_statement_get_type ())
#define VALA_DECLARATION_STATEMENT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALA_TYPE_DECLARATION_STATEMENT, ValaDeclarationStatement))
#define VALA_DECLARATION_STATEMENT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VALA_TYPE_DECLARATION_STATEMENT, ValaDeclarationStatementClass))
#define VALA_IS_DECLARATION_STATEMENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VALA_TYPE_DECLARATION_STATEMENT))
#define VALA_IS_DECLARATION_STATEMENT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VALA_TYPE_DECLARATION_STATEMENT))
#define VALA_DECLARATION_STATEMENT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VALA_TYPE_DECLARATION_STATEMENT, ValaDeclarationStatementClass))

typedef struct _ValaDeclarationStatement ValaDeclarationStatement;
typedef struct _ValaDeclarationStatementClass ValaDeclarationStatementClass;

#define VALA_TYPE_LOCAL_VARIABLE (vala_local_variable_get_type ())
#define VALA_LOCAL_VARIABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALA_TYPE_LOCAL_VARIABLE, ValaLocalVariable))
#define VALA_LOCAL_VARIABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VALA_TYPE_LOCAL_VARIABLE, ValaLocalVariableClass))
#define VALA_IS_LOCAL_VARIABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VALA_TYPE_LOCAL_VARIABLE))
#define VALA_IS_LOCAL_VARIABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VALA_TYPE_LOCAL_VARIABLE))
#define VALA_LOCAL_VARIABLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VALA_TYPE_LOCAL_VARIABLE, ValaLocalVariableClass))

typedef struct _ValaLocalVariable ValaLocalVariable;
typedef struct _ValaLocalVariableClass ValaLocalVariableClass;

#define VALA_TYPE_EXPRESSION (vala_expression_get_type ())
#define VALA_EXPRESSION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALA_TYPE_EXPRESSION, ValaExpression))
#define VALA_EXPRESSION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VALA_TYPE_EXPRESSION, ValaExpressionClass))
#define VALA_IS_EXPRESSION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VALA_TYPE_EXPRESSION))
#define VALA_IS_EXPRESSION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VALA_TYPE_EXPRESSION))
#define VALA_EXPRESSION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VALA_TYPE_EXPRESSION, ValaExpressionClass))

typedef struct _ValaExpression ValaExpression;
typedef struct _ValaExpressionClass ValaExpressionClass;

#define VALA_TYPE_INITIALIZER_LIST (vala_initializer_list_get_type ())
#define VALA_INITIALIZER_LIST(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALA_TYPE_INITIALIZER_LIST, ValaInitializerList))
#define VALA_INITIALIZER_LIST_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VALA_TYPE_INITIALIZER_LIST, ValaInitializerListClass))
#define VALA_IS_INITIALIZER_LIST(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VALA_TYPE_INITIALIZER_LIST))
#define VALA_IS_INITIALIZER_LIST_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VALA_TYPE_INITIALIZER_LIST))
#define VALA_INITIALIZER_LIST_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VALA_TYPE_INITIALIZER_LIST, ValaInitializerListClass))

typedef struct _ValaInitializerList ValaInitializerList;
typedef struct _ValaInitializerListClass ValaInitializerListClass;

#define VALA_TYPE_EXPRESSION_STATEMENT (vala_expression_statement_get_type ())
#define VALA_EXPRESSION_STATEMENT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALA_TYPE_EXPRESSION_STATEMENT, ValaExpressionStatement))
#define VALA_EXPRESSION_STATEMENT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VALA_TYPE_EXPRESSION_STATEMENT, ValaExpressionStatementClass))
#define VALA_IS_EXPRESSION_STATEMENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VALA_TYPE_EXPRESSION_STATEMENT))
#define VALA_IS_EXPRESSION_STATEMENT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VALA_TYPE_EXPRESSION_STATEMENT))
#define VALA_EXPRESSION_STATEMENT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VALA_TYPE_EXPRESSION_STATEMENT, ValaExpressionStatementClass))

typedef struct _ValaExpressionStatement ValaExpressionStatement;
typedef struct _ValaExpressionStatementClass ValaExpressionStatementClass;

#define VALA_TYPE_IF_STATEMENT (vala_if_statement_get_type ())
#define VALA_IF_STATEMENT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALA_TYPE_IF_STATEMENT, ValaIfStatement))
#define VALA_IF_STATEMENT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VALA_TYPE_IF_STATEMENT, ValaIfStatementClass))
#define VALA_IS_IF_STATEMENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VALA_TYPE_IF_STATEMENT))
#define VALA_IS_IF_STATEMENT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VALA_TYPE_IF_STATEMENT))
#define VALA_IF_STATEMENT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VALA_TYPE_IF_STATEMENT, ValaIfStatementClass))

typedef struct _ValaIfStatement ValaIfStatement;
typedef struct _ValaIfStatementClass ValaIfStatementClass;

#define VALA_TYPE_SWITCH_STATEMENT (vala_switch_statement_get_type ())
#define VALA_SWITCH_STATEMENT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALA_TYPE_SWITCH_STATEMENT, ValaSwitchStatement))
#define VALA_SWITCH_STATEMENT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VALA_TYPE_SWITCH_STATEMENT, ValaSwitchStatementClass))
#define VALA_IS_SWITCH_STATEMENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VALA_TYPE_SWITCH_STATEMENT))
#define VALA_IS_SWITCH_STATEMENT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VALA_TYPE_SWITCH_STATEMENT))
#define VALA_SWITCH_STATEMENT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VALA_TYPE_SWITCH_STATEMENT, ValaSwitchStatementClass))

typedef struct _ValaSwitchStatement ValaSwitchStatement;
typedef struct _ValaSwitchStatementClass ValaSwitchStatementClass;

#define VALA_TYPE_SWITCH_SECTION (vala_switch_section_get_type ())
#define VALA_SWITCH_SECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALA_TYPE_SWITCH_SECTION, ValaSwitchSection))
#define VALA_SWITCH_SECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VALA_TYPE_SWITCH_SECTION, ValaSwitchSectionClass))
#define VALA_IS_SWITCH_SECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VALA_TYPE_SWITCH_SECTION))
#define VALA_IS_SWITCH_SECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VALA_TYPE_SWITCH_SECTION))
#define VALA_SWITCH_SECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VALA_TYPE_SWITCH_SECTION, ValaSwitchSectionClass))

typedef struct _ValaSwitchSection ValaSwitchSection;
typedef struct _ValaSwitchSectionClass ValaSwitchSectionClass;

#define VALA_TYPE_SWITCH_LABEL (vala_switch_label_get_type ())
#define VALA_SWITCH_LABEL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALA_TYPE_SWITCH_LABEL, ValaSwitchLabel))
#define VALA_SWITCH_LABEL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VALA_TYPE_SWITCH_LABEL, ValaSwitchLabelClass))
#define VALA_IS_SWITCH_LABEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VALA_TYPE_SWITCH_LABEL))
#define VALA_IS_SWITCH_LABEL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VALA_TYPE_SWITCH_LABEL))
#define VALA_SWITCH_LABEL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VALA_TYPE_SWITCH_LABEL, ValaSwitchLabelClass))

typedef struct _ValaSwitchLabel ValaSwitchLabel;
typedef struct _ValaSwitchLabelClass ValaSwitchLabelClass;

#define VALA_TYPE_LOOP (vala_loop_get_type ())
#define VALA_LOOP(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALA_TYPE_LOOP, ValaLoop))
#define VALA_LOOP_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VALA_TYPE_LOOP, ValaLoopClass))
#define VALA_IS_LOOP(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VALA_TYPE_LOOP))
#define VALA_IS_LOOP_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VALA_TYPE_LOOP))
#define VALA_LOOP_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VALA_TYPE_LOOP, ValaLoopClass))

typedef struct _ValaLoop ValaLoop;
typedef struct _ValaLoopClass ValaLoopClass;

#define VALA_TYPE_WHILE_STATEMENT (vala_while_statement_get_type ())
#define VALA_WHILE_STATEMENT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALA_TYPE_WHILE_STATEMENT, ValaWhileStatement))
#define VALA_WHILE_STATEMENT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VALA_TYPE_WHILE_STATEMENT, ValaWhileStatementClass))
#define VALA_IS_WHILE_STATEMENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VALA_TYPE_WHILE_STATEMENT))
#define VALA_IS_WHILE_STATEMENT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VALA_TYPE_WHILE_STATEMENT))
#define VALA_WHILE_STATEMENT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VALA_TYPE_WHILE_STATEMENT, ValaWhileStatementClass))

typedef struct _ValaWhileStatement ValaWhileStatement;
typedef struct _ValaWhileStatementClass ValaWhileStatementClass;

#define VALA_TYPE_DO_STATEMENT (vala_do_statement_get_type ())
#define VALA_DO_STATEMENT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALA_TYPE_DO_STATEMENT, ValaDoStatement))
#define VALA_DO_STATEMENT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VALA_TYPE_DO_STATEMENT, ValaDoStatementClass))
#define VALA_IS_DO_STATEMENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VALA_TYPE_DO_STATEMENT))
#define VALA_IS_DO_STATEMENT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VALA_TYPE_DO_STATEMENT))
#define VALA_DO_STATEMENT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VALA_TYPE_DO_STATEMENT, ValaDoStatementClass))

typedef struct _ValaDoStatement ValaDoStatement;
typedef struct _ValaDoStatementClass ValaDoStatementClass;

#define VALA_TYPE_FOR_STATEMENT (vala_for_statement_get_type ())
#define VALA_FOR_STATEMENT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALA_TYPE_FOR_STATEMENT, ValaForStatement))
#define VALA_FOR_STATEMENT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VALA_TYPE_FOR_STATEMENT, ValaForStatementClass))
#define VALA_IS_FOR_STATEMENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VALA_TYPE_FOR_STATEMENT))
#define VALA_IS_FOR_STATEMENT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VALA_TYPE_FOR_STATEMENT))
#define VALA_FOR_STATEMENT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VALA_TYPE_FOR_STATEMENT, ValaForStatementClass))

typedef struct _ValaForStatement ValaForStatement;
typedef struct _ValaForStatementClass ValaForStatementClass;

#define VALA_TYPE_FOREACH_STATEMENT (vala_foreach_statement_get_type ())
#define VALA_FOREACH_STATEMENT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALA_TYPE_FOREACH_STATEMENT, ValaForeachStatement))
#define VALA_FOREACH_STATEMENT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VALA_TYPE_FOREACH_STATEMENT, ValaForeachStatementClass))
#define VALA_IS_FOREACH_STATEMENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VALA_TYPE_FOREACH_STATEMENT))
#define VALA_IS_FOREACH_STATEMENT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VALA_TYPE_FOREACH_STATEMENT))
#define VALA_FOREACH_STATEMENT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VALA_TYPE_FOREACH_STATEMENT, ValaForeachStatementClass))

typedef struct _ValaForeachStatement ValaForeachStatement;
typedef struct _ValaForeachStatementClass ValaForeachStatementClass;

#define VALA_TYPE_BREAK_STATEMENT (vala_break_statement_get_type ())
#define VALA_BREAK_STATEMENT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALA_TYPE_BREAK_STATEMENT, ValaBreakStatement))
#define VALA_BREAK_STATEMENT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VALA_TYPE_BREAK_STATEMENT, ValaBreakStatementClass))
#define VALA_IS_BREAK_STATEMENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VALA_TYPE_BREAK_STATEMENT))
#define VALA_IS_BREAK_STATEMENT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VALA_TYPE_BREAK_STATEMENT))
#define VALA_BREAK_STATEMENT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VALA_TYPE_BREAK_STATEMENT, ValaBreakStatementClass))

typedef struct _ValaBreakStatement ValaBreakStatement;
typedef struct _ValaBreakStatementClass ValaBreakStatementClass;

#define VALA_TYPE_CONTINUE_STATEMENT (vala_continue_statement_get_type ())
#define VALA_CONTINUE_STATEMENT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALA_TYPE_CONTINUE_STATEMENT, ValaContinueStatement))
#define VALA_CONTINUE_STATEMENT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VALA_TYPE_CONTINUE_STATEMENT, ValaContinueStatementClass))
#define VALA_IS_CONTINUE_STATEMENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VALA_TYPE_CONTINUE_STATEMENT))
#define VALA_IS_CONTINUE_STATEMENT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VALA_TYPE_CONTINUE_STATEMENT))
#define VALA_CONTINUE_STATEMENT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VALA_TYPE_CONTINUE_STATEMENT, ValaContinueStatementClass))

typedef struct _ValaContinueStatement ValaContinueStatement;
typedef struct _ValaContinueStatementClass ValaContinueStatementClass;

#define VALA_TYPE_RETURN_STATEMENT (vala_return_statement_get_type ())
#define VALA_RETURN_STATEMENT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALA_TYPE_RETURN_STATEMENT, ValaReturnStatement))
#define VALA_RETURN_STATEMENT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VALA_TYPE_RETURN_STATEMENT, ValaReturnStatementClass))
#define VALA_IS_RETURN_STATEMENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VALA_TYPE_RETURN_STATEMENT))
#define VALA_IS_RETURN_STATEMENT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VALA_TYPE_RETURN_STATEMENT))
#define VALA_RETURN_STATEMENT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VALA_TYPE_RETURN_STATEMENT, ValaReturnStatementClass))

typedef struct _ValaReturnStatement ValaReturnStatement;
typedef struct _ValaReturnStatementClass ValaReturnStatementClass;

#define VALA_TYPE_YIELD_STATEMENT (vala_yield_statement_get_type ())
#define VALA_YIELD_STATEMENT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALA_TYPE_YIELD_STATEMENT, ValaYieldStatement))
#define VALA_YIELD_STATEMENT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VALA_TYPE_YIELD_STATEMENT, ValaYieldStatementClass))
#define VALA_IS_YIELD_STATEMENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VALA_TYPE_YIELD_STATEMENT))
#define VALA_IS_YIELD_STATEMENT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VALA_TYPE_YIELD_STATEMENT))
#define VALA_YIELD_STATEMENT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VALA_TYPE_YIELD_STATEMENT, ValaYieldStatementClass))

typedef struct _ValaYieldStatement ValaYieldStatement;
typedef struct _ValaYieldStatementClass ValaYieldStatementClass;

#define VALA_TYPE_THROW_STATEMENT (vala_throw_statement_get_type ())
#define VALA_THROW_STATEMENT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALA_TYPE_THROW_STATEMENT, ValaThrowStatement))
#define VALA_THROW_STATEMENT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VALA_TYPE_THROW_STATEMENT, ValaThrowStatementClass))
#define VALA_IS_THROW_STATEMENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VALA_TYPE_THROW_STATEMENT))
#define VALA_IS_THROW_STATEMENT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VALA_TYPE_THROW_STATEMENT))
#define VALA_THROW_STATEMENT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VALA_TYPE_THROW_STATEMENT, ValaThrowStatementClass))

typedef struct _ValaThrowStatement ValaThrowStatement;
typedef struct _ValaThrowStatementClass ValaThrowStatementClass;

#define VALA_TYPE_TRY_STATEMENT (vala_try_statement_get_type ())
#define VALA_TRY_STATEMENT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALA_TYPE_TRY_STATEMENT, ValaTryStatement))
#define VALA_TRY_STATEMENT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VALA_TYPE_TRY_STATEMENT, ValaTryStatementClass))
#define VALA_IS_TRY_STATEMENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VALA_TYPE_TRY_STATEMENT))
#define VALA_IS_TRY_STATEMENT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VALA_TYPE_TRY_STATEMENT))
#define VALA_TRY_STATEMENT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VALA_TYPE_TRY_STATEMENT, ValaTryStatementClass))

typedef struct _ValaTryStatement ValaTryStatement;
typedef struct _ValaTryStatementClass ValaTryStatementClass;

#define VALA_TYPE_CATCH_CLAUSE (vala_catch_clause_get_type ())
#define VALA_CATCH_CLAUSE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALA_TYPE_CATCH_CLAUSE, ValaCatchClause))
#define VALA_CATCH_CLAUSE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VALA_TYPE_CATCH_CLAUSE, ValaCatchClauseClass))
#define VALA_IS_CATCH_CLAUSE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VALA_TYPE_CATCH_CLAUSE))
#define VALA_IS_CATCH_CLAUSE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VALA_TYPE_CATCH_CLAUSE))
#define VALA_CATCH_CLAUSE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VALA_TYPE_CATCH_CLAUSE, ValaCatchClauseClass))

typedef struct _ValaCatchClause ValaCatchClause;
typedef struct _ValaCatchClauseClass ValaCatchClauseClass;

#define VALA_TYPE_LOCK_STATEMENT (vala_lock_statement_get_type ())
#define VALA_LOCK_STATEMENT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALA_TYPE_LOCK_STATEMENT, ValaLockStatement))
#define VALA_LOCK_STATEMENT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VALA_TYPE_LOCK_STATEMENT, ValaLockStatementClass))
#define VALA_IS_LOCK_STATEMENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VALA_TYPE_LOCK_STATEMENT))
#define VALA_IS_LOCK_STATEMENT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VALA_TYPE_LOCK_STATEMENT))
#define VALA_LOCK_STATEMENT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VALA_TYPE_LOCK_STATEMENT, ValaLockStatementClass))

typedef struct _ValaLockStatement ValaLockStatement;
typedef struct _ValaLockStatementClass ValaLockStatementClass;

#define VALA_TYPE_UNLOCK_STATEMENT (vala_unlock_statement_get_type ())
#define VALA_UNLOCK_STATEMENT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALA_TYPE_UNLOCK_STATEMENT, ValaUnlockStatement))
#define VALA_UNLOCK_STATEMENT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VALA_TYPE_UNLOCK_STATEMENT, ValaUnlockStatementClass))
#define VALA_IS_UNLOCK_STATEMENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VALA_TYPE_UNLOCK_STATEMENT))
#define VALA_IS_UNLOCK_STATEMENT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VALA_TYPE_UNLOCK_STATEMENT))
#define VALA_UNLOCK_STATEMENT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VALA_TYPE_UNLOCK_STATEMENT, ValaUnlockStatementClass))

typedef struct _ValaUnlockStatement ValaUnlockStatement;
typedef struct _ValaUnlockStatementClass ValaUnlockStatementClass;

#define VALA_TYPE_DELETE_STATEMENT (vala_delete_statement_get_type ())
#define VALA_DELETE_STATEMENT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALA_TYPE_DELETE_STATEMENT, ValaDeleteStatement))
#define VALA_DELETE_STATEMENT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VALA_TYPE_DELETE_STATEMENT, ValaDeleteStatementClass))
#define VALA_IS_DELETE_STATEMENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VALA_TYPE_DELETE_STATEMENT))
#define VALA_IS_DELETE_STATEMENT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VALA_TYPE_DELETE_STATEMENT))
#define VALA_DELETE_STATEMENT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VALA_TYPE_DELETE_STATEMENT, ValaDeleteStatementClass))

typedef struct _ValaDeleteStatement ValaDeleteStatement;
typedef struct _ValaDeleteStatementClass ValaDeleteStatementClass;

#define VALA_TYPE_ARRAY_CREATION_EXPRESSION (vala_array_creation_expression_get_type ())
#define VALA_ARRAY_CREATION_EXPRESSION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALA_TYPE_ARRAY_CREATION_EXPRESSION, ValaArrayCreationExpression))
#define VALA_ARRAY_CREATION_EXPRESSION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VALA_TYPE_ARRAY_CREATION_EXPRESSION, ValaArrayCreationExpressionClass))
#define VALA_IS_ARRAY_CREATION_EXPRESSION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VALA_TYPE_ARRAY_CREATION_EXPRESSION))
#define VALA_IS_ARRAY_CREATION_EXPRESSION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VALA_TYPE_ARRAY_CREATION_EXPRESSION))
#define VALA_ARRAY_CREATION_EXPRESSION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VALA_TYPE_ARRAY_CREATION_EXPRESSION, ValaArrayCreationExpressionClass))

typedef struct _ValaArrayCreationExpression ValaArrayCreationExpression;
typedef struct _ValaArrayCreationExpressionClass ValaArrayCreationExpressionClass;

#define VALA_TYPE_LITERAL (vala_literal_get_type ())
#define VALA_LITERAL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALA_TYPE_LITERAL, ValaLiteral))
#define VALA_LITERAL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VALA_TYPE_LITERAL, ValaLiteralClass))
#define VALA_IS_LITERAL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VALA_TYPE_LITERAL))
#define VALA_IS_LITERAL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VALA_TYPE_LITERAL))
#define VALA_LITERAL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VALA_TYPE_LITERAL, ValaLiteralClass))

typedef struct _ValaLiteral ValaLiteral;
typedef struct _ValaLiteralClass ValaLiteralClass;

#define VALA_TYPE_BOOLEAN_LITERAL (vala_boolean_literal_get_type ())
#define VALA_BOOLEAN_LITERAL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALA_TYPE_BOOLEAN_LITERAL, ValaBooleanLiteral))
#define VALA_BOOLEAN_LITERAL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VALA_TYPE_BOOLEAN_LITERAL, ValaBooleanLiteralClass))
#define VALA_IS_BOOLEAN_LITERAL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VALA_TYPE_BOOLEAN_LITERAL))
#define VALA_IS_BOOLEAN_LITERAL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VALA_TYPE_BOOLEAN_LITERAL))
#define VALA_BOOLEAN_LITERAL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VALA_TYPE_BOOLEAN_LITERAL, ValaBooleanLiteralClass))

typedef struct _ValaBooleanLiteral ValaBooleanLiteral;
typedef struct _ValaBooleanLiteralClass ValaBooleanLiteralClass;

#define VALA_TYPE_CHARACTER_LITERAL (vala_character_literal_get_type ())
#define VALA_CHARACTER_LITERAL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALA_TYPE_CHARACTER_LITERAL, ValaCharacterLiteral))
#define VALA_CHARACTER_LITERAL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VALA_TYPE_CHARACTER_LITERAL, ValaCharacterLiteralClass))
#define VALA_IS_CHARACTER_LITERAL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VALA_TYPE_CHARACTER_LITERAL))
#define VALA_IS_CHARACTER_LITERAL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VALA_TYPE_CHARACTER_LITERAL))
#define VALA_CHARACTER_LITERAL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VALA_TYPE_CHARACTER_LITERAL, ValaCharacterLiteralClass))

typedef struct _ValaCharacterLiteral ValaCharacterLiteral;
typedef struct _ValaCharacterLiteralClass ValaCharacterLiteralClass;

#define VALA_TYPE_INTEGER_LITERAL (vala_integer_literal_get_type ())
#define VALA_INTEGER_LITERAL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALA_TYPE_INTEGER_LITERAL, ValaIntegerLiteral))
#define VALA_INTEGER_LITERAL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VALA_TYPE_INTEGER_LITERAL, ValaIntegerLiteralClass))
#define VALA_IS_INTEGER_LITERAL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VALA_TYPE_INTEGER_LITERAL))
#define VALA_IS_INTEGER_LITERAL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VALA_TYPE_INTEGER_LITERAL))
#define VALA_INTEGER_LITERAL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VALA_TYPE_INTEGER_LITERAL, ValaIntegerLiteralClass))

typedef struct _ValaIntegerLiteral ValaIntegerLiteral;
typedef struct _ValaIntegerLiteralClass ValaIntegerLiteralClass;

#define VALA_TYPE_REAL_LITERAL (vala_real_literal_get_type ())
#define VALA_REAL_LITERAL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALA_TYPE_REAL_LITERAL, ValaRealLiteral))
#define VALA_REAL_LITERAL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VALA_TYPE_REAL_LITERAL, ValaRealLiteralClass))
#define VALA_IS_REAL_LITERAL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VALA_TYPE_REAL_LITERAL))
#define VALA_IS_REAL_LITERAL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VALA_TYPE_REAL_LITERAL))
#define VALA_REAL_LITERAL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VALA_TYPE_REAL_LITERAL, ValaRealLiteralClass))

typedef struct _ValaRealLiteral ValaRealLiteral;
typedef struct _ValaRealLiteralClass ValaRealLiteralClass;

#define VALA_TYPE_REGEX_LITERAL (vala_regex_literal_get_type ())
#define VALA_REGEX_LITERAL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALA_TYPE_REGEX_LITERAL, ValaRegexLiteral))
#define VALA_REGEX_LITERAL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VALA_TYPE_REGEX_LITERAL, ValaRegexLiteralClass))
#define VALA_IS_REGEX_LITERAL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VALA_TYPE_REGEX_LITERAL))
#define VALA_IS_REGEX_LITERAL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VALA_TYPE_REGEX_LITERAL))
#define VALA_REGEX_LITERAL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VALA_TYPE_REGEX_LITERAL, ValaRegexLiteralClass))

typedef struct _ValaRegexLiteral ValaRegexLiteral;
typedef struct _ValaRegexLiteralClass ValaRegexLiteralClass;

#define VALA_TYPE_STRING_LITERAL (vala_string_literal_get_type ())
#define VALA_STRING_LITERAL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALA_TYPE_STRING_LITERAL, ValaStringLiteral))
#define VALA_STRING_LITERAL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VALA_TYPE_STRING_LITERAL, ValaStringLiteralClass))
#define VALA_IS_STRING_LITERAL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VALA_TYPE_STRING_LITERAL))
#define VALA_IS_STRING_LITERAL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VALA_TYPE_STRING_LITERAL))
#define VALA_STRING_LITERAL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VALA_TYPE_STRING_LITERAL, ValaStringLiteralClass))

typedef struct _ValaStringLiteral ValaStringLiteral;
typedef struct _ValaStringLiteralClass ValaStringLiteralClass;

#define VALA_TYPE_TEMPLATE (vala_template_get_type ())
#define VALA_TEMPLATE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALA_TYPE_TEMPLATE, ValaTemplate))
#define VALA_TEMPLATE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VALA_TYPE_TEMPLATE, ValaTemplateClass))
#define VALA_IS_TEMPLATE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VALA_TYPE_TEMPLATE))
#define VALA_IS_TEMPLATE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VALA_TYPE_TEMPLATE))
#define VALA_TEMPLATE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VALA_TYPE_TEMPLATE, ValaTemplateClass))

typedef struct _ValaTemplate ValaTemplate;
typedef struct _ValaTemplateClass ValaTemplateClass;

#define VALA_TYPE_LIST_LITERAL (vala_list_literal_get_type ())
#define VALA_LIST_LITERAL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALA_TYPE_LIST_LITERAL, ValaListLiteral))
#define VALA_LIST_LITERAL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VALA_TYPE_LIST_LITERAL, ValaListLiteralClass))
#define VALA_IS_LIST_LITERAL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VALA_TYPE_LIST_LITERAL))
#define VALA_IS_LIST_LITERAL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VALA_TYPE_LIST_LITERAL))
#define VALA_LIST_LITERAL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VALA_TYPE_LIST_LITERAL, ValaListLiteralClass))

typedef struct _ValaListLiteral ValaListLiteral;
typedef struct _ValaListLiteralClass ValaListLiteralClass;

#define VALA_TYPE_SET_LITERAL (vala_set_literal_get_type ())
#define VALA_SET_LITERAL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALA_TYPE_SET_LITERAL, ValaSetLiteral))
#define VALA_SET_LITERAL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VALA_TYPE_SET_LITERAL, ValaSetLiteralClass))
#define VALA_IS_SET_LITERAL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VALA_TYPE_SET_LITERAL))
#define VALA_IS_SET_LITERAL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VALA_TYPE_SET_LITERAL))
#define VALA_SET_LITERAL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VALA_TYPE_SET_LITERAL, ValaSetLiteralClass))

typedef struct _ValaSetLiteral ValaSetLiteral;
typedef struct _ValaSetLiteralClass ValaSetLiteralClass;

#define VALA_TYPE_MAP_LITERAL (vala_map_literal_get_type ())
#define VALA_MAP_LITERAL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALA_TYPE_MAP_LITERAL, ValaMapLiteral))
#define VALA_MAP_LITERAL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VALA_TYPE_MAP_LITERAL, ValaMapLiteralClass))
#define VALA_IS_MAP_LITERAL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VALA_TYPE_MAP_LITERAL))
#define VALA_IS_MAP_LITERAL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VALA_TYPE_MAP_LITERAL))
#define VALA_MAP_LITERAL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VALA_TYPE_MAP_LITERAL, ValaMapLiteralClass))

typedef struct _ValaMapLiteral ValaMapLiteral;
typedef struct _ValaMapLiteralClass ValaMapLiteralClass;

#define VALA_TYPE_TUPLE (vala_tuple_get_type ())
#define VALA_TUPLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALA_TYPE_TUPLE, ValaTuple))
#define VALA_TUPLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VALA_TYPE_TUPLE, ValaTupleClass))
#define VALA_IS_TUPLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VALA_TYPE_TUPLE))
#define VALA_IS_TUPLE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VALA_TYPE_TUPLE))
#define VALA_TUPLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VALA_TYPE_TUPLE, ValaTupleClass))

typedef struct _ValaTuple ValaTuple;
typedef struct _ValaTupleClass ValaTupleClass;

#define VALA_TYPE_NULL_LITERAL (vala_null_literal_get_type ())
#define VALA_NULL_LITERAL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALA_TYPE_NULL_LITERAL, ValaNullLiteral))
#define VALA_NULL_LITERAL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VALA_TYPE_NULL_LITERAL, ValaNullLiteralClass))
#define VALA_IS_NULL_LITERAL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VALA_TYPE_NULL_LITERAL))
#define VALA_IS_NULL_LITERAL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VALA_TYPE_NULL_LITERAL))
#define VALA_NULL_LITERAL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VALA_TYPE_NULL_LITERAL, ValaNullLiteralClass))

typedef struct _ValaNullLiteral ValaNullLiteral;
typedef struct _ValaNullLiteralClass ValaNullLiteralClass;

#define VALA_TYPE_MEMBER_ACCESS (vala_member_access_get_type ())
#define VALA_MEMBER_ACCESS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALA_TYPE_MEMBER_ACCESS, ValaMemberAccess))
#define VALA_MEMBER_ACCESS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VALA_TYPE_MEMBER_ACCESS, ValaMemberAccessClass))
#define VALA_IS_MEMBER_ACCESS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VALA_TYPE_MEMBER_ACCESS))
#define VALA_IS_MEMBER_ACCESS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VALA_TYPE_MEMBER_ACCESS))
#define VALA_MEMBER_ACCESS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VALA_TYPE_MEMBER_ACCESS, ValaMemberAccessClass))

typedef struct _ValaMemberAccess ValaMemberAccess;
typedef struct _ValaMemberAccessClass ValaMemberAccessClass;

#define VALA_TYPE_METHOD_CALL (vala_method_call_get_type ())
#define VALA_METHOD_CALL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALA_TYPE_METHOD_CALL, ValaMethodCall))
#define VALA_METHOD_CALL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VALA_TYPE_METHOD_CALL, ValaMethodCallClass))
#define VALA_IS_METHOD_CALL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VALA_TYPE_METHOD_CALL))
#define VALA_IS_METHOD_CALL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VALA_TYPE_METHOD_CALL))
#define VALA_METHOD_CALL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VALA_TYPE_METHOD_CALL, ValaMethodCallClass))

typedef struct _ValaMethodCall ValaMethodCall;
typedef struct _ValaMethodCallClass ValaMethodCallClass;

#define VALA_TYPE_ELEMENT_ACCESS (vala_element_access_get_type ())
#define VALA_ELEMENT_ACCESS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALA_TYPE_ELEMENT_ACCESS, ValaElementAccess))
#define VALA_ELEMENT_ACCESS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VALA_TYPE_ELEMENT_ACCESS, ValaElementAccessClass))
#define VALA_IS_ELEMENT_ACCESS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VALA_TYPE_ELEMENT_ACCESS))
#define VALA_IS_ELEMENT_ACCESS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VALA_TYPE_ELEMENT_ACCESS))
#define VALA_ELEMENT_ACCESS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VALA_TYPE_ELEMENT_ACCESS, ValaElementAccessClass))

typedef struct _ValaElementAccess ValaElementAccess;
typedef struct _ValaElementAccessClass ValaElementAccessClass;

#define VALA_TYPE_SLICE_EXPRESSION (vala_slice_expression_get_type ())
#define VALA_SLICE_EXPRESSION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALA_TYPE_SLICE_EXPRESSION, ValaSliceExpression))
#define VALA_SLICE_EXPRESSION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VALA_TYPE_SLICE_EXPRESSION, ValaSliceExpressionClass))
#define VALA_IS_SLICE_EXPRESSION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VALA_TYPE_SLICE_EXPRESSION))
#define VALA_IS_SLICE_EXPRESSION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VALA_TYPE_SLICE_EXPRESSION))
#define VALA_SLICE_EXPRESSION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VALA_TYPE_SLICE_EXPRESSION, ValaSliceExpressionClass))

typedef struct _ValaSliceExpression ValaSliceExpression;
typedef struct _ValaSliceExpressionClass ValaSliceExpressionClass;

#define VALA_TYPE_BASE_ACCESS (vala_base_access_get_type ())
#define VALA_BASE_ACCESS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALA_TYPE_BASE_ACCESS, ValaBaseAccess))
#define VALA_BASE_ACCESS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VALA_TYPE_BASE_ACCESS, ValaBaseAccessClass))
#define VALA_IS_BASE_ACCESS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VALA_TYPE_BASE_ACCESS))
#define VALA_IS_BASE_ACCESS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VALA_TYPE_BASE_ACCESS))
#define VALA_BASE_ACCESS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VALA_TYPE_BASE_ACCESS, ValaBaseAccessClass))

typedef struct _ValaBaseAccess ValaBaseAccess;
typedef struct _ValaBaseAccessClass ValaBaseAccessClass;

#define VALA_TYPE_POSTFIX_EXPRESSION (vala_postfix_expression_get_type ())
#define VALA_POSTFIX_EXPRESSION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALA_TYPE_POSTFIX_EXPRESSION, ValaPostfixExpression))
#define VALA_POSTFIX_EXPRESSION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VALA_TYPE_POSTFIX_EXPRESSION, ValaPostfixExpressionClass))
#define VALA_IS_POSTFIX_EXPRESSION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VALA_TYPE_POSTFIX_EXPRESSION))
#define VALA_IS_POSTFIX_EXPRESSION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VALA_TYPE_POSTFIX_EXPRESSION))
#define VALA_POSTFIX_EXPRESSION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VALA_TYPE_POSTFIX_EXPRESSION, ValaPostfixExpressionClass))

typedef struct _ValaPostfixExpression ValaPostfixExpression;
typedef struct _ValaPostfixExpressionClass ValaPostfixExpressionClass;

#define VALA_TYPE_OBJECT_CREATION_EXPRESSION (vala_object_creation_expression_get_type ())
#define VALA_OBJECT_CREATION_EXPRESSION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALA_TYPE_OBJECT_CREATION_EXPRESSION, ValaObjectCreationExpression))
#define VALA_OBJECT_CREATION_EXPRESSION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VALA_TYPE_OBJECT_CREATION_EXPRESSION, ValaObjectCreationExpressionClass))
#define VALA_IS_OBJECT_CREATION_EXPRESSION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VALA_TYPE_OBJECT_CREATION_EXPRESSION))
#define VALA_IS_OBJECT_CREATION_EXPRESSION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VALA_TYPE_OBJECT_CREATION_EXPRESSION))
#define VALA_OBJECT_CREATION_EXPRESSION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VALA_TYPE_OBJECT_CREATION_EXPRESSION, ValaObjectCreationExpressionClass))

typedef struct _ValaObjectCreationExpression ValaObjectCreationExpression;
typedef struct _ValaObjectCreationExpressionClass ValaObjectCreationExpressionClass;

#define VALA_TYPE_SIZEOF_EXPRESSION (vala_sizeof_expression_get_type ())
#define VALA_SIZEOF_EXPRESSION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALA_TYPE_SIZEOF_EXPRESSION, ValaSizeofExpression))
#define VALA_SIZEOF_EXPRESSION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VALA_TYPE_SIZEOF_EXPRESSION, ValaSizeofExpressionClass))
#define VALA_IS_SIZEOF_EXPRESSION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VALA_TYPE_SIZEOF_EXPRESSION))
#define VALA_IS_SIZEOF_EXPRESSION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VALA_TYPE_SIZEOF_EXPRESSION))
#define VALA_SIZEOF_EXPRESSION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VALA_TYPE_SIZEOF_EXPRESSION, ValaSizeofExpressionClass))

typedef struct _ValaSizeofExpression ValaSizeofExpression;
typedef struct _ValaSizeofExpressionClass ValaSizeofExpressionClass;

#define VALA_TYPE_TYPEOF_EXPRESSION (vala_typeof_expression_get_type ())
#define VALA_TYPEOF_EXPRESSION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALA_TYPE_TYPEOF_EXPRESSION, ValaTypeofExpression))
#define VALA_TYPEOF_EXPRESSION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VALA_TYPE_TYPEOF_EXPRESSION, ValaTypeofExpressionClass))
#define VALA_IS_TYPEOF_EXPRESSION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VALA_TYPE_TYPEOF_EXPRESSION))
#define VALA_IS_TYPEOF_EXPRESSION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VALA_TYPE_TYPEOF_EXPRESSION))
#define VALA_TYPEOF_EXPRESSION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VALA_TYPE_TYPEOF_EXPRESSION, ValaTypeofExpressionClass))

typedef struct _ValaTypeofExpression ValaTypeofExpression;
typedef struct _ValaTypeofExpressionClass ValaTypeofExpressionClass;

#define VALA_TYPE_UNARY_EXPRESSION (vala_unary_expression_get_type ())
#define VALA_UNARY_EXPRESSION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALA_TYPE_UNARY_EXPRESSION, ValaUnaryExpression))
#define VALA_UNARY_EXPRESSION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VALA_TYPE_UNARY_EXPRESSION, ValaUnaryExpressionClass))
#define VALA_IS_UNARY_EXPRESSION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VALA_TYPE_UNARY_EXPRESSION))
#define VALA_IS_UNARY_EXPRESSION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VALA_TYPE_UNARY_EXPRESSION))
#define VALA_UNARY_EXPRESSION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VALA_TYPE_UNARY_EXPRESSION, ValaUnaryExpressionClass))

typedef struct _ValaUnaryExpression ValaUnaryExpression;
typedef struct _ValaUnaryExpressionClass ValaUnaryExpressionClass;

#define VALA_TYPE_CAST_EXPRESSION (vala_cast_expression_get_type ())
#define VALA_CAST_EXPRESSION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALA_TYPE_CAST_EXPRESSION, ValaCastExpression))
#define VALA_CAST_EXPRESSION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VALA_TYPE_CAST_EXPRESSION, ValaCastExpressionClass))
#define VALA_IS_CAST_EXPRESSION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VALA_TYPE_CAST_EXPRESSION))
#define VALA_IS_CAST_EXPRESSION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VALA_TYPE_CAST_EXPRESSION))
#define VALA_CAST_EXPRESSION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VALA_TYPE_CAST_EXPRESSION, ValaCastExpressionClass))

typedef struct _ValaCastExpression ValaCastExpression;
typedef struct _ValaCastExpressionClass ValaCastExpressionClass;

#define VALA_TYPE_NAMED_ARGUMENT (vala_named_argument_get_type ())
#define VALA_NAMED_ARGUMENT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALA_TYPE_NAMED_ARGUMENT, ValaNamedArgument))
#define VALA_NAMED_ARGUMENT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VALA_TYPE_NAMED_ARGUMENT, ValaNamedArgumentClass))
#define VALA_IS_NAMED_ARGUMENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VALA_TYPE_NAMED_ARGUMENT))
#define VALA_IS_NAMED_ARGUMENT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VALA_TYPE_NAMED_ARGUMENT))
#define VALA_NAMED_ARGUMENT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VALA_TYPE_NAMED_ARGUMENT, ValaNamedArgumentClass))

typedef struct _ValaNamedArgument ValaNamedArgument;
typedef struct _ValaNamedArgumentClass ValaNamedArgumentClass;

#define VALA_TYPE_POINTER_INDIRECTION (vala_pointer_indirection_get_type ())
#define VALA_POINTER_INDIRECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALA_TYPE_POINTER_INDIRECTION, ValaPointerIndirection))
#define VALA_POINTER_INDIRECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VALA_TYPE_POINTER_INDIRECTION, ValaPointerIndirectionClass))
#define VALA_IS_POINTER_INDIRECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VALA_TYPE_POINTER_INDIRECTION))
#define VALA_IS_POINTER_INDIRECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VALA_TYPE_POINTER_INDIRECTION))
#define VALA_POINTER_INDIRECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VALA_TYPE_POINTER_INDIRECTION, ValaPointerIndirectionClass))

typedef struct _ValaPointerIndirection ValaPointerIndirection;
typedef struct _ValaPointerIndirectionClass ValaPointerIndirectionClass;

#define VALA_TYPE_ADDRESSOF_EXPRESSION (vala_addressof_expression_get_type ())
#define VALA_ADDRESSOF_EXPRESSION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALA_TYPE_ADDRESSOF_EXPRESSION, ValaAddressofExpression))
#define VALA_ADDRESSOF_EXPRESSION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VALA_TYPE_ADDRESSOF_EXPRESSION, ValaAddressofExpressionClass))
#define VALA_IS_ADDRESSOF_EXPRESSION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VALA_TYPE_ADDRESSOF_EXPRESSION))
#define VALA_IS_ADDRESSOF_EXPRESSION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VALA_TYPE_ADDRESSOF_EXPRESSION))
#define VALA_ADDRESSOF_EXPRESSION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VALA_TYPE_ADDRESSOF_EXPRESSION, ValaAddressofExpressionClass))

typedef struct _ValaAddressofExpression ValaAddressofExpression;
typedef struct _ValaAddressofExpressionClass ValaAddressofExpressionClass;

#define VALA_TYPE_REFERENCE_TRANSFER_EXPRESSION (vala_reference_transfer_expression_get_type ())
#define VALA_REFERENCE_TRANSFER_EXPRESSION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALA_TYPE_REFERENCE_TRANSFER_EXPRESSION, ValaReferenceTransferExpression))
#define VALA_REFERENCE_TRANSFER_EXPRESSION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VALA_TYPE_REFERENCE_TRANSFER_EXPRESSION, ValaReferenceTransferExpressionClass))
#define VALA_IS_REFERENCE_TRANSFER_EXPRESSION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VALA_TYPE_REFERENCE_TRANSFER_EXPRESSION))
#define VALA_IS_REFERENCE_TRANSFER_EXPRESSION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VALA_TYPE_REFERENCE_TRANSFER_EXPRESSION))
#define VALA_REFERENCE_TRANSFER_EXPRESSION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VALA_TYPE_REFERENCE_TRANSFER_EXPRESSION, ValaReferenceTransferExpressionClass))

typedef struct _ValaReferenceTransferExpression ValaReferenceTransferExpression;
typedef struct _ValaReferenceTransferExpressionClass ValaReferenceTransferExpressionClass;

#define VALA_TYPE_BINARY_EXPRESSION (vala_binary_expression_get_type ())
#define VALA_BINARY_EXPRESSION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALA_TYPE_BINARY_EXPRESSION, ValaBinaryExpression))
#define VALA_BINARY_EXPRESSION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VALA_TYPE_BINARY_EXPRESSION, ValaBinaryExpressionClass))
#define VALA_IS_BINARY_EXPRESSION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VALA_TYPE_BINARY_EXPRESSION))
#define VALA_IS_BINARY_EXPRESSION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VALA_TYPE_BINARY_EXPRESSION))
#define VALA_BINARY_EXPRESSION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VALA_TYPE_BINARY_EXPRESSION, ValaBinaryExpressionClass))

typedef struct _ValaBinaryExpression ValaBinaryExpression;
typedef struct _ValaBinaryExpressionClass ValaBinaryExpressionClass;

#define VALA_TYPE_TYPECHECK (vala_typecheck_get_type ())
#define VALA_TYPECHECK(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALA_TYPE_TYPECHECK, ValaTypeCheck))
#define VALA_TYPECHECK_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VALA_TYPE_TYPECHECK, ValaTypeCheckClass))
#define VALA_IS_TYPECHECK(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VALA_TYPE_TYPECHECK))
#define VALA_IS_TYPECHECK_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VALA_TYPE_TYPECHECK))
#define VALA_TYPECHECK_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VALA_TYPE_TYPECHECK, ValaTypeCheckClass))

typedef struct _ValaTypeCheck ValaTypeCheck;
typedef struct _ValaTypeCheckClass ValaTypeCheckClass;

#define VALA_TYPE_CONDITIONAL_EXPRESSION (vala_conditional_expression_get_type ())
#define VALA_CONDITIONAL_EXPRESSION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALA_TYPE_CONDITIONAL_EXPRESSION, ValaConditionalExpression))
#define VALA_CONDITIONAL_EXPRESSION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VALA_TYPE_CONDITIONAL_EXPRESSION, ValaConditionalExpressionClass))
#define VALA_IS_CONDITIONAL_EXPRESSION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VALA_TYPE_CONDITIONAL_EXPRESSION))
#define VALA_IS_CONDITIONAL_EXPRESSION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VALA_TYPE_CONDITIONAL_EXPRESSION))
#define VALA_CONDITIONAL_EXPRESSION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VALA_TYPE_CONDITIONAL_EXPRESSION, ValaConditionalExpressionClass))

typedef struct _ValaConditionalExpression ValaConditionalExpression;
typedef struct _ValaConditionalExpressionClass ValaConditionalExpressionClass;

#define VALA_TYPE_LAMBDA_EXPRESSION (vala_lambda_expression_get_type ())
#define VALA_LAMBDA_EXPRESSION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALA_TYPE_LAMBDA_EXPRESSION, ValaLambdaExpression))
#define VALA_LAMBDA_EXPRESSION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VALA_TYPE_LAMBDA_EXPRESSION, ValaLambdaExpressionClass))
#define VALA_IS_LAMBDA_EXPRESSION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VALA_TYPE_LAMBDA_EXPRESSION))
#define VALA_IS_LAMBDA_EXPRESSION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VALA_TYPE_LAMBDA_EXPRESSION))
#define VALA_LAMBDA_EXPRESSION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VALA_TYPE_LAMBDA_EXPRESSION, ValaLambdaExpressionClass))

typedef struct _ValaLambdaExpression ValaLambdaExpression;
typedef struct _ValaLambdaExpressionClass ValaLambdaExpressionClass;

#define VALA_TYPE_ASSIGNMENT (vala_assignment_get_type ())
#define VALA_ASSIGNMENT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALA_TYPE_ASSIGNMENT, ValaAssignment))
#define VALA_ASSIGNMENT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VALA_TYPE_ASSIGNMENT, ValaAssignmentClass))
#define VALA_IS_ASSIGNMENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VALA_TYPE_ASSIGNMENT))
#define VALA_IS_ASSIGNMENT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VALA_TYPE_ASSIGNMENT))
#define VALA_ASSIGNMENT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VALA_TYPE_ASSIGNMENT, ValaAssignmentClass))

typedef struct _ValaAssignment ValaAssignment;
typedef struct _ValaAssignmentClass ValaAssignmentClass;

#define VALA_TYPE_GIR_PARSER (vala_gir_parser_get_type ())
#define VALA_GIR_PARSER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALA_TYPE_GIR_PARSER, ValaGirParser))
#define VALA_GIR_PARSER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VALA_TYPE_GIR_PARSER, ValaGirParserClass))
#define VALA_IS_GIR_PARSER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VALA_TYPE_GIR_PARSER))
#define VALA_IS_GIR_PARSER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VALA_TYPE_GIR_PARSER))
#define VALA_GIR_PARSER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VALA_TYPE_GIR_PARSER, ValaGirParserClass))

typedef struct _ValaGirParser ValaGirParser;
typedef struct _ValaGirParserClass ValaGirParserClass;
typedef struct _ValaGirParserPrivate ValaGirParserPrivate;

#define VALA_TYPE_MARKUP_READER (vala_markup_reader_get_type ())
#define VALA_MARKUP_READER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALA_TYPE_MARKUP_READER, ValaMarkupReader))
#define VALA_MARKUP_READER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VALA_TYPE_MARKUP_READER, ValaMarkupReaderClass))
#define VALA_IS_MARKUP_READER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VALA_TYPE_MARKUP_READER))
#define VALA_IS_MARKUP_READER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VALA_TYPE_MARKUP_READER))
#define VALA_MARKUP_READER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VALA_TYPE_MARKUP_READER, ValaMarkupReaderClass))

typedef struct _ValaMarkupReader ValaMarkupReader;
typedef struct _ValaMarkupReaderClass ValaMarkupReaderClass;

#define VALA_TYPE_CODE_CONTEXT (vala_code_context_get_type ())
#define VALA_CODE_CONTEXT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALA_TYPE_CODE_CONTEXT, ValaCodeContext))
#define VALA_CODE_CONTEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VALA_TYPE_CODE_CONTEXT, ValaCodeContextClass))
#define VALA_IS_CODE_CONTEXT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VALA_TYPE_CODE_CONTEXT))
#define VALA_IS_CODE_CONTEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VALA_TYPE_CODE_CONTEXT))
#define VALA_CODE_CONTEXT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VALA_TYPE_CODE_CONTEXT, ValaCodeContextClass))

typedef struct _ValaCodeContext ValaCodeContext;
typedef struct _ValaCodeContextClass ValaCodeContextClass;

#define VALA_TYPE_SOURCE_LOCATION (vala_source_location_get_type ())
typedef struct _ValaSourceLocation ValaSourceLocation;

#define VALA_TYPE_MARKUP_TOKEN_TYPE (vala_markup_token_type_get_type ())

#define VALA_GIR_PARSER_TYPE_METADATA (vala_gir_parser_metadata_get_type ())
#define VALA_GIR_PARSER_METADATA(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALA_GIR_PARSER_TYPE_METADATA, ValaGirParserMetadata))
#define VALA_GIR_PARSER_METADATA_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VALA_GIR_PARSER_TYPE_METADATA, ValaGirParserMetadataClass))
#define VALA_GIR_PARSER_IS_METADATA(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VALA_GIR_PARSER_TYPE_METADATA))
#define VALA_GIR_PARSER_IS_METADATA_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VALA_GIR_PARSER_TYPE_METADATA))
#define VALA_GIR_PARSER_METADATA_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VALA_GIR_PARSER_TYPE_METADATA, ValaGirParserMetadataClass))

typedef struct _ValaGirParserMetadata ValaGirParserMetadata;
typedef struct _ValaGirParserMetadataClass ValaGirParserMetadataClass;

#define VALA_GIR_PARSER_TYPE_SYMBOL_INFO (vala_gir_parser_symbol_info_get_type ())
#define VALA_GIR_PARSER_SYMBOL_INFO(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALA_GIR_PARSER_TYPE_SYMBOL_INFO, ValaGirParserSymbolInfo))
#define VALA_GIR_PARSER_SYMBOL_INFO_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VALA_GIR_PARSER_TYPE_SYMBOL_INFO, ValaGirParserSymbolInfoClass))
#define VALA_GIR_PARSER_IS_SYMBOL_INFO(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VALA_GIR_PARSER_TYPE_SYMBOL_INFO))
#define VALA_GIR_PARSER_IS_SYMBOL_INFO_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VALA_GIR_PARSER_TYPE_SYMBOL_INFO))
#define VALA_GIR_PARSER_SYMBOL_INFO_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VALA_GIR_PARSER_TYPE_SYMBOL_INFO, ValaGirParserSymbolInfoClass))

typedef struct _ValaGirParserSymbolInfo ValaGirParserSymbolInfo;
typedef struct _ValaGirParserSymbolInfoClass ValaGirParserSymbolInfoClass;

#define VALA_TYPE_UNRESOLVED_SYMBOL (vala_unresolved_symbol_get_type ())
#define VALA_UNRESOLVED_SYMBOL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALA_TYPE_UNRESOLVED_SYMBOL, ValaUnresolvedSymbol))
#define VALA_UNRESOLVED_SYMBOL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VALA_TYPE_UNRESOLVED_SYMBOL, ValaUnresolvedSymbolClass))
#define VALA_IS_UNRESOLVED_SYMBOL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VALA_TYPE_UNRESOLVED_SYMBOL))
#define VALA_IS_UNRESOLVED_SYMBOL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VALA_TYPE_UNRESOLVED_SYMBOL))
#define VALA_UNRESOLVED_SYMBOL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VALA_TYPE_UNRESOLVED_SYMBOL, ValaUnresolvedSymbolClass))

typedef struct _ValaUnresolvedSymbol ValaUnresolvedSymbol;
typedef struct _ValaUnresolvedSymbolClass ValaUnresolvedSymbolClass;

#define VALA_GIR_PARSER_TYPE_CALLBACK_SCOPE (vala_gir_parser_callback_scope_get_type ())
#define VALA_GIR_PARSER_CALLBACK_SCOPE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALA_GIR_PARSER_TYPE_CALLBACK_SCOPE, ValaGirParserCallbackScope))
#define VALA_GIR_PARSER_CALLBACK_SCOPE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VALA_GIR_PARSER_TYPE_CALLBACK_SCOPE, ValaGirParserCallbackScopeClass))
#define VALA_GIR_PARSER_IS_CALLBACK_SCOPE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VALA_GIR_PARSER_TYPE_CALLBACK_SCOPE))
#define VALA_GIR_PARSER_IS_CALLBACK_SCOPE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VALA_GIR_PARSER_TYPE_CALLBACK_SCOPE))
#define VALA_GIR_PARSER_CALLBACK_SCOPE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VALA_GIR_PARSER_TYPE_CALLBACK_SCOPE, ValaGirParserCallbackScopeClass))

typedef struct _ValaGirParserCallbackScope ValaGirParserCallbackScope;
typedef struct _ValaGirParserCallbackScopeClass ValaGirParserCallbackScopeClass;

#define VALA_GIR_PARSER_TYPE_ALIAS (vala_gir_parser_alias_get_type ())
#define VALA_GIR_PARSER_ALIAS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALA_GIR_PARSER_TYPE_ALIAS, ValaGirParserAlias))
#define VALA_GIR_PARSER_ALIAS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VALA_GIR_PARSER_TYPE_ALIAS, ValaGirParserAliasClass))
#define VALA_GIR_PARSER_IS_ALIAS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VALA_GIR_PARSER_TYPE_ALIAS))
#define VALA_GIR_PARSER_IS_ALIAS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VALA_GIR_PARSER_TYPE_ALIAS))
#define VALA_GIR_PARSER_ALIAS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VALA_GIR_PARSER_TYPE_ALIAS, ValaGirParserAliasClass))

typedef struct _ValaGirParserAlias ValaGirParserAlias;
typedef struct _ValaGirParserAliasClass ValaGirParserAliasClass;

#define VALA_GIR_PARSER_TYPE_METADATA_TYPE (vala_gir_parser_metadata_type_get_type ())

#define VALA_GIR_PARSER_TYPE_ARGUMENT_TYPE (vala_gir_parser_argument_type_get_type ())
#define _g_free0(var) (var = (g_free (var), NULL))
#define _g_regex_unref0(var) ((var == NULL) ? NULL : (var = (g_regex_unref (var), NULL)))
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
#define _g_type_class_unref0(var) ((var == NULL) ? NULL : (var = (g_type_class_unref (var), NULL)))
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _vala_code_context_unref0(var) ((var == NULL) ? NULL : (var = (vala_code_context_unref (var), NULL)))
#define _vala_code_node_unref0(var) ((var == NULL) ? NULL : (var = (vala_code_node_unref (var), NULL)))
#define _vala_source_file_unref0(var) ((var == NULL) ? NULL : (var = (vala_source_file_unref (var), NULL)))
#define _vala_iterable_unref0(var) ((var == NULL) ? NULL : (var = (vala_iterable_unref (var), NULL)))
#define _vala_gir_parser_metadata_unref0(var) ((var == NULL) ? NULL : (var = (vala_gir_parser_metadata_unref (var), NULL)))
#define _vala_map_unref0(var) ((var == NULL) ? NULL : (var = (vala_map_unref (var), NULL)))

#define VALA_TYPE_SCOPE (vala_scope_get_type ())
#define VALA_SCOPE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALA_TYPE_SCOPE, ValaScope))
#define VALA_SCOPE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VALA_TYPE_SCOPE, ValaScopeClass))
#define VALA_IS_SCOPE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VALA_TYPE_SCOPE))
#define VALA_IS_SCOPE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VALA_TYPE_SCOPE))
#define VALA_SCOPE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VALA_TYPE_SCOPE, ValaScopeClass))

typedef struct _ValaScope ValaScope;
typedef struct _ValaScopeClass ValaScopeClass;

#define VALA_TYPE_ATTRIBUTE (vala_attribute_get_type ())
#define VALA_ATTRIBUTE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALA_TYPE_ATTRIBUTE, ValaAttribute))
#define VALA_ATTRIBUTE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VALA_TYPE_ATTRIBUTE, ValaAttributeClass))
#define VALA_IS_ATTRIBUTE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VALA_TYPE_ATTRIBUTE))
#define VALA_IS_ATTRIBUTE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VALA_TYPE_ATTRIBUTE))
#define VALA_ATTRIBUTE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VALA_TYPE_ATTRIBUTE, ValaAttributeClass))

typedef struct _ValaAttribute ValaAttribute;
typedef struct _ValaAttributeClass ValaAttributeClass;

#define VALA_TYPE_SOURCE_REFERENCE (vala_source_reference_get_type ())
#define VALA_SOURCE_REFERENCE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALA_TYPE_SOURCE_REFERENCE, ValaSourceReference))
#define VALA_SOURCE_REFERENCE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VALA_TYPE_SOURCE_REFERENCE, ValaSourceReferenceClass))
#define VALA_IS_SOURCE_REFERENCE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VALA_TYPE_SOURCE_REFERENCE))
#define VALA_IS_SOURCE_REFERENCE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VALA_TYPE_SOURCE_REFERENCE))
#define VALA_SOURCE_REFERENCE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VALA_TYPE_SOURCE_REFERENCE, ValaSourceReferenceClass))

typedef struct _ValaSourceReference ValaSourceReference;
typedef struct _ValaSourceReferenceClass ValaSourceReferenceClass;

#define VALA_GIR_PARSER_TYPE_METADATA_PARSER (vala_gir_parser_metadata_parser_get_type ())
#define VALA_GIR_PARSER_METADATA_PARSER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALA_GIR_PARSER_TYPE_METADATA_PARSER, ValaGirParserMetadataParser))
#define VALA_GIR_PARSER_METADATA_PARSER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VALA_GIR_PARSER_TYPE_METADATA_PARSER, ValaGirParserMetadataParserClass))
#define VALA_GIR_PARSER_IS_METADATA_PARSER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VALA_GIR_PARSER_TYPE_METADATA_PARSER))
#define VALA_GIR_PARSER_IS_METADATA_PARSER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VALA_GIR_PARSER_TYPE_METADATA_PARSER))
#define VALA_GIR_PARSER_METADATA_PARSER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VALA_GIR_PARSER_TYPE_METADATA_PARSER, ValaGirParserMetadataParserClass))

typedef struct _ValaGirParserMetadataParser ValaGirParserMetadataParser;
typedef struct _ValaGirParserMetadataParserClass ValaGirParserMetadataParserClass;

#define VALA_TYPE_SOURCE_FILE_TYPE (vala_source_file_type_get_type ())
#define _vala_gir_parser_metadata_parser_unref0(var) ((var == NULL) ? NULL : (var = (vala_gir_parser_metadata_parser_unref (var), NULL)))
#define _vala_source_reference_unref0(var) ((var == NULL) ? NULL : (var = (vala_source_reference_unref (var), NULL)))
#define _vala_iterator_unref0(var) ((var == NULL) ? NULL : (var = (vala_iterator_unref (var), NULL)))
typedef struct _ValaGirParserSymbolInfoPrivate ValaGirParserSymbolInfoPrivate;
#define _vala_gir_parser_symbol_info_unref0(var) ((var == NULL) ? NULL : (var = (vala_gir_parser_symbol_info_unref (var), NULL)))
typedef struct _ValaCodeNodePrivate ValaCodeNodePrivate;

#define VALA_TYPE_CODE_GENERATOR (vala_code_generator_get_type ())
#define VALA_CODE_GENERATOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALA_TYPE_CODE_GENERATOR, ValaCodeGenerator))
#define VALA_CODE_GENERATOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VALA_TYPE_CODE_GENERATOR, ValaCodeGeneratorClass))
#define VALA_IS_CODE_GENERATOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VALA_TYPE_CODE_GENERATOR))
#define VALA_IS_CODE_GENERATOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VALA_TYPE_CODE_GENERATOR))
#define VALA_CODE_GENERATOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VALA_TYPE_CODE_GENERATOR, ValaCodeGeneratorClass))

typedef struct _ValaCodeGenerator ValaCodeGenerator;
typedef struct _ValaCodeGeneratorClass ValaCodeGeneratorClass;

#define VALA_TYPE_REFERENCE_TYPE (vala_reference_type_get_type ())
#define VALA_REFERENCE_TYPE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALA_TYPE_REFERENCE_TYPE, ValaReferenceType))
#define VALA_REFERENCE_TYPE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VALA_TYPE_REFERENCE_TYPE, ValaReferenceTypeClass))
#define VALA_IS_REFERENCE_TYPE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VALA_TYPE_REFERENCE_TYPE))
#define VALA_IS_REFERENCE_TYPE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VALA_TYPE_REFERENCE_TYPE))
#define VALA_REFERENCE_TYPE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VALA_TYPE_REFERENCE_TYPE, ValaReferenceTypeClass))

typedef struct _ValaReferenceType ValaReferenceType;
typedef struct _ValaReferenceTypeClass ValaReferenceTypeClass;

#define VALA_TYPE_ARRAY_TYPE (vala_array_type_get_type ())
#define VALA_ARRAY_TYPE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALA_TYPE_ARRAY_TYPE, ValaArrayType))
#define VALA_ARRAY_TYPE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VALA_TYPE_ARRAY_TYPE, ValaArrayTypeClass))
#define VALA_IS_ARRAY_TYPE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VALA_TYPE_ARRAY_TYPE))
#define VALA_IS_ARRAY_TYPE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VALA_TYPE_ARRAY_TYPE))
#define VALA_ARRAY_TYPE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VALA_TYPE_ARRAY_TYPE, ValaArrayTypeClass))

typedef struct _ValaArrayType ValaArrayType;
typedef struct _ValaArrayTypeClass ValaArrayTypeClass;
#define _g_string_free0(var) ((var == NULL) ? NULL : (var = (g_string_free (var, TRUE), NULL)))
#define _g_match_info_free0(var) ((var == NULL) ? NULL : (var = (g_match_info_free (var), NULL)))

#define VALA_TYPE_VOID_TYPE (vala_void_type_get_type ())
#define VALA_VOID_TYPE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALA_TYPE_VOID_TYPE, ValaVoidType))
#define VALA_VOID_TYPE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VALA_TYPE_VOID_TYPE, ValaVoidTypeClass))
#define VALA_IS_VOID_TYPE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VALA_TYPE_VOID_TYPE))
#define VALA_IS_VOID_TYPE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VALA_TYPE_VOID_TYPE))
#define VALA_VOID_TYPE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VALA_TYPE_VOID_TYPE, ValaVoidTypeClass))

typedef struct _ValaVoidType ValaVoidType;
typedef struct _ValaVoidTypeClass ValaVoidTypeClass;

#define VALA_TYPE_POINTER_TYPE (vala_pointer_type_get_type ())
#define VALA_POINTER_TYPE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALA_TYPE_POINTER_TYPE, ValaPointerType))
#define VALA_POINTER_TYPE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VALA_TYPE_POINTER_TYPE, ValaPointerTypeClass))
#define VALA_IS_POINTER_TYPE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VALA_TYPE_POINTER_TYPE))
#define VALA_IS_POINTER_TYPE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VALA_TYPE_POINTER_TYPE))
#define VALA_POINTER_TYPE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VALA_TYPE_POINTER_TYPE, ValaPointerTypeClass))

typedef struct _ValaPointerType ValaPointerType;
typedef struct _ValaPointerTypeClass ValaPointerTypeClass;

#define VALA_TYPE_UNRESOLVED_TYPE (vala_unresolved_type_get_type ())
#define VALA_UNRESOLVED_TYPE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALA_TYPE_UNRESOLVED_TYPE, ValaUnresolvedType))
#define VALA_UNRESOLVED_TYPE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VALA_TYPE_UNRESOLVED_TYPE, ValaUnresolvedTypeClass))
#define VALA_IS_UNRESOLVED_TYPE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VALA_TYPE_UNRESOLVED_TYPE))
#define VALA_IS_UNRESOLVED_TYPE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VALA_TYPE_UNRESOLVED_TYPE))
#define VALA_UNRESOLVED_TYPE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VALA_TYPE_UNRESOLVED_TYPE, ValaUnresolvedTypeClass))

typedef struct _ValaUnresolvedType ValaUnresolvedType;
typedef struct _ValaUnresolvedTypeClass ValaUnresolvedTypeClass;
#define __g_list_free__vala_code_node_unref0_0(var) ((var == NULL) ? NULL : (var = (_g_list_free__vala_code_node_unref0_ (var), NULL)))
#define _vala_gir_parser_alias_unref0(var) ((var == NULL) ? NULL : (var = (vala_gir_parser_alias_unref (var), NULL)))
typedef struct _ValaGirParserAliasPrivate ValaGirParserAliasPrivate;

#define VALA_TYPE_COMMENT (vala_comment_get_type ())
#define VALA_COMMENT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALA_TYPE_COMMENT, ValaComment))
#define VALA_COMMENT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VALA_TYPE_COMMENT, ValaCommentClass))
#define VALA_IS_COMMENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VALA_TYPE_COMMENT))
#define VALA_IS_COMMENT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VALA_TYPE_COMMENT))
#define VALA_COMMENT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VALA_TYPE_COMMENT, ValaCommentClass))

typedef struct _ValaComment ValaComment;
typedef struct _ValaCommentClass ValaCommentClass;

#define VALA_TYPE_SYMBOL_ACCESSIBILITY (vala_symbol_accessibility_get_type ())

#define VALA_TYPE_PARAMETER_DIRECTION (vala_parameter_direction_get_type ())

#define VALA_TYPE_DELEGATE_TYPE (vala_delegate_type_get_type ())
#define VALA_DELEGATE_TYPE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALA_TYPE_DELEGATE_TYPE, ValaDelegateType))
#define VALA_DELEGATE_TYPE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VALA_TYPE_DELEGATE_TYPE, ValaDelegateTypeClass))
#define VALA_IS_DELEGATE_TYPE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VALA_TYPE_DELEGATE_TYPE))
#define VALA_IS_DELEGATE_TYPE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VALA_TYPE_DELEGATE_TYPE))
#define VALA_DELEGATE_TYPE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VALA_TYPE_DELEGATE_TYPE, ValaDelegateTypeClass))

typedef struct _ValaDelegateType ValaDelegateType;
typedef struct _ValaDelegateTypeClass ValaDelegateTypeClass;
typedef struct _ValaGirParserCallbackScopePrivate ValaGirParserCallbackScopePrivate;
#define _vala_gir_parser_callback_scope_unref0(var) ((var == NULL) ? NULL : (var = (vala_gir_parser_callback_scope_unref (var), NULL)))

#define VALA_TYPE_ERROR_TYPE (vala_error_type_get_type ())
#define VALA_ERROR_TYPE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALA_TYPE_ERROR_TYPE, ValaErrorType))
#define VALA_ERROR_TYPE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VALA_TYPE_ERROR_TYPE, ValaErrorTypeClass))
#define VALA_IS_ERROR_TYPE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VALA_TYPE_ERROR_TYPE))
#define VALA_IS_ERROR_TYPE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VALA_TYPE_ERROR_TYPE))
#define VALA_ERROR_TYPE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VALA_TYPE_ERROR_TYPE, ValaErrorTypeClass))

typedef struct _ValaErrorType ValaErrorType;
typedef struct _ValaErrorTypeClass ValaErrorTypeClass;

#define VALA_TYPE_MEMBER_BINDING (vala_member_binding_get_type ())

#define VALA_GIR_PARSER_TYPE_METHOD_INFO (vala_gir_parser_method_info_get_type ())
#define VALA_GIR_PARSER_METHOD_INFO(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALA_GIR_PARSER_TYPE_METHOD_INFO, ValaGirParserMethodInfo))
#define VALA_GIR_PARSER_METHOD_INFO_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VALA_GIR_PARSER_TYPE_METHOD_INFO, ValaGirParserMethodInfoClass))
#define VALA_GIR_PARSER_IS_METHOD_INFO(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VALA_GIR_PARSER_TYPE_METHOD_INFO))
#define VALA_GIR_PARSER_IS_METHOD_INFO_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VALA_GIR_PARSER_TYPE_METHOD_INFO))
#define VALA_GIR_PARSER_METHOD_INFO_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VALA_GIR_PARSER_TYPE_METHOD_INFO, ValaGirParserMethodInfoClass))

typedef struct _ValaGirParserMethodInfo ValaGirParserMethodInfo;
typedef struct _ValaGirParserMethodInfoClass ValaGirParserMethodInfoClass;
typedef struct _ValaGirParserMethodInfoPrivate ValaGirParserMethodInfoPrivate;
#define _vala_gir_parser_method_info_unref0(var) ((var == NULL) ? NULL : (var = (vala_gir_parser_method_info_unref (var), NULL)))
typedef struct _ValaGirParserMetadataPrivate ValaGirParserMetadataPrivate;

#define VALA_GIR_PARSER_TYPE_ARGUMENT (vala_gir_parser_argument_get_type ())
#define VALA_GIR_PARSER_ARGUMENT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALA_GIR_PARSER_TYPE_ARGUMENT, ValaGirParserArgument))
#define VALA_GIR_PARSER_ARGUMENT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VALA_GIR_PARSER_TYPE_ARGUMENT, ValaGirParserArgumentClass))
#define VALA_GIR_PARSER_IS_ARGUMENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VALA_GIR_PARSER_TYPE_ARGUMENT))
#define VALA_GIR_PARSER_IS_ARGUMENT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VALA_GIR_PARSER_TYPE_ARGUMENT))
#define VALA_GIR_PARSER_ARGUMENT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VALA_GIR_PARSER_TYPE_ARGUMENT, ValaGirParserArgumentClass))

typedef struct _ValaGirParserArgument ValaGirParserArgument;
typedef struct _ValaGirParserArgumentClass ValaGirParserArgumentClass;
typedef struct _ValaGirParserArgumentPrivate ValaGirParserArgumentPrivate;
#define _vala_gir_parser_argument_unref0(var) ((var == NULL) ? NULL : (var = (vala_gir_parser_argument_unref (var), NULL)))
#define _vala_scope_unref0(var) ((var == NULL) ? NULL : (var = (vala_scope_unref (var), NULL)))

#define VALA_TYPE_OBJECT_TYPE (vala_object_type_get_type ())
#define VALA_OBJECT_TYPE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALA_TYPE_OBJECT_TYPE, ValaObjectType))
#define VALA_OBJECT_TYPE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VALA_TYPE_OBJECT_TYPE, ValaObjectTypeClass))
#define VALA_IS_OBJECT_TYPE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VALA_TYPE_OBJECT_TYPE))
#define VALA_IS_OBJECT_TYPE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VALA_TYPE_OBJECT_TYPE))
#define VALA_OBJECT_TYPE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VALA_TYPE_OBJECT_TYPE, ValaObjectTypeClass))

typedef struct _ValaObjectType ValaObjectType;
typedef struct _ValaObjectTypeClass ValaObjectTypeClass;
typedef struct _ValaGirParserParamSpecArgument ValaGirParserParamSpecArgument;

#define VALA_GIR_PARSER_TYPE_METADATA_SET (vala_gir_parser_metadata_set_get_type ())
#define VALA_GIR_PARSER_METADATA_SET(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALA_GIR_PARSER_TYPE_METADATA_SET, ValaGirParserMetadataSet))
#define VALA_GIR_PARSER_METADATA_SET_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VALA_GIR_PARSER_TYPE_METADATA_SET, ValaGirParserMetadataSetClass))
#define VALA_GIR_PARSER_IS_METADATA_SET(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VALA_GIR_PARSER_TYPE_METADATA_SET))
#define VALA_GIR_PARSER_IS_METADATA_SET_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VALA_GIR_PARSER_TYPE_METADATA_SET))
#define VALA_GIR_PARSER_METADATA_SET_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VALA_GIR_PARSER_TYPE_METADATA_SET, ValaGirParserMetadataSetClass))

typedef struct _ValaGirParserMetadataSet ValaGirParserMetadataSet;
typedef struct _ValaGirParserMetadataSetClass ValaGirParserMetadataSetClass;
typedef struct _ValaGirParserMetadataSetPrivate ValaGirParserMetadataSetPrivate;
#define _g_pattern_spec_free0(var) ((var == NULL) ? NULL : (var = (g_pattern_spec_free (var), NULL)))
typedef struct _ValaGirParserParamSpecMetadata ValaGirParserParamSpecMetadata;
typedef struct _ValaGirParserMetadataParserPrivate ValaGirParserMetadataParserPrivate;

#define VALA_TYPE_SCANNER (vala_scanner_get_type ())
#define VALA_SCANNER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALA_TYPE_SCANNER, ValaScanner))
#define VALA_SCANNER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VALA_TYPE_SCANNER, ValaScannerClass))
#define VALA_IS_SCANNER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VALA_TYPE_SCANNER))
#define VALA_IS_SCANNER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VALA_TYPE_SCANNER))
#define VALA_SCANNER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VALA_TYPE_SCANNER, ValaScannerClass))

typedef struct _ValaScanner ValaScanner;
typedef struct _ValaScannerClass ValaScannerClass;

#define VALA_TYPE_TOKEN_TYPE (vala_token_type_get_type ())
#define _vala_scanner_unref0(var) ((var == NULL) ? NULL : (var = (vala_scanner_unref (var), NULL)))
typedef struct _ValaGirParserParamSpecMetadataParser ValaGirParserParamSpecMetadataParser;
typedef struct _ValaGirParserParamSpecSymbolInfo ValaGirParserParamSpecSymbolInfo;
typedef struct _ValaGirParserParamSpecCallbackScope ValaGirParserParamSpecCallbackScope;
typedef struct _ValaGirParserParamSpecAlias ValaGirParserParamSpecAlias;
typedef struct _ValaGirParserParamSpecMethodInfo ValaGirParserParamSpecMethodInfo;

struct _ValaCodeVisitor {
      GTypeInstance parent_instance;
      volatile int ref_count;
      ValaCodeVisitorPrivate * priv;
};

struct _ValaCodeVisitorClass {
      GTypeClass parent_class;
      void (*finalize) (ValaCodeVisitor *self);
      void (*visit_source_file) (ValaCodeVisitor* self, ValaSourceFile* source_file);
      void (*visit_namespace) (ValaCodeVisitor* self, ValaNamespace* ns);
      void (*visit_class) (ValaCodeVisitor* self, ValaClass* cl);
      void (*visit_struct) (ValaCodeVisitor* self, ValaStruct* st);
      void (*visit_interface) (ValaCodeVisitor* self, ValaInterface* iface);
      void (*visit_enum) (ValaCodeVisitor* self, ValaEnum* en);
      void (*visit_enum_value) (ValaCodeVisitor* self, ValaEnumValue* ev);
      void (*visit_error_domain) (ValaCodeVisitor* self, ValaErrorDomain* edomain);
      void (*visit_error_code) (ValaCodeVisitor* self, ValaErrorCode* ecode);
      void (*visit_delegate) (ValaCodeVisitor* self, ValaDelegate* d);
      void (*visit_constant) (ValaCodeVisitor* self, ValaConstant* c);
      void (*visit_field) (ValaCodeVisitor* self, ValaField* f);
      void (*visit_method) (ValaCodeVisitor* self, ValaMethod* m);
      void (*visit_creation_method) (ValaCodeVisitor* self, ValaCreationMethod* m);
      void (*visit_formal_parameter) (ValaCodeVisitor* self, ValaParameter* p);
      void (*visit_property) (ValaCodeVisitor* self, ValaProperty* prop);
      void (*visit_property_accessor) (ValaCodeVisitor* self, ValaPropertyAccessor* acc);
      void (*visit_signal) (ValaCodeVisitor* self, ValaSignal* sig);
      void (*visit_constructor) (ValaCodeVisitor* self, ValaConstructor* c);
      void (*visit_destructor) (ValaCodeVisitor* self, ValaDestructor* d);
      void (*visit_type_parameter) (ValaCodeVisitor* self, ValaTypeParameter* p);
      void (*visit_using_directive) (ValaCodeVisitor* self, ValaUsingDirective* ns);
      void (*visit_data_type) (ValaCodeVisitor* self, ValaDataType* type);
      void (*visit_block) (ValaCodeVisitor* self, ValaBlock* b);
      void (*visit_empty_statement) (ValaCodeVisitor* self, ValaEmptyStatement* stmt);
      void (*visit_declaration_statement) (ValaCodeVisitor* self, ValaDeclarationStatement* stmt);
      void (*visit_local_variable) (ValaCodeVisitor* self, ValaLocalVariable* local);
      void (*visit_initializer_list) (ValaCodeVisitor* self, ValaInitializerList* list);
      void (*visit_expression_statement) (ValaCodeVisitor* self, ValaExpressionStatement* stmt);
      void (*visit_if_statement) (ValaCodeVisitor* self, ValaIfStatement* stmt);
      void (*visit_switch_statement) (ValaCodeVisitor* self, ValaSwitchStatement* stmt);
      void (*visit_switch_section) (ValaCodeVisitor* self, ValaSwitchSection* section);
      void (*visit_switch_label) (ValaCodeVisitor* self, ValaSwitchLabel* label);
      void (*visit_loop) (ValaCodeVisitor* self, ValaLoop* stmt);
      void (*visit_while_statement) (ValaCodeVisitor* self, ValaWhileStatement* stmt);
      void (*visit_do_statement) (ValaCodeVisitor* self, ValaDoStatement* stmt);
      void (*visit_for_statement) (ValaCodeVisitor* self, ValaForStatement* stmt);
      void (*visit_foreach_statement) (ValaCodeVisitor* self, ValaForeachStatement* stmt);
      void (*visit_break_statement) (ValaCodeVisitor* self, ValaBreakStatement* stmt);
      void (*visit_continue_statement) (ValaCodeVisitor* self, ValaContinueStatement* stmt);
      void (*visit_return_statement) (ValaCodeVisitor* self, ValaReturnStatement* stmt);
      void (*visit_yield_statement) (ValaCodeVisitor* self, ValaYieldStatement* y);
      void (*visit_throw_statement) (ValaCodeVisitor* self, ValaThrowStatement* stmt);
      void (*visit_try_statement) (ValaCodeVisitor* self, ValaTryStatement* stmt);
      void (*visit_catch_clause) (ValaCodeVisitor* self, ValaCatchClause* clause);
      void (*visit_lock_statement) (ValaCodeVisitor* self, ValaLockStatement* stmt);
      void (*visit_unlock_statement) (ValaCodeVisitor* self, ValaUnlockStatement* stmt);
      void (*visit_delete_statement) (ValaCodeVisitor* self, ValaDeleteStatement* stmt);
      void (*visit_expression) (ValaCodeVisitor* self, ValaExpression* expr);
      void (*visit_array_creation_expression) (ValaCodeVisitor* self, ValaArrayCreationExpression* expr);
      void (*visit_boolean_literal) (ValaCodeVisitor* self, ValaBooleanLiteral* lit);
      void (*visit_character_literal) (ValaCodeVisitor* self, ValaCharacterLiteral* lit);
      void (*visit_integer_literal) (ValaCodeVisitor* self, ValaIntegerLiteral* lit);
      void (*visit_real_literal) (ValaCodeVisitor* self, ValaRealLiteral* lit);
      void (*visit_regex_literal) (ValaCodeVisitor* self, ValaRegexLiteral* lit);
      void (*visit_string_literal) (ValaCodeVisitor* self, ValaStringLiteral* lit);
      void (*visit_template) (ValaCodeVisitor* self, ValaTemplate* tmpl);
      void (*visit_list_literal) (ValaCodeVisitor* self, ValaListLiteral* lit);
      void (*visit_set_literal) (ValaCodeVisitor* self, ValaSetLiteral* lit);
      void (*visit_map_literal) (ValaCodeVisitor* self, ValaMapLiteral* lit);
      void (*visit_tuple) (ValaCodeVisitor* self, ValaTuple* tuple);
      void (*visit_null_literal) (ValaCodeVisitor* self, ValaNullLiteral* lit);
      void (*visit_member_access) (ValaCodeVisitor* self, ValaMemberAccess* expr);
      void (*visit_method_call) (ValaCodeVisitor* self, ValaMethodCall* expr);
      void (*visit_element_access) (ValaCodeVisitor* self, ValaElementAccess* expr);
      void (*visit_slice_expression) (ValaCodeVisitor* self, ValaSliceExpression* expr);
      void (*visit_base_access) (ValaCodeVisitor* self, ValaBaseAccess* expr);
      void (*visit_postfix_expression) (ValaCodeVisitor* self, ValaPostfixExpression* expr);
      void (*visit_object_creation_expression) (ValaCodeVisitor* self, ValaObjectCreationExpression* expr);
      void (*visit_sizeof_expression) (ValaCodeVisitor* self, ValaSizeofExpression* expr);
      void (*visit_typeof_expression) (ValaCodeVisitor* self, ValaTypeofExpression* expr);
      void (*visit_unary_expression) (ValaCodeVisitor* self, ValaUnaryExpression* expr);
      void (*visit_cast_expression) (ValaCodeVisitor* self, ValaCastExpression* expr);
      void (*visit_named_argument) (ValaCodeVisitor* self, ValaNamedArgument* expr);
      void (*visit_pointer_indirection) (ValaCodeVisitor* self, ValaPointerIndirection* expr);
      void (*visit_addressof_expression) (ValaCodeVisitor* self, ValaAddressofExpression* expr);
      void (*visit_reference_transfer_expression) (ValaCodeVisitor* self, ValaReferenceTransferExpression* expr);
      void (*visit_binary_expression) (ValaCodeVisitor* self, ValaBinaryExpression* expr);
      void (*visit_type_check) (ValaCodeVisitor* self, ValaTypeCheck* expr);
      void (*visit_conditional_expression) (ValaCodeVisitor* self, ValaConditionalExpression* expr);
      void (*visit_lambda_expression) (ValaCodeVisitor* self, ValaLambdaExpression* expr);
      void (*visit_assignment) (ValaCodeVisitor* self, ValaAssignment* a);
      void (*visit_end_full_expression) (ValaCodeVisitor* self, ValaExpression* expr);
};

struct _ValaGirParser {
      ValaCodeVisitor parent_instance;
      ValaGirParserPrivate * priv;
};

struct _ValaGirParserClass {
      ValaCodeVisitorClass parent_class;
};

struct _ValaSourceLocation {
      gchar* pos;
      gint line;
      gint column;
};

typedef enum  {
      VALA_MARKUP_TOKEN_TYPE_NONE,
      VALA_MARKUP_TOKEN_TYPE_START_ELEMENT,
      VALA_MARKUP_TOKEN_TYPE_END_ELEMENT,
      VALA_MARKUP_TOKEN_TYPE_TEXT,
      VALA_MARKUP_TOKEN_TYPE_EOF
} ValaMarkupTokenType;

01376 struct _ValaGirParserPrivate {
      ValaMarkupReader* reader;
      ValaCodeContext* context;
      ValaNamespace* glib_ns;
      ValaSourceFile* current_source_file;
      ValaNamespace* current_namespace;
      gchar* current_gtype_struct_for;
      ValaSourceLocation begin;
      ValaSourceLocation end;
      ValaMarkupTokenType current_token;
      gchar** cheader_filenames;
      gint cheader_filenames_length1;
      gint _cheader_filenames_size_;
      ValaArrayList* metadata_stack;
      ValaGirParserMetadata* metadata;
      ValaArrayList* girdata_stack;
      ValaHashMap* girdata;
      ValaHashMap* current_symbols_info;
      ValaHashMap* unresolved_symbols_map;
      ValaHashMap* concrete_symbols_map;
      ValaArrayList* unresolved_gir_symbols;
      ValaHashMap* symbol_reparent_map;
      ValaHashMap* namespace_methods;
      ValaHashMap* gtype_callbacks;
      ValaArrayList* aliases;
      ValaArrayList* interfaces;
};

typedef enum  {
      VALA_GIR_PARSER_METADATA_TYPE_GENERIC,
      VALA_GIR_PARSER_METADATA_TYPE_PROPERTY,
      VALA_GIR_PARSER_METADATA_TYPE_SIGNAL
} ValaGirParserMetadataType;

typedef enum  {
      VALA_GIR_PARSER_ARGUMENT_TYPE_SKIP,
      VALA_GIR_PARSER_ARGUMENT_TYPE_HIDDEN,
      VALA_GIR_PARSER_ARGUMENT_TYPE_TYPE,
      VALA_GIR_PARSER_ARGUMENT_TYPE_TYPE_ARGUMENTS,
      VALA_GIR_PARSER_ARGUMENT_TYPE_CHEADER_FILENAME,
      VALA_GIR_PARSER_ARGUMENT_TYPE_NAME,
      VALA_GIR_PARSER_ARGUMENT_TYPE_OWNED,
      VALA_GIR_PARSER_ARGUMENT_TYPE_UNOWNED,
      VALA_GIR_PARSER_ARGUMENT_TYPE_PARENT,
      VALA_GIR_PARSER_ARGUMENT_TYPE_NULLABLE,
      VALA_GIR_PARSER_ARGUMENT_TYPE_DEPRECATED,
      VALA_GIR_PARSER_ARGUMENT_TYPE_REPLACEMENT,
      VALA_GIR_PARSER_ARGUMENT_TYPE_DEPRECATED_SINCE,
      VALA_GIR_PARSER_ARGUMENT_TYPE_ARRAY,
      VALA_GIR_PARSER_ARGUMENT_TYPE_ARRAY_LENGTH_POS,
      VALA_GIR_PARSER_ARGUMENT_TYPE_DEFAULT,
      VALA_GIR_PARSER_ARGUMENT_TYPE_OUT,
      VALA_GIR_PARSER_ARGUMENT_TYPE_REF,
      VALA_GIR_PARSER_ARGUMENT_TYPE_VFUNC_NAME,
      VALA_GIR_PARSER_ARGUMENT_TYPE_VIRTUAL,
      VALA_GIR_PARSER_ARGUMENT_TYPE_ABSTRACT
} ValaGirParserArgumentType;

typedef enum  {
      VALA_SOURCE_FILE_TYPE_NONE,
      VALA_SOURCE_FILE_TYPE_SOURCE,
      VALA_SOURCE_FILE_TYPE_PACKAGE,
      VALA_SOURCE_FILE_TYPE_FAST
} ValaSourceFileType;

01441 struct _ValaGirParserSymbolInfo {
      GTypeInstance parent_instance;
      volatile int ref_count;
      ValaGirParserSymbolInfoPrivate * priv;
      ValaSymbol* symbol;
      ValaGirParserMetadata* metadata;
      ValaHashMap* girdata;
};

01450 struct _ValaGirParserSymbolInfoClass {
      GTypeClass parent_class;
      void (*finalize) (ValaGirParserSymbolInfo *self);
};

struct _ValaCodeNode {
      GTypeInstance parent_instance;
      volatile int ref_count;
      ValaCodeNodePrivate * priv;
      GList* attributes;
};

struct _ValaCodeNodeClass {
      GTypeClass parent_class;
      void (*finalize) (ValaCodeNode *self);
      void (*accept) (ValaCodeNode* self, ValaCodeVisitor* visitor);
      void (*accept_children) (ValaCodeNode* self, ValaCodeVisitor* visitor);
      gboolean (*check) (ValaCodeNode* self, ValaCodeContext* context);
      void (*emit) (ValaCodeNode* self, ValaCodeGenerator* codegen);
      void (*replace_type) (ValaCodeNode* self, ValaDataType* old_type, ValaDataType* new_type);
      void (*replace_expression) (ValaCodeNode* self, ValaExpression* old_node, ValaExpression* new_node);
      gchar* (*to_string) (ValaCodeNode* self);
      void (*get_defined_variables) (ValaCodeNode* self, ValaCollection* collection);
      void (*get_used_variables) (ValaCodeNode* self, ValaCollection* collection);
};

01476 struct _ValaGirParserAlias {
      GTypeInstance parent_instance;
      volatile int ref_count;
      ValaGirParserAliasPrivate * priv;
      gchar* name;
      ValaDataType* base_type;
      ValaNamespace* parent_namespace;
      ValaSourceReference* source_reference;
};

01486 struct _ValaGirParserAliasClass {
      GTypeClass parent_class;
      void (*finalize) (ValaGirParserAlias *self);
};

typedef enum  {
      VALA_SYMBOL_ACCESSIBILITY_PRIVATE,
      VALA_SYMBOL_ACCESSIBILITY_INTERNAL,
      VALA_SYMBOL_ACCESSIBILITY_PROTECTED,
      VALA_SYMBOL_ACCESSIBILITY_PUBLIC
} ValaSymbolAccessibility;

typedef enum  {
      VALA_PARAMETER_DIRECTION_IN,
      VALA_PARAMETER_DIRECTION_OUT,
      VALA_PARAMETER_DIRECTION_REF
} ValaParameterDirection;

01504 struct _ValaGirParserCallbackScope {
      GTypeInstance parent_instance;
      volatile int ref_count;
      ValaGirParserCallbackScopePrivate * priv;
      ValaNamespace* parent_namespace;
      ValaUnresolvedSymbol* gtype_struct_for;
};

01512 struct _ValaGirParserCallbackScopeClass {
      GTypeClass parent_class;
      void (*finalize) (ValaGirParserCallbackScope *self);
};

typedef enum  {
      VALA_MEMBER_BINDING_INSTANCE,
      VALA_MEMBER_BINDING_CLASS,
      VALA_MEMBER_BINDING_STATIC
} ValaMemberBinding;

01523 struct _ValaGirParserMethodInfo {
      GTypeInstance parent_instance;
      volatile int ref_count;
      ValaGirParserMethodInfoPrivate * priv;
      ValaParameter* param;
      gfloat vala_idx;
      gint array_length_idx;
      gint closure_idx;
      gint destroy_idx;
      gboolean keep;
};

01535 struct _ValaGirParserMethodInfoClass {
      GTypeClass parent_class;
      void (*finalize) (ValaGirParserMethodInfo *self);
};

01540 struct _ValaGirParserMetadata {
      GTypeInstance parent_instance;
      volatile int ref_count;
      ValaGirParserMetadataPrivate * priv;
      gchar* pattern;
      GPatternSpec* pattern_spec;
      ValaGirParserMetadataType type;
      ValaSourceReference* source_reference;
      gboolean used;
      ValaMap* args;
      ValaArrayList* children;
};

01553 struct _ValaGirParserMetadataClass {
      GTypeClass parent_class;
      void (*finalize) (ValaGirParserMetadata *self);
};

01558 struct _ValaGirParserArgument {
      GTypeInstance parent_instance;
      volatile int ref_count;
      ValaGirParserArgumentPrivate * priv;
      ValaExpression* expression;
      ValaSourceReference* source_reference;
      gboolean used;
};

01567 struct _ValaGirParserArgumentClass {
      GTypeClass parent_class;
      void (*finalize) (ValaGirParserArgument *self);
};

01572 struct _ValaGirParserParamSpecArgument {
      GParamSpec parent_instance;
};

01576 struct _ValaGirParserMetadataSet {
      ValaGirParserMetadata parent_instance;
      ValaGirParserMetadataSetPrivate * priv;
};

01581 struct _ValaGirParserMetadataSetClass {
      ValaGirParserMetadataClass parent_class;
};

01585 struct _ValaGirParserParamSpecMetadata {
      GParamSpec parent_instance;
};

01589 struct _ValaGirParserMetadataParser {
      GTypeInstance parent_instance;
      volatile int ref_count;
      ValaGirParserMetadataParserPrivate * priv;
};

01595 struct _ValaGirParserMetadataParserClass {
      GTypeClass parent_class;
      void (*finalize) (ValaGirParserMetadataParser *self);
};

typedef enum  {
      VALA_TOKEN_TYPE_NONE,
      VALA_TOKEN_TYPE_ABSTRACT,
      VALA_TOKEN_TYPE_AS,
      VALA_TOKEN_TYPE_ASSIGN,
      VALA_TOKEN_TYPE_ASSIGN_ADD,
      VALA_TOKEN_TYPE_ASSIGN_BITWISE_AND,
      VALA_TOKEN_TYPE_ASSIGN_BITWISE_OR,
      VALA_TOKEN_TYPE_ASSIGN_BITWISE_XOR,
      VALA_TOKEN_TYPE_ASSIGN_DIV,
      VALA_TOKEN_TYPE_ASSIGN_MUL,
      VALA_TOKEN_TYPE_ASSIGN_PERCENT,
      VALA_TOKEN_TYPE_ASSIGN_SHIFT_LEFT,
      VALA_TOKEN_TYPE_ASSIGN_SUB,
      VALA_TOKEN_TYPE_ASYNC,
      VALA_TOKEN_TYPE_BASE,
      VALA_TOKEN_TYPE_BITWISE_AND,
      VALA_TOKEN_TYPE_BITWISE_OR,
      VALA_TOKEN_TYPE_BREAK,
      VALA_TOKEN_TYPE_CARRET,
      VALA_TOKEN_TYPE_CASE,
      VALA_TOKEN_TYPE_CATCH,
      VALA_TOKEN_TYPE_CHARACTER_LITERAL,
      VALA_TOKEN_TYPE_CLASS,
      VALA_TOKEN_TYPE_CLOSE_BRACE,
      VALA_TOKEN_TYPE_CLOSE_BRACKET,
      VALA_TOKEN_TYPE_CLOSE_PARENS,
      VALA_TOKEN_TYPE_CLOSE_REGEX_LITERAL,
      VALA_TOKEN_TYPE_CLOSE_TEMPLATE,
      VALA_TOKEN_TYPE_COLON,
      VALA_TOKEN_TYPE_COMMA,
      VALA_TOKEN_TYPE_CONST,
      VALA_TOKEN_TYPE_CONSTRUCT,
      VALA_TOKEN_TYPE_CONTINUE,
      VALA_TOKEN_TYPE_DEFAULT,
      VALA_TOKEN_TYPE_DELEGATE,
      VALA_TOKEN_TYPE_DELETE,
      VALA_TOKEN_TYPE_DIV,
      VALA_TOKEN_TYPE_DO,
      VALA_TOKEN_TYPE_DOUBLE_COLON,
      VALA_TOKEN_TYPE_DOT,
      VALA_TOKEN_TYPE_DYNAMIC,
      VALA_TOKEN_TYPE_ELLIPSIS,
      VALA_TOKEN_TYPE_ELSE,
      VALA_TOKEN_TYPE_ENUM,
      VALA_TOKEN_TYPE_ENSURES,
      VALA_TOKEN_TYPE_ERRORDOMAIN,
      VALA_TOKEN_TYPE_EOF,
      VALA_TOKEN_TYPE_EXTERN,
      VALA_TOKEN_TYPE_FALSE,
      VALA_TOKEN_TYPE_FINALLY,
      VALA_TOKEN_TYPE_FOR,
      VALA_TOKEN_TYPE_FOREACH,
      VALA_TOKEN_TYPE_GET,
      VALA_TOKEN_TYPE_HASH,
      VALA_TOKEN_TYPE_IDENTIFIER,
      VALA_TOKEN_TYPE_IF,
      VALA_TOKEN_TYPE_IN,
      VALA_TOKEN_TYPE_INLINE,
      VALA_TOKEN_TYPE_INTEGER_LITERAL,
      VALA_TOKEN_TYPE_INTERFACE,
      VALA_TOKEN_TYPE_INTERNAL,
      VALA_TOKEN_TYPE_INTERR,
      VALA_TOKEN_TYPE_IS,
      VALA_TOKEN_TYPE_LAMBDA,
      VALA_TOKEN_TYPE_LOCK,
      VALA_TOKEN_TYPE_MINUS,
      VALA_TOKEN_TYPE_NAMESPACE,
      VALA_TOKEN_TYPE_NEW,
      VALA_TOKEN_TYPE_NULL,
      VALA_TOKEN_TYPE_OUT,
      VALA_TOKEN_TYPE_OP_AND,
      VALA_TOKEN_TYPE_OP_COALESCING,
      VALA_TOKEN_TYPE_OP_DEC,
      VALA_TOKEN_TYPE_OP_EQ,
      VALA_TOKEN_TYPE_OP_GE,
      VALA_TOKEN_TYPE_OP_GT,
      VALA_TOKEN_TYPE_OP_INC,
      VALA_TOKEN_TYPE_OP_LE,
      VALA_TOKEN_TYPE_OP_LT,
      VALA_TOKEN_TYPE_OP_NE,
      VALA_TOKEN_TYPE_OP_NEG,
      VALA_TOKEN_TYPE_OP_OR,
      VALA_TOKEN_TYPE_OP_PTR,
      VALA_TOKEN_TYPE_OP_SHIFT_LEFT,
      VALA_TOKEN_TYPE_OPEN_BRACE,
      VALA_TOKEN_TYPE_OPEN_BRACKET,
      VALA_TOKEN_TYPE_OPEN_PARENS,
      VALA_TOKEN_TYPE_OPEN_REGEX_LITERAL,
      VALA_TOKEN_TYPE_OPEN_TEMPLATE,
      VALA_TOKEN_TYPE_OVERRIDE,
      VALA_TOKEN_TYPE_OWNED,
      VALA_TOKEN_TYPE_PARAMS,
      VALA_TOKEN_TYPE_PERCENT,
      VALA_TOKEN_TYPE_PLUS,
      VALA_TOKEN_TYPE_PRIVATE,
      VALA_TOKEN_TYPE_PROTECTED,
      VALA_TOKEN_TYPE_PUBLIC,
      VALA_TOKEN_TYPE_REAL_LITERAL,
      VALA_TOKEN_TYPE_REF,
      VALA_TOKEN_TYPE_REGEX_LITERAL,
      VALA_TOKEN_TYPE_REQUIRES,
      VALA_TOKEN_TYPE_RETURN,
      VALA_TOKEN_TYPE_SEALED,
      VALA_TOKEN_TYPE_SEMICOLON,
      VALA_TOKEN_TYPE_SET,
      VALA_TOKEN_TYPE_SIGNAL,
      VALA_TOKEN_TYPE_SIZEOF,
      VALA_TOKEN_TYPE_STAR,
      VALA_TOKEN_TYPE_STATIC,
      VALA_TOKEN_TYPE_STRING_LITERAL,
      VALA_TOKEN_TYPE_STRUCT,
      VALA_TOKEN_TYPE_SWITCH,
      VALA_TOKEN_TYPE_TEMPLATE_STRING_LITERAL,
      VALA_TOKEN_TYPE_THIS,
      VALA_TOKEN_TYPE_THROW,
      VALA_TOKEN_TYPE_THROWS,
      VALA_TOKEN_TYPE_TILDE,
      VALA_TOKEN_TYPE_TRUE,
      VALA_TOKEN_TYPE_TRY,
      VALA_TOKEN_TYPE_TYPEOF,
      VALA_TOKEN_TYPE_UNOWNED,
      VALA_TOKEN_TYPE_USING,
      VALA_TOKEN_TYPE_VAR,
      VALA_TOKEN_TYPE_VERBATIM_STRING_LITERAL,
      VALA_TOKEN_TYPE_VIRTUAL,
      VALA_TOKEN_TYPE_VOID,
      VALA_TOKEN_TYPE_VOLATILE,
      VALA_TOKEN_TYPE_WEAK,
      VALA_TOKEN_TYPE_WHILE,
      VALA_TOKEN_TYPE_YIELD
} ValaTokenType;

01733 struct _ValaGirParserMetadataParserPrivate {
      ValaGirParserMetadata* tree;
      ValaScanner* scanner;
      ValaSourceLocation begin;
      ValaSourceLocation end;
      ValaSourceLocation old_end;
      ValaTokenType current;
      ValaGirParserMetadata* parent_metadata;
};

01743 struct _ValaGirParserParamSpecMetadataParser {
      GParamSpec parent_instance;
};

01747 struct _ValaGirParserParamSpecSymbolInfo {
      GParamSpec parent_instance;
};

01751 struct _ValaGirParserParamSpecCallbackScope {
      GParamSpec parent_instance;
};

01755 struct _ValaGirParserParamSpecAlias {
      GParamSpec parent_instance;
};

01759 struct _ValaGirParserParamSpecMethodInfo {
      GParamSpec parent_instance;
};


static gpointer vala_gir_parser_parent_class = NULL;
static GRegex* vala_gir_parser_type_from_string_regex;
static GRegex* vala_gir_parser_type_from_string_regex = NULL;
static gpointer vala_gir_parser_argument_parent_class = NULL;
static gpointer vala_gir_parser_metadata_set_parent_class = NULL;
static gpointer vala_gir_parser_metadata_parent_class = NULL;
static ValaGirParserMetadata* vala_gir_parser_metadata__empty;
static ValaGirParserMetadata* vala_gir_parser_metadata__empty = NULL;
static gpointer vala_gir_parser_metadata_parser_parent_class = NULL;
static gpointer vala_gir_parser_symbol_info_parent_class = NULL;
static gpointer vala_gir_parser_callback_scope_parent_class = NULL;
static gpointer vala_gir_parser_alias_parent_class = NULL;
static gpointer vala_gir_parser_method_info_parent_class = NULL;

gpointer vala_code_visitor_ref (gpointer instance);
void vala_code_visitor_unref (gpointer instance);
GParamSpec* vala_param_spec_code_visitor (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void vala_value_set_code_visitor (GValue* value, gpointer v_object);
void vala_value_take_code_visitor (GValue* value, gpointer v_object);
gpointer vala_value_get_code_visitor (const GValue* value);
GType vala_code_visitor_get_type (void) G_GNUC_CONST;
gpointer vala_source_file_ref (gpointer instance);
void vala_source_file_unref (gpointer instance);
GParamSpec* vala_param_spec_source_file (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void vala_value_set_source_file (GValue* value, gpointer v_object);
void vala_value_take_source_file (GValue* value, gpointer v_object);
gpointer vala_value_get_source_file (const GValue* value);
GType vala_source_file_get_type (void) G_GNUC_CONST;
gpointer vala_code_node_ref (gpointer instance);
void vala_code_node_unref (gpointer instance);
GParamSpec* vala_param_spec_code_node (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void vala_value_set_code_node (GValue* value, gpointer v_object);
void vala_value_take_code_node (GValue* value, gpointer v_object);
gpointer vala_value_get_code_node (const GValue* value);
GType vala_code_node_get_type (void) G_GNUC_CONST;
GType vala_symbol_get_type (void) G_GNUC_CONST;
GType vala_namespace_get_type (void) G_GNUC_CONST;
GType vala_typesymbol_get_type (void) G_GNUC_CONST;
GType vala_object_type_symbol_get_type (void) G_GNUC_CONST;
GType vala_class_get_type (void) G_GNUC_CONST;
GType vala_struct_get_type (void) G_GNUC_CONST;
GType vala_interface_get_type (void) G_GNUC_CONST;
GType vala_enum_get_type (void) G_GNUC_CONST;
GType vala_constant_get_type (void) G_GNUC_CONST;
GType vala_enum_value_get_type (void) G_GNUC_CONST;
GType vala_error_domain_get_type (void) G_GNUC_CONST;
GType vala_error_code_get_type (void) G_GNUC_CONST;
GType vala_delegate_get_type (void) G_GNUC_CONST;
GType vala_variable_get_type (void) G_GNUC_CONST;
GType vala_field_get_type (void) G_GNUC_CONST;
GType vala_subroutine_get_type (void) G_GNUC_CONST;
GType vala_method_get_type (void) G_GNUC_CONST;
GType vala_creation_method_get_type (void) G_GNUC_CONST;
GType vala_parameter_get_type (void) G_GNUC_CONST;
GType vala_property_get_type (void) G_GNUC_CONST;
GType vala_property_accessor_get_type (void) G_GNUC_CONST;
GType vala_signal_get_type (void) G_GNUC_CONST;
GType vala_constructor_get_type (void) G_GNUC_CONST;
GType vala_destructor_get_type (void) G_GNUC_CONST;
GType vala_typeparameter_get_type (void) G_GNUC_CONST;
GType vala_using_directive_get_type (void) G_GNUC_CONST;
GType vala_data_type_get_type (void) G_GNUC_CONST;
GType vala_block_get_type (void) G_GNUC_CONST;
GType vala_empty_statement_get_type (void) G_GNUC_CONST;
GType vala_declaration_statement_get_type (void) G_GNUC_CONST;
GType vala_local_variable_get_type (void) G_GNUC_CONST;
GType vala_expression_get_type (void) G_GNUC_CONST;
GType vala_initializer_list_get_type (void) G_GNUC_CONST;
GType vala_expression_statement_get_type (void) G_GNUC_CONST;
GType vala_if_statement_get_type (void) G_GNUC_CONST;
GType vala_switch_statement_get_type (void) G_GNUC_CONST;
GType vala_switch_section_get_type (void) G_GNUC_CONST;
GType vala_switch_label_get_type (void) G_GNUC_CONST;
GType vala_loop_get_type (void) G_GNUC_CONST;
GType vala_while_statement_get_type (void) G_GNUC_CONST;
GType vala_do_statement_get_type (void) G_GNUC_CONST;
GType vala_for_statement_get_type (void) G_GNUC_CONST;
GType vala_foreach_statement_get_type (void) G_GNUC_CONST;
GType vala_break_statement_get_type (void) G_GNUC_CONST;
GType vala_continue_statement_get_type (void) G_GNUC_CONST;
GType vala_return_statement_get_type (void) G_GNUC_CONST;
GType vala_yield_statement_get_type (void) G_GNUC_CONST;
GType vala_throw_statement_get_type (void) G_GNUC_CONST;
GType vala_try_statement_get_type (void) G_GNUC_CONST;
GType vala_catch_clause_get_type (void) G_GNUC_CONST;
GType vala_lock_statement_get_type (void) G_GNUC_CONST;
GType vala_unlock_statement_get_type (void) G_GNUC_CONST;
GType vala_delete_statement_get_type (void) G_GNUC_CONST;
GType vala_array_creation_expression_get_type (void) G_GNUC_CONST;
GType vala_literal_get_type (void) G_GNUC_CONST;
GType vala_boolean_literal_get_type (void) G_GNUC_CONST;
GType vala_character_literal_get_type (void) G_GNUC_CONST;
GType vala_integer_literal_get_type (void) G_GNUC_CONST;
GType vala_real_literal_get_type (void) G_GNUC_CONST;
GType vala_regex_literal_get_type (void) G_GNUC_CONST;
GType vala_string_literal_get_type (void) G_GNUC_CONST;
GType vala_template_get_type (void) G_GNUC_CONST;
GType vala_list_literal_get_type (void) G_GNUC_CONST;
GType vala_set_literal_get_type (void) G_GNUC_CONST;
GType vala_map_literal_get_type (void) G_GNUC_CONST;
GType vala_tuple_get_type (void) G_GNUC_CONST;
GType vala_null_literal_get_type (void) G_GNUC_CONST;
GType vala_member_access_get_type (void) G_GNUC_CONST;
GType vala_method_call_get_type (void) G_GNUC_CONST;
GType vala_element_access_get_type (void) G_GNUC_CONST;
GType vala_slice_expression_get_type (void) G_GNUC_CONST;
GType vala_base_access_get_type (void) G_GNUC_CONST;
GType vala_postfix_expression_get_type (void) G_GNUC_CONST;
GType vala_object_creation_expression_get_type (void) G_GNUC_CONST;
GType vala_sizeof_expression_get_type (void) G_GNUC_CONST;
GType vala_typeof_expression_get_type (void) G_GNUC_CONST;
GType vala_unary_expression_get_type (void) G_GNUC_CONST;
GType vala_cast_expression_get_type (void) G_GNUC_CONST;
GType vala_named_argument_get_type (void) G_GNUC_CONST;
GType vala_pointer_indirection_get_type (void) G_GNUC_CONST;
GType vala_addressof_expression_get_type (void) G_GNUC_CONST;
GType vala_reference_transfer_expression_get_type (void) G_GNUC_CONST;
GType vala_binary_expression_get_type (void) G_GNUC_CONST;
GType vala_typecheck_get_type (void) G_GNUC_CONST;
GType vala_conditional_expression_get_type (void) G_GNUC_CONST;
GType vala_lambda_expression_get_type (void) G_GNUC_CONST;
GType vala_assignment_get_type (void) G_GNUC_CONST;
GType vala_gir_parser_get_type (void) G_GNUC_CONST;
GType vala_markup_reader_get_type (void) G_GNUC_CONST;
gpointer vala_code_context_ref (gpointer instance);
void vala_code_context_unref (gpointer instance);
GParamSpec* vala_param_spec_code_context (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void vala_value_set_code_context (GValue* value, gpointer v_object);
void vala_value_take_code_context (GValue* value, gpointer v_object);
gpointer vala_value_get_code_context (const GValue* value);
GType vala_code_context_get_type (void) G_GNUC_CONST;
GType vala_source_location_get_type (void) G_GNUC_CONST;
ValaSourceLocation* vala_source_location_dup (const ValaSourceLocation* self);
void vala_source_location_free (ValaSourceLocation* self);
GType vala_markup_token_type_get_type (void) G_GNUC_CONST;
static gpointer vala_gir_parser_metadata_ref (gpointer instance);
static void vala_gir_parser_metadata_unref (gpointer instance);
static GParamSpec* vala_gir_parser_param_spec_metadata (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) G_GNUC_UNUSED;
static void vala_gir_parser_value_set_metadata (GValue* value, gpointer v_object) G_GNUC_UNUSED;
static void vala_gir_parser_value_take_metadata (GValue* value, gpointer v_object) G_GNUC_UNUSED;
static gpointer vala_gir_parser_value_get_metadata (const GValue* value) G_GNUC_UNUSED;
static GType vala_gir_parser_metadata_get_type (void) G_GNUC_CONST G_GNUC_UNUSED;
static gpointer vala_gir_parser_symbol_info_ref (gpointer instance);
static void vala_gir_parser_symbol_info_unref (gpointer instance);
static GParamSpec* vala_gir_parser_param_spec_symbol_info (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) G_GNUC_UNUSED;
static void vala_gir_parser_value_set_symbol_info (GValue* value, gpointer v_object) G_GNUC_UNUSED;
static void vala_gir_parser_value_take_symbol_info (GValue* value, gpointer v_object) G_GNUC_UNUSED;
static gpointer vala_gir_parser_value_get_symbol_info (const GValue* value) G_GNUC_UNUSED;
static GType vala_gir_parser_symbol_info_get_type (void) G_GNUC_CONST G_GNUC_UNUSED;
GType vala_unresolved_symbol_get_type (void) G_GNUC_CONST;
static gpointer vala_gir_parser_callback_scope_ref (gpointer instance);
static void vala_gir_parser_callback_scope_unref (gpointer instance);
static GParamSpec* vala_gir_parser_param_spec_callback_scope (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) G_GNUC_UNUSED;
static void vala_gir_parser_value_set_callback_scope (GValue* value, gpointer v_object) G_GNUC_UNUSED;
static void vala_gir_parser_value_take_callback_scope (GValue* value, gpointer v_object) G_GNUC_UNUSED;
static gpointer vala_gir_parser_value_get_callback_scope (const GValue* value) G_GNUC_UNUSED;
static GType vala_gir_parser_callback_scope_get_type (void) G_GNUC_CONST G_GNUC_UNUSED;
static gpointer vala_gir_parser_alias_ref (gpointer instance);
static void vala_gir_parser_alias_unref (gpointer instance);
static GParamSpec* vala_gir_parser_param_spec_alias (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) G_GNUC_UNUSED;
static void vala_gir_parser_value_set_alias (GValue* value, gpointer v_object) G_GNUC_UNUSED;
static void vala_gir_parser_value_take_alias (GValue* value, gpointer v_object) G_GNUC_UNUSED;
static gpointer vala_gir_parser_value_get_alias (const GValue* value) G_GNUC_UNUSED;
static GType vala_gir_parser_alias_get_type (void) G_GNUC_CONST G_GNUC_UNUSED;
#define VALA_GIR_PARSER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), VALA_TYPE_GIR_PARSER, ValaGirParserPrivate))
enum  {
      VALA_GIR_PARSER_DUMMY_PROPERTY
};
static GType vala_gir_parser_metadata_type_get_type (void) G_GNUC_UNUSED;
static GType vala_gir_parser_argument_type_get_type (void) G_GNUC_UNUSED;
static ValaGirParserArgumentType* vala_gir_parser_argument_type_from_string (const gchar* name);
static ValaGirParserArgumentType* _vala_gir_parser_argument_type_dup (ValaGirParserArgumentType* self);
static guint vala_gir_parser_unresolved_symbol_hash (void* ptr);
static guint _vala_gir_parser_unresolved_symbol_hash_ghash_func (gconstpointer key);
static gboolean vala_gir_parser_unresolved_symbol_equal (void* ptr1, void* ptr2);
static gboolean _vala_gir_parser_unresolved_symbol_equal_gequal_func (gconstpointer a, gconstpointer b);
static guint vala_gir_parser_callback_scope_hash (void* ptr);
static guint _vala_gir_parser_callback_scope_hash_ghash_func (gconstpointer key);
static gboolean vala_gir_parser_callback_scope_equal (void* ptr1, void* ptr2);
static gboolean _vala_gir_parser_callback_scope_equal_gequal_func (gconstpointer a, gconstpointer b);
#define VALA_GIR_PARSER_GIR_VERSION "1.2"
void vala_gir_parser_parse (ValaGirParser* self, ValaCodeContext* context);
ValaNamespace* vala_code_context_get_root (ValaCodeContext* self);
gpointer vala_scope_ref (gpointer instance);
void vala_scope_unref (gpointer instance);
GParamSpec* vala_param_spec_scope (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void vala_value_set_scope (GValue* value, gpointer v_object);
void vala_value_take_scope (GValue* value, gpointer v_object);
gpointer vala_value_get_scope (const GValue* value);
GType vala_scope_get_type (void) G_GNUC_CONST;
ValaScope* vala_symbol_get_scope (ValaSymbol* self);
ValaSymbol* vala_scope_lookup (ValaScope* self, const gchar* name);
void vala_code_context_accept (ValaCodeContext* self, ValaCodeVisitor* visitor);
static void vala_gir_parser_resolve_gir_symbols (ValaGirParser* self);
static void vala_gir_parser_postprocess_interfaces (ValaGirParser* self);
static void vala_gir_parser_postprocess_reparenting (ValaGirParser* self);
static void vala_gir_parser_postprocess_gtype_callbacks (ValaGirParser* self);
static void vala_gir_parser_postprocess_aliases (ValaGirParser* self);
static void vala_gir_parser_postprocess_namespace_methods (ValaGirParser* self);
static void vala_gir_parser_real_visit_source_file (ValaCodeVisitor* base, ValaSourceFile* source_file);
ValaList* vala_source_file_get_nodes (ValaSourceFile* self);
const gchar* vala_source_file_get_gir_namespace (ValaSourceFile* self);
GType vala_attribute_get_type (void) G_GNUC_CONST;
ValaAttribute* vala_code_node_get_attribute (ValaCodeNode* self, const gchar* name);
gboolean vala_attribute_has_argument (ValaAttribute* self, const gchar* name);
gchar* vala_attribute_get_string (ValaAttribute* self, const gchar* name);
const gchar* vala_symbol_get_name (ValaSymbol* self);
gpointer vala_source_reference_ref (gpointer instance);
void vala_source_reference_unref (gpointer instance);
GParamSpec* vala_param_spec_source_reference (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void vala_value_set_source_reference (GValue* value, gpointer v_object);
void vala_value_take_source_reference (GValue* value, gpointer v_object);
gpointer vala_value_get_source_reference (const GValue* value);
GType vala_source_reference_get_type (void) G_GNUC_CONST;
ValaUnresolvedSymbol* vala_unresolved_symbol_new (ValaUnresolvedSymbol* inner, const gchar* name, ValaSourceReference* source_reference);
ValaUnresolvedSymbol* vala_unresolved_symbol_construct (GType object_type, ValaUnresolvedSymbol* inner, const gchar* name, ValaSourceReference* source_reference);
static void vala_gir_parser_set_symbol_mapping (ValaGirParser* self, ValaSymbol* map_from, ValaSymbol* map_to);
const gchar* vala_source_file_get_filename (ValaSourceFile* self);
void vala_gir_parser_parse_file (ValaGirParser* self, ValaSourceFile* source_file);
static ValaGirParserMetadata* vala_gir_parser_metadata_get_empty (void);
static ValaGirParserMetadataParser* vala_gir_parser_metadata_parser_new (void);
static ValaGirParserMetadataParser* vala_gir_parser_metadata_parser_construct (GType object_type);
static gpointer vala_gir_parser_metadata_parser_ref (gpointer instance);
static void vala_gir_parser_metadata_parser_unref (gpointer instance);
static GParamSpec* vala_gir_parser_param_spec_metadata_parser (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) G_GNUC_UNUSED;
static void vala_gir_parser_value_set_metadata_parser (GValue* value, gpointer v_object) G_GNUC_UNUSED;
static void vala_gir_parser_value_take_metadata_parser (GValue* value, gpointer v_object) G_GNUC_UNUSED;
static gpointer vala_gir_parser_value_get_metadata_parser (const GValue* value) G_GNUC_UNUSED;
static GType vala_gir_parser_metadata_parser_get_type (void) G_GNUC_CONST G_GNUC_UNUSED;
GType vala_source_file_type_get_type (void) G_GNUC_CONST;
ValaSourceFileType vala_source_file_get_file_type (ValaSourceFile* self);
ValaSourceFile* vala_source_file_new (ValaCodeContext* context, ValaSourceFileType type, const gchar* filename, const gchar* content);
ValaSourceFile* vala_source_file_construct (GType object_type, ValaCodeContext* context, ValaSourceFileType type, const gchar* filename, const gchar* content);
void vala_code_context_add_source_file (ValaCodeContext* self, ValaSourceFile* file);
static ValaGirParserMetadata* vala_gir_parser_metadata_parser_parse_metadata (ValaGirParserMetadataParser* self, ValaSourceFile* metadata_file);
ValaMarkupReader* vala_markup_reader_new (const gchar* filename);
ValaMarkupReader* vala_markup_reader_construct (GType object_type, const gchar* filename);
static void vala_gir_parser_next (ValaGirParser* self);
static void vala_gir_parser_parse_repository (ValaGirParser* self);
static void vala_gir_parser_report_unused_metadata (ValaGirParser* self, ValaGirParserMetadata* metadata);
ValaMarkupTokenType vala_markup_reader_read_token (ValaMarkupReader* self, ValaSourceLocation* token_begin, ValaSourceLocation* token_end);
const gchar* vala_markup_reader_get_name (ValaMarkupReader* self);
static void vala_gir_parser_skip_element (ValaGirParser* self);
static void vala_gir_parser_start_element (ValaGirParser* self, const gchar* name);
void vala_report_error (ValaSourceReference* source, const gchar* message);
static ValaSourceReference* vala_gir_parser_get_current_src (ValaGirParser* self);
static void vala_gir_parser_end_element (ValaGirParser* self, const gchar* name);
ValaSourceReference* vala_source_reference_new (ValaSourceFile* _file, gint _first_line, gint _first_column, gint _last_line, gint _last_column);
ValaSourceReference* vala_source_reference_construct (GType object_type, ValaSourceFile* _file, gint _first_line, gint _first_column, gint _last_line, gint _last_column);
static void vala_gir_parser_add_symbol_to_container (ValaGirParser* self, ValaSymbol* container, ValaSymbol* sym);
void vala_symbol_add_class (ValaSymbol* self, ValaClass* cl);
void vala_symbol_add_constant (ValaSymbol* self, ValaConstant* constant);
void vala_symbol_add_enum (ValaSymbol* self, ValaEnum* en);
void vala_symbol_add_field (ValaSymbol* self, ValaField* f);
void vala_symbol_add_method (ValaSymbol* self, ValaMethod* m);
void vala_symbol_add_property (ValaSymbol* self, ValaProperty* prop);
void vala_symbol_add_signal (ValaSymbol* self, ValaSignal* sig);
void vala_symbol_add_struct (ValaSymbol* self, ValaStruct* st);
void vala_enum_add_value (ValaEnum* self, ValaEnumValue* value);
void vala_symbol_add_namespace (ValaSymbol* self, ValaNamespace* ns);
void vala_symbol_add_delegate (ValaSymbol* self, ValaDelegate* d);
void vala_symbol_add_error_domain (ValaSymbol* self, ValaErrorDomain* edomain);
void vala_symbol_add_interface (ValaSymbol* self, ValaInterface* iface);
ValaSourceReference* vala_code_node_get_source_reference (ValaCodeNode* self);
static ValaUnresolvedSymbol* vala_gir_parser_parse_symbol_from_string (ValaGirParser* self, const gchar* symbol_string, ValaSourceReference* source_reference);
static ValaUnresolvedSymbol* vala_gir_parser_get_unresolved_symbol (ValaGirParser* self, ValaSymbol* symbol);
ValaCodeNode* vala_code_node_get_parent_node (ValaCodeNode* self);
static void vala_gir_parser_assume_parameter_names (ValaGirParser* self, ValaSignal* sig, ValaSymbol* sym);
ValaList* vala_method_get_parameters (ValaMethod* self);
ValaList* vala_delegate_get_parameters (ValaDelegate* self);
ValaList* vala_signal_get_parameters (ValaSignal* self);
void vala_symbol_set_name (ValaSymbol* self, const gchar* value);
static ValaGirParserSymbolInfo* vala_gir_parser_add_symbol_info (ValaGirParser* self, ValaSymbol* symbol);
static ValaGirParserSymbolInfo* vala_gir_parser_symbol_info_new (void);
static ValaGirParserSymbolInfo* vala_gir_parser_symbol_info_construct (GType object_type);
static ValaGirParserSymbolInfo* vala_gir_parser_find_invoker (ValaGirParser* self, ValaMethod* method);
static void vala_gir_parser_merge (ValaGirParser* self, ValaGirParserSymbolInfo* info, ValaArrayList* colliding, ValaArrayList* merged);
void vala_interface_set_type_cname (ValaInterface* self, const gchar* type_cname);
gchar* vala_typesymbol_get_cname (ValaTypeSymbol* self, gboolean const_type);
void vala_property_set_no_accessor_method (ValaProperty* self, gboolean value);
gboolean vala_method_get_is_virtual (ValaMethod* self);
void vala_signal_set_is_virtual (ValaSignal* self, gboolean value);
void vala_signal_set_has_emitter (ValaSignal* self, gboolean value);
GType vala_code_generator_get_type (void) G_GNUC_CONST;
const gchar* vala_attribute_get_name (ValaAttribute* self);
void vala_method_set_vfunc_name (ValaMethod* self, const gchar* value);
ValaDataType* vala_variable_get_variable_type (ValaVariable* self);
GType vala_reference_type_get_type (void) G_GNUC_CONST;
GType vala_array_type_get_type (void) G_GNUC_CONST;
void vala_variable_set_array_length_cname (ValaVariable* self, const gchar* array_length_cname);
void vala_variable_set_no_array_length (ValaVariable* self, gboolean value);
static void vala_gir_parser_postprocess_symbol (ValaGirParser* self, ValaSymbol* symbol, ValaGirParserMetadata* metadata);
static gchar* vala_gir_parser_metadata_get_string (ValaGirParserMetadata* self, ValaGirParserArgumentType arg);
void vala_symbol_set_replacement (ValaSymbol* self, const gchar* value);
static gchar* vala_gir_parser_element_get_string (ValaGirParser* self, const gchar* attribute_name, ValaGirParserArgumentType arg_type);
void vala_symbol_set_deprecated_since (ValaSymbol* self, const gchar* value);
static gboolean vala_gir_parser_metadata_get_bool (ValaGirParserMetadata* self, ValaGirParserArgumentType arg);
const gchar* vala_symbol_get_replacement (ValaSymbol* self);
const gchar* vala_symbol_get_deprecated_since (ValaSymbol* self);
void vala_symbol_set_deprecated (ValaSymbol* self, gboolean value);
static gboolean vala_gir_parser_metadata_has_argument (ValaGirParserMetadata* self, ValaGirParserArgumentType key);
static ValaSourceReference* vala_gir_parser_metadata_get_source_reference (ValaGirParserMetadata* self, ValaGirParserArgumentType arg);
static void vala_gir_parser_merge_add_process (ValaGirParser* self, ValaSymbol* container);
static ValaGirParserMetadata* vala_gir_parser_get_current_metadata (ValaGirParser* self);
gchar* vala_markup_reader_get_attribute (ValaMarkupReader* self, const gchar* attr);
static ValaGirParserMetadata* vala_gir_parser_metadata_match_child (ValaGirParserMetadata* self, const gchar* name, ValaGirParserMetadataType type);
static gboolean vala_gir_parser_push_metadata (ValaGirParser* self);
static void vala_gir_parser_pop_metadata (ValaGirParser* self);
static gboolean vala_gir_parser_parse_type_arguments_from_string (ValaGirParser* self, ValaDataType* parent_type, const gchar* type_arguments, ValaSourceReference* source_reference);
static ValaDataType* vala_gir_parser_parse_type_from_string (ValaGirParser* self, const gchar* type_string, gboolean owned_by_default, ValaSourceReference* source_reference);
void vala_data_type_add_type_argument (ValaDataType* self, ValaDataType* arg);
ValaVoidType* vala_void_type_new (ValaSourceReference* source_reference);
ValaVoidType* vala_void_type_construct (GType object_type, ValaSourceReference* source_reference);
GType vala_void_type_get_type (void) G_GNUC_CONST;
ValaPointerType* vala_pointer_type_new (ValaDataType* base_type, ValaSourceReference* source_reference);
ValaPointerType* vala_pointer_type_construct (GType object_type, ValaDataType* base_type, ValaSourceReference* source_reference);
GType vala_pointer_type_get_type (void) G_GNUC_CONST;
ValaUnresolvedType* vala_unresolved_type_new_from_symbol (ValaUnresolvedSymbol* symbol, ValaSourceReference* source);
ValaUnresolvedType* vala_unresolved_type_construct_from_symbol (GType object_type, ValaUnresolvedSymbol* symbol, ValaSourceReference* source);
GType vala_unresolved_type_get_type (void) G_GNUC_CONST;
ValaArrayType* vala_array_type_new (ValaDataType* element_type, gint rank, ValaSourceReference* source_reference);
ValaArrayType* vala_array_type_construct (GType object_type, ValaDataType* element_type, gint rank, ValaSourceReference* source_reference);
void vala_data_type_set_nullable (ValaDataType* self, gboolean value);
void vala_data_type_set_value_owned (ValaDataType* self, gboolean value);
static ValaDataType* vala_gir_parser_element_get_type (ValaGirParser* self, ValaDataType* orig_type, gboolean owned_by_default, gboolean* changed);
static gchar* vala_gir_parser_element_get_name (ValaGirParser* self, const gchar* attribute_name, ValaGirParserArgumentType arg_type);
static ValaNamespace* vala_gir_parser_parse_namespace (ValaGirParser* self);
static void vala_gir_parser_parse_include (ValaGirParser* self);
static gchar* vala_gir_parser_parse_package (ValaGirParser* self);
gboolean vala_code_context_has_package (ValaCodeContext* self, const gchar* pkg);
void vala_code_context_add_package (ValaCodeContext* self, const gchar* pkg);
static void vala_gir_parser_parse_c_include (ValaGirParser* self);
gboolean vala_code_context_add_external_package (ValaCodeContext* self, const gchar* pkg);
static void _vala_array_add1 (gchar*** array, int* length, int* size, gchar* value);
void vala_source_file_set_gir_namespace (ValaSourceFile* self, const gchar* value);
void vala_source_file_set_gir_version (ValaSourceFile* self, const gchar* value);
ValaNamespace* vala_namespace_new (const gchar* name, ValaSourceReference* source_reference);
ValaNamespace* vala_namespace_construct (GType object_type, const gchar* name, ValaSourceReference* source_reference);
gboolean vala_symbol_get_external_package (ValaSymbol* self);
static void _vala_code_node_unref0_ (gpointer var);
static void _g_list_free__vala_code_node_unref0_ (GList* self);
void vala_code_node_set_source_reference (ValaCodeNode* self, ValaSourceReference* value);
void vala_namespace_add_cprefix (ValaNamespace* self, const gchar* cprefix);
void vala_namespace_set_lower_case_cprefix (ValaNamespace* self, const gchar* cprefix);
gchar* vala_symbol_camel_case_to_lower_case (const gchar* camel_case);
void vala_symbol_add_cheader_filename (ValaSymbol* self, const gchar* filename);
static ValaGirParserAlias* vala_gir_parser_parse_alias (ValaGirParser* self);
static ValaErrorDomain* vala_gir_parser_parse_error_domain (ValaGirParser* self);
static ValaEnum* vala_gir_parser_parse_enumeration (ValaGirParser* self);
static ValaEnum* vala_gir_parser_parse_bitfield (ValaGirParser* self);
static ValaMethod* vala_gir_parser_parse_method (ValaGirParser* self, const gchar* element_name);
static ValaDelegate* vala_gir_parser_parse_callback (ValaGirParser* self);
static ValaClass* vala_gir_parser_parse_boxed (ValaGirParser* self, const gchar* element_name);
static ValaStruct* vala_gir_parser_parse_record (ValaGirParser* self);
static ValaClass* vala_gir_parser_parse_class (ValaGirParser* self);
static ValaInterface* vala_gir_parser_parse_interface (ValaGirParser* self);
static ValaStruct* vala_gir_parser_parse_union (ValaGirParser* self);
static ValaConstant* vala_gir_parser_parse_constant (ValaGirParser* self);
static ValaGirParserAlias* vala_gir_parser_alias_new (void);
static ValaGirParserAlias* vala_gir_parser_alias_construct (GType object_type);
static ValaDataType* vala_gir_parser_parse_type (ValaGirParser* self, gchar** ctype, gint* array_length_index, gboolean transfer_elements, gboolean* no_array_length, gboolean* array_null_terminated);
static void vala_gir_parser_calculate_common_prefix (ValaGirParser* self, gchar** common_prefix, const gchar* cname);
gpointer vala_comment_ref (gpointer instance);
void vala_comment_unref (gpointer instance);
GParamSpec* vala_param_spec_comment (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void vala_value_set_comment (GValue* value, gpointer v_object);
void vala_value_take_comment (GValue* value, gpointer v_object);
gpointer vala_value_get_comment (const GValue* value);
GType vala_comment_get_type (void) G_GNUC_CONST;
ValaEnum* vala_enum_new (const gchar* name, ValaSourceReference* source_reference, ValaComment* comment);
ValaEnum* vala_enum_construct (GType object_type, const gchar* name, ValaSourceReference* source_reference, ValaComment* comment);
GType vala_symbol_accessibility_get_type (void) G_GNUC_CONST;
void vala_symbol_set_access (ValaSymbol* self, ValaSymbolAccessibility value);
void vala_enum_set_cname (ValaEnum* self, const gchar* cname);
static ValaEnumValue* vala_gir_parser_parse_enumeration_member (ValaGirParser* self);
gchar* vala_constant_get_cname (ValaConstant* self);
void vala_enum_set_cprefix (ValaEnum* self, const gchar* cprefix);
ValaErrorDomain* vala_error_domain_new (const gchar* name, ValaSourceReference* source_reference, ValaComment* comment);
ValaErrorDomain* vala_error_domain_construct (GType object_type, const gchar* name, ValaSourceReference* source_reference, ValaComment* comment);
void vala_error_domain_set_cname (ValaErrorDomain* self, const gchar* cname);
static ValaErrorCode* vala_gir_parser_parse_error_member (ValaGirParser* self);
void vala_error_domain_add_code (ValaErrorDomain* self, ValaErrorCode* ecode);
void vala_error_domain_set_cprefix (ValaErrorDomain* self, const gchar* cprefix);
ValaEnumValue* vala_enum_value_new (const gchar* name, ValaExpression* value, ValaSourceReference* source_reference, ValaComment* comment);
ValaEnumValue* vala_enum_value_construct (GType object_type, const gchar* name, ValaExpression* value, ValaSourceReference* source_reference, ValaComment* comment);
void vala_constant_set_cname (ValaConstant* self, const gchar* value);
ValaIntegerLiteral* vala_integer_literal_new (const gchar* i, ValaSourceReference* source);
ValaIntegerLiteral* vala_integer_literal_construct (GType object_type, const gchar* i, ValaSourceReference* source);
ValaErrorCode* vala_error_code_new_with_value (const gchar* name, ValaExpression* value, ValaSourceReference* source_reference);
ValaErrorCode* vala_error_code_construct_with_value (GType object_type, const gchar* name, ValaExpression* value, ValaSourceReference* source_reference);
ValaErrorCode* vala_error_code_new (const gchar* name, ValaSourceReference* source_reference, ValaComment* comment);
ValaErrorCode* vala_error_code_construct (GType object_type, const gchar* name, ValaSourceReference* source_reference, ValaComment* comment);
static ValaDataType* vala_gir_parser_parse_return_value (ValaGirParser* self, gchar** ctype);
static ValaParameter* vala_gir_parser_parse_parameter (ValaGirParser* self, gint* array_length_idx, gint* closure_idx, gint* destroy_idx, gchar** scope, const gchar* default_name);
ValaParameter* vala_parameter_new_with_ellipsis (ValaSourceReference* source_reference);
ValaParameter* vala_parameter_construct_with_ellipsis (GType object_type, ValaSourceReference* source_reference);
static gint vala_gir_parser_metadata_get_integer (ValaGirParserMetadata* self, ValaGirParserArgumentType arg);
ValaParameter* vala_parameter_new (const gchar* name, ValaDataType* variable_type, ValaSourceReference* source_reference);
ValaParameter* vala_parameter_construct (GType object_type, const gchar* name, ValaDataType* variable_type, ValaSourceReference* source_reference);
void vala_parameter_set_ctype (ValaParameter* self, const gchar* value);
GType vala_parameter_direction_get_type (void) G_GNUC_CONST;
void vala_parameter_set_direction (ValaParameter* self, ValaParameterDirection value);
static ValaExpression* vala_gir_parser_metadata_get_expression (ValaGirParserMetadata* self, ValaGirParserArgumentType arg);
void vala_variable_set_initializer (ValaVariable* self, ValaExpression* value);
ValaDelegateType* vala_delegate_type_new (ValaDelegate* delegate_symbol);
ValaDelegateType* vala_delegate_type_construct (GType object_type, ValaDelegate* delegate_symbol);
GType vala_delegate_type_get_type (void) G_GNUC_CONST;
static ValaDataType* vala_gir_parser_parse_type_from_gir_name (ValaGirParser* self, const gchar* type_name, gboolean* no_array_length, gboolean* array_null_terminated);
ValaStruct* vala_struct_new (const gchar* name, ValaSourceReference* source_reference, ValaComment* comment);
ValaStruct* vala_struct_construct (GType object_type, const gchar* name, ValaSourceReference* source_reference, ValaComment* comment);
void vala_symbol_set_external (ValaSymbol* self, gboolean value);
void vala_struct_set_cname (ValaStruct* self, const gchar* cname);
static ValaField* vala_gir_parser_parse_field (ValaGirParser* self);
static ValaMethod* vala_gir_parser_parse_constructor (ValaGirParser* self, const gchar* parent_ctype);
ValaList* vala_struct_get_fields (ValaStruct* self);
void vala_field_set_cname (ValaField* self, const gchar* cname);
gchar* vala_field_get_cname (ValaField* self);
ValaClass* vala_class_new (const gchar* name, ValaSourceReference* source_reference, ValaComment* comment);
ValaClass* vala_class_construct (GType object_type, const gchar* name, ValaSourceReference* source_reference, ValaComment* comment);
void vala_class_set_cname (ValaClass* self, const gchar* cname);
void vala_class_add_base_type (ValaClass* self, ValaDataType* type);
static ValaProperty* vala_gir_parser_parse_property (ValaGirParser* self);
static ValaSignal* vala_gir_parser_parse_signal (ValaGirParser* self);
static void vala_gir_parser_handle_async_methods (ValaGirParser* self, ValaObjectTypeSymbol* type_symbol);
ValaInterface* vala_interface_new (const gchar* name, ValaSourceReference* source_reference, ValaComment* comment);
ValaInterface* vala_interface_construct (GType object_type, const gchar* name, ValaSourceReference* source_reference, ValaComment* comment);
void vala_interface_set_cname (ValaInterface* self, const gchar* cname);
void vala_interface_add_prerequisite (ValaInterface* self, ValaDataType* type);
ValaList* vala_object_type_symbol_get_methods (ValaObjectTypeSymbol* self);
gboolean vala_method_get_coroutine (ValaMethod* self);
gchar* vala_method_get_finish_cname (ValaMethod* self);
gchar* vala_method_get_cname (ValaMethod* self);
ValaDataType* vala_method_get_return_type (ValaMethod* self);
ValaDataType* vala_data_type_copy (ValaDataType* self);
void vala_method_set_return_type (ValaMethod* self, ValaDataType* value);
gboolean vala_method_get_no_array_length (ValaMethod* self);
void vala_method_set_no_array_length (ValaMethod* self, gboolean value);
gboolean vala_method_get_array_null_terminated (ValaMethod* self);
void vala_method_set_array_null_terminated (ValaMethod* self, gboolean value);
ValaParameterDirection vala_parameter_get_direction (ValaParameter* self);
ValaParameter* vala_parameter_copy (ValaParameter* self);
void vala_method_add_parameter (ValaMethod* self, ValaParameter* param);
ValaList* vala_code_node_get_error_types (ValaCodeNode* self);
void vala_code_node_add_error_type (ValaCodeNode* self, ValaDataType* error_type);
void vala_scope_remove (ValaScope* self, const gchar* name);
static ValaGirParserCallbackScope* vala_gir_parser_callback_scope_new (void);
static ValaGirParserCallbackScope* vala_gir_parser_callback_scope_construct (GType object_type);
ValaDelegate* vala_delegate_type_get_delegate_symbol (ValaDelegateType* self);
ValaField* vala_field_new (const gchar* name, ValaDataType* variable_type, ValaExpression* initializer, ValaSourceReference* source_reference, ValaComment* comment);
ValaField* vala_field_construct (GType object_type, const gchar* name, ValaDataType* variable_type, ValaExpression* initializer, ValaSourceReference* source_reference, ValaComment* comment);
ValaProperty* vala_property_new (const gchar* name, ValaDataType* property_type, ValaPropertyAccessor* get_accessor, ValaPropertyAccessor* set_accessor, ValaSourceReference* source_reference, ValaComment* comment);
ValaProperty* vala_property_construct (GType object_type, const gchar* name, ValaDataType* property_type, ValaPropertyAccessor* get_accessor, ValaPropertyAccessor* set_accessor, ValaSourceReference* source_reference, ValaComment* comment);
void vala_property_set_no_array_length (ValaProperty* self, gboolean value);
void vala_property_set_array_null_terminated (ValaProperty* self, gboolean value);
ValaDataType* vala_property_get_property_type (ValaProperty* self);
ValaPropertyAccessor* vala_property_accessor_new (gboolean readable, gboolean writable, gboolean construction, ValaDataType* value_type, ValaBlock* body, ValaSourceReference* source_reference, ValaComment* comment);
ValaPropertyAccessor* vala_property_accessor_construct (GType object_type, gboolean readable, gboolean writable, gboolean construction, ValaDataType* value_type, ValaBlock* body, ValaSourceReference* source_reference, ValaComment* comment);
void vala_property_set_get_accessor (ValaProperty* self, ValaPropertyAccessor* value);
void vala_property_set_set_accessor (ValaProperty* self, ValaPropertyAccessor* value);
static ValaSymbol* vala_gir_parser_parse_function (ValaGirParser* self, const gchar* element_name);
ValaCreationMethod* vala_creation_method_new (const gchar* class_name, const gchar* name, ValaSourceReference* source_reference, ValaComment* comment);
ValaCreationMethod* vala_creation_method_construct (GType object_type, const gchar* class_name, const gchar* name, ValaSourceReference* source_reference, ValaComment* comment);
void vala_method_set_has_construct_function (ValaMethod* self, gboolean value);
void vala_creation_method_set_custom_return_type_cname (ValaCreationMethod* self, const gchar* value);
void vala_method_set_cname (ValaMethod* self, const gchar* cname);
ValaErrorType* vala_error_type_new (ValaErrorDomain* error_domain, ValaErrorCode* error_code, ValaSourceReference* source_reference);
ValaErrorType* vala_error_type_construct (GType object_type, ValaErrorDomain* error_domain, ValaErrorCode* error_code, ValaSourceReference* source_reference);
GType vala_error_type_get_type (void) G_GNUC_CONST;
ValaDelegate* vala_delegate_new (const gchar* name, ValaDataType* return_type, ValaSourceReference* source_reference, ValaComment* comment);
ValaDelegate* vala_delegate_construct (GType object_type, const gchar* name, ValaDataType* return_type, ValaSourceReference* source_reference, ValaComment* comment);
ValaMethod* vala_method_new (const gchar* name, ValaDataType* return_type, ValaSourceReference* source_reference, ValaComment* comment);
ValaMethod* vala_method_construct (GType object_type, const gchar* name, ValaDataType* return_type, ValaSourceReference* source_reference, ValaComment* comment);
void vala_delegate_set_cname (ValaDelegate* self, const gchar* cname);
void vala_method_set_is_virtual (ValaMethod* self, gboolean value);
ValaAttribute* vala_attribute_new (const gchar* name, ValaSourceReference* source_reference);
ValaAttribute* vala_attribute_construct (GType object_type, const gchar* name, ValaSourceReference* source_reference);
GType vala_member_binding_get_type (void) G_GNUC_CONST;
void vala_method_set_binding (ValaMethod* self, ValaMemberBinding value);
void vala_method_set_is_abstract (ValaMethod* self, gboolean value);
static gpointer vala_gir_parser_method_info_ref (gpointer instance);
static void vala_gir_parser_method_info_unref (gpointer instance);
static GParamSpec* vala_gir_parser_param_spec_method_info (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) G_GNUC_UNUSED;
static void vala_gir_parser_value_set_method_info (GValue* value, gpointer v_object) G_GNUC_UNUSED;
static void vala_gir_parser_value_take_method_info (GValue* value, gpointer v_object) G_GNUC_UNUSED;
static gpointer vala_gir_parser_value_get_method_info (const GValue* value) G_GNUC_UNUSED;
static GType vala_gir_parser_method_info_get_type (void) G_GNUC_CONST G_GNUC_UNUSED;
static ValaGirParserMethodInfo* vala_gir_parser_method_info_new (ValaParameter* param, gint array_length_idx, gint closure_idx, gint destroy_idx);
static ValaGirParserMethodInfo* vala_gir_parser_method_info_construct (GType object_type, ValaParameter* param, gint array_length_idx, gint closure_idx, gint destroy_idx);
ValaUnresolvedSymbol* vala_unresolved_type_get_unresolved_symbol (ValaUnresolvedType* self);
void vala_method_set_coroutine (ValaMethod* self, gboolean value);
void vala_delegate_set_has_target (ValaDelegate* self, gboolean value);
void vala_delegate_set_cinstance_parameter_position (ValaDelegate* self, gdouble value);
void vala_delegate_add_parameter (ValaDelegate* self, ValaParameter* param);
void vala_parameter_set_carray_length_parameter_position (ValaParameter* self, gdouble value);
void vala_parameter_set_cdelegate_target_parameter_position (ValaParameter* self, gdouble value);
void vala_parameter_set_cdestroy_notify_parameter_position (ValaParameter* self, gdouble value);
ValaSignal* vala_signal_new (const gchar* name, ValaDataType* return_type, ValaSourceReference* source_reference, ValaComment* comment);
ValaSignal* vala_signal_construct (GType object_type, const gchar* name, ValaDataType* return_type, ValaSourceReference* source_reference, ValaComment* comment);
void vala_signal_add_parameter (ValaSignal* self, ValaParameter* param);
void vala_class_set_is_compact (ValaClass* self, gboolean value);
void vala_class_set_type_id (ValaClass* self, const gchar* type_id);
void vala_class_set_free_function (ValaClass* self, const gchar* name);
void vala_class_set_dup_function (ValaClass* self, const gchar* name);
ValaConstant* vala_constant_new (const gchar* name, ValaDataType* type_reference, ValaExpression* value, ValaSourceReference* source_reference, ValaComment* comment);
ValaConstant* vala_constant_construct (GType object_type, const gchar* name, ValaDataType* type_reference, ValaExpression* value, ValaSourceReference* source_reference, ValaComment* comment);
static gpointer vala_gir_parser_argument_ref (gpointer instance);
static void vala_gir_parser_argument_unref (gpointer instance);
static GParamSpec* vala_gir_parser_param_spec_argument (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) G_GNUC_UNUSED;
static void vala_gir_parser_value_set_argument (GValue* value, gpointer v_object) G_GNUC_UNUSED;
static void vala_gir_parser_value_take_argument (GValue* value, gpointer v_object) G_GNUC_UNUSED;
static gpointer vala_gir_parser_value_get_argument (const GValue* value) G_GNUC_UNUSED;
static GType vala_gir_parser_argument_get_type (void) G_GNUC_CONST G_GNUC_UNUSED;
void vala_report_warning (ValaSourceReference* source, const gchar* message);
void vala_unresolved_symbol_set_inner (ValaUnresolvedSymbol* self, ValaUnresolvedSymbol* value);
ValaUnresolvedSymbol* vala_unresolved_symbol_get_inner (ValaUnresolvedSymbol* self);
ValaSymbol* vala_symbol_get_parent_symbol (ValaSymbol* self);
static ValaSymbol* vala_gir_parser_resolve_symbol (ValaGirParser* self, ValaScope* parent_scope, ValaUnresolvedSymbol* unresolved_symbol);
ValaScope* vala_scope_get_parent_scope (ValaScope* self);
ValaList* vala_interface_get_prerequisites (ValaInterface* self);
ValaTypeSymbol* vala_data_type_get_data_type (ValaDataType* self);
ValaObjectType* vala_object_type_new (ValaObjectTypeSymbol* type_symbol);
ValaObjectType* vala_object_type_construct (GType object_type, ValaObjectTypeSymbol* type_symbol);
GType vala_object_type_get_type (void) G_GNUC_CONST;
gchar* vala_code_node_to_string (ValaCodeNode* self);
void vala_property_set_is_virtual (ValaProperty* self, gboolean value);
void vala_struct_set_base_type (ValaStruct* self, ValaDataType* value);
static void vala_gir_parser_find_static_method_parent (ValaGirParser* self, const gchar* cname, ValaSymbol* current, ValaSymbol** best, gdouble* match, gdouble match_char);
ValaMap* vala_scope_get_symbol_table (ValaScope* self);
gchar* vala_symbol_get_lower_case_cprefix (ValaSymbol* self);
ValaGirParser* vala_gir_parser_new (void);
ValaGirParser* vala_gir_parser_construct (GType object_type);
ValaCodeVisitor* vala_code_visitor_construct (GType object_type);
enum  {
      VALA_GIR_PARSER_ARGUMENT_DUMMY_PROPERTY
};
static ValaGirParserArgument* vala_gir_parser_argument_new (ValaExpression* expression, ValaSourceReference* source_reference);
static ValaGirParserArgument* vala_gir_parser_argument_construct (GType object_type, ValaExpression* expression, ValaSourceReference* source_reference);
static void vala_gir_parser_argument_finalize (ValaGirParserArgument* obj);
static GType vala_gir_parser_metadata_set_get_type (void) G_GNUC_CONST G_GNUC_UNUSED;
enum  {
      VALA_GIR_PARSER_METADATA_SET_DUMMY_PROPERTY
};
static ValaGirParserMetadataSet* vala_gir_parser_metadata_set_new (ValaGirParserMetadataType type);
static ValaGirParserMetadataSet* vala_gir_parser_metadata_set_construct (GType object_type, ValaGirParserMetadataType type);
static ValaGirParserMetadata* vala_gir_parser_metadata_new (const gchar* pattern, ValaGirParserMetadataType type, ValaSourceReference* source_reference);
static ValaGirParserMetadata* vala_gir_parser_metadata_construct (GType object_type, const gchar* pattern, ValaGirParserMetadataType type, ValaSourceReference* source_reference);
static void vala_gir_parser_metadata_set_add_sibling (ValaGirParserMetadataSet* self, ValaGirParserMetadata* metadata);
static void vala_gir_parser_metadata_add_child (ValaGirParserMetadata* self, ValaGirParserMetadata* metadata);
enum  {
      VALA_GIR_PARSER_METADATA_DUMMY_PROPERTY
};
static ValaGirParserMetadata* vala_gir_parser_metadata_get_child (ValaGirParserMetadata* self, const gchar* pattern, ValaGirParserMetadataType type);
static void vala_gir_parser_metadata_add_argument (ValaGirParserMetadata* self, ValaGirParserArgumentType key, ValaGirParserArgument* value);
gchar* vala_string_literal_eval (ValaStringLiteral* self);
const gchar* vala_integer_literal_get_value (ValaIntegerLiteral* self);
gboolean vala_boolean_literal_get_value (ValaBooleanLiteral* self);
static void vala_gir_parser_metadata_finalize (ValaGirParserMetadata* obj);
gpointer vala_scanner_ref (gpointer instance);
void vala_scanner_unref (gpointer instance);
GParamSpec* vala_param_spec_scanner (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void vala_value_set_scanner (GValue* value, gpointer v_object);
void vala_value_take_scanner (GValue* value, gpointer v_object);
gpointer vala_value_get_scanner (const GValue* value);
GType vala_scanner_get_type (void) G_GNUC_CONST;
GType vala_token_type_get_type (void) G_GNUC_CONST;
#define VALA_GIR_PARSER_METADATA_PARSER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), VALA_GIR_PARSER_TYPE_METADATA_PARSER, ValaGirParserMetadataParserPrivate))
enum  {
      VALA_GIR_PARSER_METADATA_PARSER_DUMMY_PROPERTY
};
static ValaSourceReference* vala_gir_parser_metadata_parser_get_current_src (ValaGirParserMetadataParser* self);
ValaSourceFile* vala_scanner_get_source_file (ValaScanner* self);
static ValaSourceReference* vala_gir_parser_metadata_parser_get_src (ValaGirParserMetadataParser* self, ValaSourceLocation* begin);
ValaScanner* vala_scanner_new (ValaSourceFile* source_file);
ValaScanner* vala_scanner_construct (GType object_type, ValaSourceFile* source_file);
static ValaTokenType vala_gir_parser_metadata_parser_next (ValaGirParserMetadataParser* self);
static gboolean vala_gir_parser_metadata_parser_parse_rule (ValaGirParserMetadataParser* self);
ValaTokenType vala_scanner_read_token (ValaScanner* self, ValaSourceLocation* token_begin, ValaSourceLocation* token_end);
static gboolean vala_gir_parser_metadata_parser_has_space (ValaGirParserMetadataParser* self);
static gboolean vala_gir_parser_metadata_parser_has_newline (ValaGirParserMetadataParser* self);
static gchar* vala_gir_parser_metadata_parser_get_string (ValaGirParserMetadataParser* self);
static ValaGirParserMetadataType* vala_gir_parser_metadata_parser_parse_metadata_access (ValaGirParserMetadataParser* self);
static ValaGirParserMetadataType* _vala_gir_parser_metadata_type_dup (ValaGirParserMetadataType* self);
static gchar* vala_gir_parser_metadata_parser_parse_identifier (ValaGirParserMetadataParser* self, ValaSourceReference** source_reference, gboolean is_glob);
static ValaGirParserMetadata* vala_gir_parser_metadata_parser_parse_pattern (ValaGirParserMetadataParser* self);
static ValaExpression* vala_gir_parser_metadata_parser_parse_literal (ValaGirParserMetadataParser* self);
ValaBooleanLiteral* vala_boolean_literal_new (gboolean b, ValaSourceReference* source);
ValaBooleanLiteral* vala_boolean_literal_construct (GType object_type, gboolean b, ValaSourceReference* source);
ValaRealLiteral* vala_real_literal_new (const gchar* r, ValaSourceReference* source);
ValaRealLiteral* vala_real_literal_construct (GType object_type, const gchar* r, ValaSourceReference* source);
ValaStringLiteral* vala_string_literal_new (const gchar* value, ValaSourceReference* source_reference);
ValaStringLiteral* vala_string_literal_construct (GType object_type, const gchar* value, ValaSourceReference* source_reference);
static gboolean vala_gir_parser_metadata_parser_parse_args (ValaGirParserMetadataParser* self, ValaGirParserMetadata* metadata);
static void vala_gir_parser_metadata_parser_finalize (ValaGirParserMetadataParser* obj);
enum  {
      VALA_GIR_PARSER_SYMBOL_INFO_DUMMY_PROPERTY
};
static void vala_gir_parser_symbol_info_finalize (ValaGirParserSymbolInfo* obj);
enum  {
      VALA_GIR_PARSER_CALLBACK_SCOPE_DUMMY_PROPERTY
};
static void vala_gir_parser_callback_scope_finalize (ValaGirParserCallbackScope* obj);
enum  {
      VALA_GIR_PARSER_ALIAS_DUMMY_PROPERTY
};
static void vala_gir_parser_alias_finalize (ValaGirParserAlias* obj);
enum  {
      VALA_GIR_PARSER_METHOD_INFO_DUMMY_PROPERTY
};
static void vala_gir_parser_method_info_finalize (ValaGirParserMethodInfo* obj);
static void vala_gir_parser_finalize (ValaCodeVisitor* obj);
static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func);
static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func);
static gint _vala_array_length (gpointer array);


static GType vala_gir_parser_metadata_type_get_type (void) {
      static volatile gsize vala_gir_parser_metadata_type_type_id__volatile = 0;
      if (g_once_init_enter (&vala_gir_parser_metadata_type_type_id__volatile)) {
            static const GEnumValue values[] = {{VALA_GIR_PARSER_METADATA_TYPE_GENERIC, "VALA_GIR_PARSER_METADATA_TYPE_GENERIC", "generic"}, {VALA_GIR_PARSER_METADATA_TYPE_PROPERTY, "VALA_GIR_PARSER_METADATA_TYPE_PROPERTY", "property"}, {VALA_GIR_PARSER_METADATA_TYPE_SIGNAL, "VALA_GIR_PARSER_METADATA_TYPE_SIGNAL", "signal"}, {0, NULL, NULL}};
            GType vala_gir_parser_metadata_type_type_id;
            vala_gir_parser_metadata_type_type_id = g_enum_register_static ("ValaGirParserMetadataType", values);
            g_once_init_leave (&vala_gir_parser_metadata_type_type_id__volatile, vala_gir_parser_metadata_type_type_id);
      }
      return vala_gir_parser_metadata_type_type_id__volatile;
}


static gchar* string_replace (const gchar* self, const gchar* old, const gchar* replacement) {
      gchar* result = NULL;
      gchar* _tmp0_ = NULL;
      gchar* _tmp1_;
      GRegex* _tmp2_ = NULL;
      GRegex* _tmp3_;
      GRegex* regex;
      gchar* _tmp4_ = NULL;
      gchar* _tmp5_;
      GError * _inner_error_ = NULL;
      g_return_val_if_fail (self != NULL, NULL);
      g_return_val_if_fail (old != NULL, NULL);
      g_return_val_if_fail (replacement != NULL, NULL);
      _tmp0_ = g_regex_escape_string (old, -1);
      _tmp1_ = _tmp0_;
      _tmp2_ = g_regex_new (_tmp1_, 0, 0, &_inner_error_);
      _tmp3_ = _tmp2_;
      _g_free0 (_tmp1_);
      regex = _tmp3_;
      if (_inner_error_ != NULL) {
            if (_inner_error_->domain == G_REGEX_ERROR) {
                  goto __catch2_g_regex_error;
            }
            g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
            g_clear_error (&_inner_error_);
            return NULL;
      }
      _tmp4_ = g_regex_replace_literal (regex, self, (gssize) (-1), 0, replacement, 0, &_inner_error_);
      _tmp5_ = _tmp4_;
      if (_inner_error_ != NULL) {
            _g_regex_unref0 (regex);
            if (_inner_error_->domain == G_REGEX_ERROR) {
                  goto __catch2_g_regex_error;
            }
            _g_regex_unref0 (regex);
            g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
            g_clear_error (&_inner_error_);
            return NULL;
      }
      result = _tmp5_;
      _g_regex_unref0 (regex);
      return result;
      _g_regex_unref0 (regex);
      goto __finally2;
      __catch2_g_regex_error:
      {
            GError * e;
            e = _inner_error_;
            _inner_error_ = NULL;
            g_assert_not_reached ();
            _g_error_free0 (e);
      }
      __finally2:
      if (_inner_error_ != NULL) {
            g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
            g_clear_error (&_inner_error_);
            return NULL;
      }
}


static ValaGirParserArgumentType* _vala_gir_parser_argument_type_dup (ValaGirParserArgumentType* self) {
      ValaGirParserArgumentType* dup;
      dup = g_new0 (ValaGirParserArgumentType, 1);
      memcpy (dup, self, sizeof (ValaGirParserArgumentType));
      return dup;
}


static gpointer __vala_gir_parser_argument_type_dup0 (gpointer self) {
      return self ? _vala_gir_parser_argument_type_dup (self) : NULL;
}


static ValaGirParserArgumentType* vala_gir_parser_argument_type_from_string (const gchar* name) {
      ValaGirParserArgumentType* result = NULL;
      GTypeClass* _tmp0_ = NULL;
      GEnumClass* enum_class;
      gchar* _tmp1_ = NULL;
      gchar* nick;
      GEnumValue* _tmp2_ = NULL;
      GEnumValue* enum_value;
      g_return_val_if_fail (name != NULL, NULL);
      _tmp0_ = g_type_class_ref (VALA_GIR_PARSER_TYPE_ARGUMENT_TYPE);
      enum_class = (GEnumClass*) _tmp0_;
      _tmp1_ = string_replace (name, "_", "-");
      nick = _tmp1_;
      _tmp2_ = g_enum_get_value_by_nick (enum_class, nick);
      enum_value = _tmp2_;
      if (enum_value != NULL) {
            ValaGirParserArgumentType value;
            ValaGirParserArgumentType* _tmp3_;
            value = (ValaGirParserArgumentType) (*enum_value).value;
            _tmp3_ = __vala_gir_parser_argument_type_dup0 (&value);
            result = _tmp3_;
            _g_free0 (nick);
            _g_type_class_unref0 (enum_class);
            return result;
      }
      result = NULL;
      _g_free0 (nick);
      _g_type_class_unref0 (enum_class);
      return result;
}


static GType vala_gir_parser_argument_type_get_type (void) {
      static volatile gsize vala_gir_parser_argument_type_type_id__volatile = 0;
      if (g_once_init_enter (&vala_gir_parser_argument_type_type_id__volatile)) {
            static const GEnumValue values[] = {{VALA_GIR_PARSER_ARGUMENT_TYPE_SKIP, "VALA_GIR_PARSER_ARGUMENT_TYPE_SKIP", "skip"}, {VALA_GIR_PARSER_ARGUMENT_TYPE_HIDDEN, "VALA_GIR_PARSER_ARGUMENT_TYPE_HIDDEN", "hidden"}, {VALA_GIR_PARSER_ARGUMENT_TYPE_TYPE, "VALA_GIR_PARSER_ARGUMENT_TYPE_TYPE", "type"}, {VALA_GIR_PARSER_ARGUMENT_TYPE_TYPE_ARGUMENTS, "VALA_GIR_PARSER_ARGUMENT_TYPE_TYPE_ARGUMENTS", "type-arguments"}, {VALA_GIR_PARSER_ARGUMENT_TYPE_CHEADER_FILENAME, "VALA_GIR_PARSER_ARGUMENT_TYPE_CHEADER_FILENAME", "cheader-filename"}, {VALA_GIR_PARSER_ARGUMENT_TYPE_NAME, "VALA_GIR_PARSER_ARGUMENT_TYPE_NAME", "name"}, {VALA_GIR_PARSER_ARGUMENT_TYPE_OWNED, "VALA_GIR_PARSER_ARGUMENT_TYPE_OWNED", "owned"}, {VALA_GIR_PARSER_ARGUMENT_TYPE_UNOWNED, "VALA_GIR_PARSER_ARGUMENT_TYPE_UNOWNED", "unowned"}, {VALA_GIR_PARSER_ARGUMENT_TYPE_PARENT, "VALA_GIR_PARSER_ARGUMENT_TYPE_PARENT", "parent"}, {VALA_GIR_PARSER_ARGUMENT_TYPE_NULLABLE, "VALA_GIR_PARSER_ARGUMENT_TYPE_NULLABLE", "nullable"}, {VALA_GIR_PARSER_ARGUMENT_TYPE_DEPRECATED, "VALA_GIR_PARSER_ARGUMENT_TYPE_DEPRECATED", "deprecated"}, {VALA_GIR_PARSER_ARGUMENT_TYPE_REPLACEMENT, "VALA_GIR_PARSER_ARGUMENT_TYPE_REPLACEMENT", "replacement"}, {VALA_GIR_PARSER_ARGUMENT_TYPE_DEPRECATED_SINCE, "VALA_GIR_PARSER_ARGUMENT_TYPE_DEPRECATED_SINCE", "deprecated-since"}, {VALA_GIR_PARSER_ARGUMENT_TYPE_ARRAY, "VALA_GIR_PARSER_ARGUMENT_TYPE_ARRAY", "array"}, {VALA_GIR_PARSER_ARGUMENT_TYPE_ARRAY_LENGTH_POS, "VALA_GIR_PARSER_ARGUMENT_TYPE_ARRAY_LENGTH_POS", "array-length-pos"}, {VALA_GIR_PARSER_ARGUMENT_TYPE_DEFAULT, "VALA_GIR_PARSER_ARGUMENT_TYPE_DEFAULT", "default"}, {VALA_GIR_PARSER_ARGUMENT_TYPE_OUT, "VALA_GIR_PARSER_ARGUMENT_TYPE_OUT", "out"}, {VALA_GIR_PARSER_ARGUMENT_TYPE_REF, "VALA_GIR_PARSER_ARGUMENT_TYPE_REF", "ref"}, {VALA_GIR_PARSER_ARGUMENT_TYPE_VFUNC_NAME, "VALA_GIR_PARSER_ARGUMENT_TYPE_VFUNC_NAME", "vfunc-name"}, {VALA_GIR_PARSER_ARGUMENT_TYPE_VIRTUAL, "VALA_GIR_PARSER_ARGUMENT_TYPE_VIRTUAL", "virtual"}, {VALA_GIR_PARSER_ARGUMENT_TYPE_ABSTRACT, "VALA_GIR_PARSER_ARGUMENT_TYPE_ABSTRACT", "abstract"}, {0, NULL, NULL}};
            GType vala_gir_parser_argument_type_type_id;
            vala_gir_parser_argument_type_type_id = g_enum_register_static ("ValaGirParserArgumentType", values);
            g_once_init_leave (&vala_gir_parser_argument_type_type_id__volatile, vala_gir_parser_argument_type_type_id);
      }
      return vala_gir_parser_argument_type_type_id__volatile;
}


static guint _vala_gir_parser_unresolved_symbol_hash_ghash_func (gconstpointer key) {
      guint result;
      result = vala_gir_parser_unresolved_symbol_hash (key);
      return result;
}


static gboolean _vala_gir_parser_unresolved_symbol_equal_gequal_func (gconstpointer a, gconstpointer b) {
      gboolean result;
      result = vala_gir_parser_unresolved_symbol_equal (a, b);
      return result;
}


static guint _vala_gir_parser_callback_scope_hash_ghash_func (gconstpointer key) {
      guint result;
      result = vala_gir_parser_callback_scope_hash (key);
      return result;
}


static gboolean _vala_gir_parser_callback_scope_equal_gequal_func (gconstpointer a, gconstpointer b) {
      gboolean result;
      result = vala_gir_parser_callback_scope_equal (a, b);
      return result;
}


/**
 * Parses all .gir source files in the specified code
 * context and builds a code tree.
 *
 * @param context a code context
 */
static gpointer _vala_code_context_ref0 (gpointer self) {
      return self ? vala_code_context_ref (self) : NULL;
}


void vala_gir_parser_parse (ValaGirParser* self, ValaCodeContext* context) {
      ValaCodeContext* _tmp0_;
      ValaNamespace* _tmp1_ = NULL;
      ValaScope* _tmp2_ = NULL;
      ValaSymbol* _tmp3_ = NULL;
      ValaSymbol* _tmp4_;
      g_return_if_fail (self != NULL);
      g_return_if_fail (context != NULL);
      _tmp0_ = _vala_code_context_ref0 (context);
      _vala_code_context_unref0 (self->priv->context);
      self->priv->context = _tmp0_;
      _tmp1_ = vala_code_context_get_root (context);
      _tmp2_ = vala_symbol_get_scope ((ValaSymbol*) _tmp1_);
      _tmp3_ = vala_scope_lookup (_tmp2_, "GLib");
      _tmp4_ = _tmp3_;
      _vala_code_node_unref0 (self->priv->glib_ns);
      self->priv->glib_ns = VALA_IS_NAMESPACE (_tmp4_) ? ((ValaNamespace*) _tmp4_) : NULL;
      vala_code_context_accept (context, (ValaCodeVisitor*) self);
      vala_gir_parser_resolve_gir_symbols (self);
      vala_gir_parser_postprocess_interfaces (self);
      vala_gir_parser_postprocess_reparenting (self);
      vala_gir_parser_postprocess_gtype_callbacks (self);
      vala_gir_parser_postprocess_aliases (self);
      vala_gir_parser_postprocess_namespace_methods (self);
}


static gpointer _vala_code_node_ref0 (gpointer self) {
      return self ? vala_code_node_ref (self) : NULL;
}


static void vala_gir_parser_real_visit_source_file (ValaCodeVisitor* base, ValaSourceFile* source_file) {
      ValaGirParser * self;
      const gchar* _tmp13_ = NULL;
      gboolean _tmp14_;
      self = (ValaGirParser*) base;
      g_return_if_fail (source_file != NULL);
      {
            ValaList* _tmp0_ = NULL;
            ValaList* _node_list;
            gint _tmp1_;
            gint _node_size;
            gint _node_index;
            _tmp0_ = vala_source_file_get_nodes (source_file);
            _node_list = _tmp0_;
            _tmp1_ = vala_collection_get_size ((ValaCollection*) _node_list);
            _node_size = _tmp1_;
            _node_index = -1;
            while (TRUE) {
                  gpointer _tmp2_ = NULL;
                  ValaCodeNode* node;
                  _node_index = _node_index + 1;
                  if (!(_node_index < _node_size)) {
                        break;
                  }
                  _tmp2_ = vala_list_get (_node_list, _node_index);
                  node = (ValaCodeNode*) _tmp2_;
                  if (VALA_IS_NAMESPACE (node)) {
                        ValaNamespace* _tmp3_;
                        ValaNamespace* ns;
                        const gchar* _tmp4_ = NULL;
                        gchar* _tmp5_;
                        gchar* gir_namespace;
                        gboolean _tmp10_ = FALSE;
                        _tmp3_ = _vala_code_node_ref0 (VALA_NAMESPACE (node));
                        ns = _tmp3_;
                        _tmp4_ = vala_source_file_get_gir_namespace (source_file);
                        _tmp5_ = g_strdup (_tmp4_);
                        gir_namespace = _tmp5_;
                        if (gir_namespace == NULL) {
                              ValaAttribute* _tmp6_ = NULL;
                              ValaAttribute* a;
                              gboolean _tmp7_ = FALSE;
                              _tmp6_ = vala_code_node_get_attribute ((ValaCodeNode*) ns, "CCode");
                              a = _tmp6_;
                              if (a != NULL) {
                                    gboolean _tmp8_;
                                    _tmp8_ = vala_attribute_has_argument (a, "gir_namespace");
                                    _tmp7_ = _tmp8_;
                              } else {
                                    _tmp7_ = FALSE;
                              }
                              if (_tmp7_) {
                                    gchar* _tmp9_ = NULL;
                                    _tmp9_ = vala_attribute_get_string (a, "gir_namespace");
                                    _g_free0 (gir_namespace);
                                    gir_namespace = _tmp9_;
                              }
                              _vala_code_node_unref0 (a);
                        }
                        if (gir_namespace != NULL) {
                              const gchar* _tmp11_ = NULL;
                              _tmp11_ = vala_symbol_get_name ((ValaSymbol*) ns);
                              _tmp10_ = g_strcmp0 (gir_namespace, _tmp11_) != 0;
                        } else {
                              _tmp10_ = FALSE;
                        }
                        if (_tmp10_) {
                              ValaUnresolvedSymbol* _tmp12_ = NULL;
                              ValaUnresolvedSymbol* map_from;
                              _tmp12_ = vala_unresolved_symbol_new (NULL, gir_namespace, NULL);
                              map_from = _tmp12_;
                              vala_gir_parser_set_symbol_mapping (self, (ValaSymbol*) map_from, (ValaSymbol*) ns);
                              _vala_code_node_unref0 (map_from);
                              _g_free0 (gir_namespace);
                              _vala_code_node_unref0 (ns);
                              _vala_code_node_unref0 (node);
                              break;
                        }
                        _g_free0 (gir_namespace);
                        _vala_code_node_unref0 (ns);
                  }
                  _vala_code_node_unref0 (node);
            }
            _vala_iterable_unref0 (_node_list);
      }
      _tmp13_ = vala_source_file_get_filename (source_file);
      _tmp14_ = g_str_has_suffix (_tmp13_, ".gir");
      if (_tmp14_) {
            vala_gir_parser_parse_file (self, source_file);
      }
}


static gpointer _vala_gir_parser_metadata_ref0 (gpointer self) {
      return self ? vala_gir_parser_metadata_ref (self) : NULL;
}


static glong string_strnlen (gchar* str, glong maxlen) {
      glong result = 0L;
      gchar* _tmp0_ = NULL;
      gchar* end;
      _tmp0_ = memchr (str, 0, (gsize) maxlen);
      end = _tmp0_;
      if (end == NULL) {
            result = maxlen;
            return result;
      } else {
            result = (glong) (end - str);
            return result;
      }
}


static gchar* string_substring (const gchar* self, glong offset, glong len) {
      gchar* result = NULL;
      glong string_length = 0L;
      gboolean _tmp0_ = FALSE;
      gchar* _tmp3_ = NULL;
      g_return_val_if_fail (self != NULL, NULL);
      if (offset >= 0) {
            _tmp0_ = len >= 0;
      } else {
            _tmp0_ = FALSE;
      }
      if (_tmp0_) {
            glong _tmp1_;
            _tmp1_ = string_strnlen ((gchar*) self, offset + len);
            string_length = _tmp1_;
      } else {
            gint _tmp2_;
            _tmp2_ = strlen (self);
            string_length = (glong) _tmp2_;
      }
      if (offset < 0) {
            offset = string_length + offset;
            g_return_val_if_fail (offset >= 0, NULL);
      } else {
            g_return_val_if_fail (offset <= string_length, NULL);
      }
      if (len < 0) {
            len = string_length - offset;
      }
      g_return_val_if_fail ((offset + len) <= string_length, NULL);
      _tmp3_ = g_strndup (((gchar*) self) + offset, (gsize) len);
      result = _tmp3_;
      return result;
}


static gpointer _vala_source_file_ref0 (gpointer self) {
      return self ? vala_source_file_ref (self) : NULL;
}


void vala_gir_parser_parse_file (ValaGirParser* self, ValaSourceFile* source_file) {
      ValaArrayList* _tmp0_ = NULL;
      ValaGirParserMetadata* _tmp1_ = NULL;
      ValaGirParserMetadata* _tmp2_;
      ValaArrayList* _tmp3_ = NULL;
      const gchar* _tmp4_ = NULL;
      const gchar* _tmp5_ = NULL;
      gint _tmp6_;
      gint _tmp7_;
      gchar* _tmp8_ = NULL;
      gchar* _tmp9_;
      gchar* _tmp10_ = NULL;
      gchar* _tmp11_;
      gchar* metadata_filename;
      gboolean _tmp12_;
      ValaSourceFile* _tmp17_;
      const gchar* _tmp18_ = NULL;
      ValaMarkupReader* _tmp19_ = NULL;
      g_return_if_fail (self != NULL);
      g_return_if_fail (source_file != NULL);
      _tmp0_ = vala_array_list_new (VALA_GIR_PARSER_TYPE_METADATA, (GBoxedCopyFunc) vala_gir_parser_metadata_ref, vala_gir_parser_metadata_unref, g_direct_equal);
      _vala_iterable_unref0 (self->priv->metadata_stack);
      self->priv->metadata_stack = _tmp0_;
      _tmp1_ = vala_gir_parser_metadata_get_empty ();
      _tmp2_ = _vala_gir_parser_metadata_ref0 (_tmp1_);
      _vala_gir_parser_metadata_unref0 (self->priv->metadata);
      self->priv->metadata = _tmp2_;
      _tmp3_ = vala_array_list_new (VALA_TYPE_HASH_MAP, (GBoxedCopyFunc) vala_map_ref, vala_map_unref, g_direct_equal);
      _vala_iterable_unref0 (self->priv->girdata_stack);
      self->priv->girdata_stack = _tmp3_;
      _tmp4_ = vala_source_file_get_filename (source_file);
      _tmp5_ = vala_source_file_get_filename (source_file);
      _tmp6_ = strlen (_tmp5_);
      _tmp7_ = strlen (".gir");
      _tmp8_ = string_substring (_tmp4_, (glong) 0, (glong) (_tmp6_ - _tmp7_));
      _tmp9_ = _tmp8_;
      _tmp10_ = g_strdup_printf ("%s.metadata", _tmp9_);
      _tmp11_ = _tmp10_;
      _g_free0 (_tmp9_);
      metadata_filename = _tmp11_;
      _tmp12_ = g_file_test (metadata_filename, G_FILE_TEST_EXISTS);
      if (_tmp12_) {
            ValaGirParserMetadataParser* _tmp13_ = NULL;
            ValaGirParserMetadataParser* metadata_parser;
            ValaSourceFileType _tmp14_;
            ValaSourceFile* _tmp15_ = NULL;
            ValaSourceFile* metadata_file;
            ValaGirParserMetadata* _tmp16_ = NULL;
            _tmp13_ = vala_gir_parser_metadata_parser_new ();
            metadata_parser = _tmp13_;
            _tmp14_ = vala_source_file_get_file_type (source_file);
            _tmp15_ = vala_source_file_new (self->priv->context, _tmp14_, metadata_filename, NULL);
            metadata_file = _tmp15_;
            vala_code_context_add_source_file (self->priv->context, metadata_file);
            _tmp16_ = vala_gir_parser_metadata_parser_parse_metadata (metadata_parser, metadata_file);
            _vala_gir_parser_metadata_unref0 (self->priv->metadata);
            self->priv->metadata = _tmp16_;
            _vala_source_file_unref0 (metadata_file);
            _vala_gir_parser_metadata_parser_unref0 (metadata_parser);
      }
      _tmp17_ = _vala_source_file_ref0 (source_file);
      _vala_source_file_unref0 (self->priv->current_source_file);
      self->priv->current_source_file = _tmp17_;
      _tmp18_ = vala_source_file_get_filename (source_file);
      _tmp19_ = vala_markup_reader_new (_tmp18_);
      _g_object_unref0 (self->priv->reader);
      self->priv->reader = _tmp19_;
      vala_gir_parser_next (self);
      vala_gir_parser_next (self);
      vala_gir_parser_next (self);
      vala_gir_parser_parse_repository (self);
      vala_gir_parser_report_unused_metadata (self, self->priv->metadata);
      _g_object_unref0 (self->priv->reader);
      self->priv->reader = NULL;
      _vala_source_file_unref0 (self->priv->current_source_file);
      self->priv->current_source_file = NULL;
      _g_free0 (metadata_filename);
}


static void vala_gir_parser_next (ValaGirParser* self) {
      ValaSourceLocation _tmp0_ = {0};
      ValaSourceLocation _tmp1_ = {0};
      ValaMarkupTokenType _tmp2_;
      gboolean _tmp3_ = FALSE;
      g_return_if_fail (self != NULL);
      _tmp2_ = vala_markup_reader_read_token (self->priv->reader, &_tmp0_, &_tmp1_);
      self->priv->begin = _tmp0_;
      self->priv->end = _tmp1_;
      self->priv->current_token = _tmp2_;
      if (self->priv->current_token == VALA_MARKUP_TOKEN_TYPE_START_ELEMENT) {
            const gchar* _tmp4_ = NULL;
            _tmp4_ = vala_markup_reader_get_name (self->priv->reader);
            _tmp3_ = g_strcmp0 (_tmp4_, "doc") == 0;
      } else {
            _tmp3_ = FALSE;
      }
      if (_tmp3_) {
            vala_gir_parser_skip_element (self);
      }
}


static void vala_gir_parser_start_element (ValaGirParser* self, const gchar* name) {
      gboolean _tmp0_ = FALSE;
      g_return_if_fail (self != NULL);
      g_return_if_fail (name != NULL);
      if (self->priv->current_token != VALA_MARKUP_TOKEN_TYPE_START_ELEMENT) {
            _tmp0_ = TRUE;
      } else {
            const gchar* _tmp1_ = NULL;
            _tmp1_ = vala_markup_reader_get_name (self->priv->reader);
            _tmp0_ = g_strcmp0 (_tmp1_, name) != 0;
      }
      if (_tmp0_) {
            ValaSourceReference* _tmp2_ = NULL;
            ValaSourceReference* _tmp3_;
            gchar* _tmp4_ = NULL;
            gchar* _tmp5_;
            _tmp2_ = vala_gir_parser_get_current_src (self);
            _tmp3_ = _tmp2_;
            _tmp4_ = g_strdup_printf ("expected start element of `%s'", name);
            _tmp5_ = _tmp4_;
            vala_report_error (_tmp3_, _tmp5_);
            _g_free0 (_tmp5_);
            _vala_source_reference_unref0 (_tmp3_);
      }
}


static void vala_gir_parser_end_element (ValaGirParser* self, const gchar* name) {
      gboolean _tmp0_ = FALSE;
      g_return_if_fail (self != NULL);
      g_return_if_fail (name != NULL);
      if (self->priv->current_token != VALA_MARKUP_TOKEN_TYPE_END_ELEMENT) {
            _tmp0_ = TRUE;
      } else {
            const gchar* _tmp1_ = NULL;
            _tmp1_ = vala_markup_reader_get_name (self->priv->reader);
            _tmp0_ = g_strcmp0 (_tmp1_, name) != 0;
      }
      if (_tmp0_) {
            ValaSourceReference* _tmp2_ = NULL;
            ValaSourceReference* _tmp3_;
            gchar* _tmp4_ = NULL;
            gchar* _tmp5_;
            _tmp2_ = vala_gir_parser_get_current_src (self);
            _tmp3_ = _tmp2_;
            _tmp4_ = g_strdup_printf ("expected end element of `%s'", name);
            _tmp5_ = _tmp4_;
            vala_report_error (_tmp3_, _tmp5_);
            _g_free0 (_tmp5_);
            _vala_source_reference_unref0 (_tmp3_);
      }
      vala_gir_parser_next (self);
}


static ValaSourceReference* vala_gir_parser_get_current_src (ValaGirParser* self) {
      ValaSourceReference* result = NULL;
      ValaSourceReference* _tmp0_ = NULL;
      g_return_val_if_fail (self != NULL, NULL);
      _tmp0_ = vala_source_reference_new (self->priv->current_source_file, self->priv->begin.line, self->priv->begin.column, self->priv->end.line, self->priv->end.column);
      result = _tmp0_;
      return result;
}


static void vala_gir_parser_add_symbol_to_container (ValaGirParser* self, ValaSymbol* container, ValaSymbol* sym) {
      g_return_if_fail (self != NULL);
      g_return_if_fail (container != NULL);
      g_return_if_fail (sym != NULL);
      if (VALA_IS_CLASS (container)) {
            ValaClass* cl;
            cl = VALA_CLASS (container);
            if (VALA_IS_CLASS (sym)) {
                  vala_symbol_add_class ((ValaSymbol*) cl, VALA_CLASS (sym));
            } else {
                  if (VALA_IS_CONSTANT (sym)) {
                        vala_symbol_add_constant ((ValaSymbol*) cl, VALA_CONSTANT (sym));
                  } else {
                        if (VALA_IS_ENUM (sym)) {
                              vala_symbol_add_enum ((ValaSymbol*) cl, VALA_ENUM (sym));
                        } else {
                              if (VALA_IS_FIELD (sym)) {
                                    vala_symbol_add_field ((ValaSymbol*) cl, VALA_FIELD (sym));
                              } else {
                                    if (VALA_IS_METHOD (sym)) {
                                          vala_symbol_add_method ((ValaSymbol*) cl, VALA_METHOD (sym));
                                    } else {
                                          if (VALA_IS_PROPERTY (sym)) {
                                                vala_symbol_add_property ((ValaSymbol*) cl, VALA_PROPERTY (sym));
                                          } else {
                                                if (VALA_IS_SIGNAL (sym)) {
                                                      vala_symbol_add_signal ((ValaSymbol*) cl, VALA_SIGNAL (sym));
                                                } else {
                                                      if (VALA_IS_STRUCT (sym)) {
                                                            vala_symbol_add_struct ((ValaSymbol*) cl, VALA_STRUCT (sym));
                                                      }
                                                }
                                          }
                                    }
                              }
                        }
                  }
            }
      } else {
            if (VALA_IS_ENUM (container)) {
                  ValaEnum* en;
                  en = VALA_ENUM (container);
                  if (VALA_IS_ENUM_VALUE (sym)) {
                        vala_enum_add_value (en, VALA_ENUM_VALUE (sym));
                  } else {
                        if (VALA_IS_CONSTANT (sym)) {
                              vala_symbol_add_constant ((ValaSymbol*) en, VALA_CONSTANT (sym));
                        } else {
                              if (VALA_IS_METHOD (sym)) {
                                    vala_symbol_add_method ((ValaSymbol*) en, VALA_METHOD (sym));
                              }
                        }
                  }
            } else {
                  if (VALA_IS_INTERFACE (container)) {
                        ValaInterface* iface;
                        iface = VALA_INTERFACE (container);
                        if (VALA_IS_CLASS (sym)) {
                              vala_symbol_add_class ((ValaSymbol*) iface, VALA_CLASS (sym));
                        } else {
                              if (VALA_IS_CONSTANT (sym)) {
                                    vala_symbol_add_constant ((ValaSymbol*) iface, VALA_CONSTANT (sym));
                              } else {
                                    if (VALA_IS_ENUM (sym)) {
                                          vala_symbol_add_enum ((ValaSymbol*) iface, VALA_ENUM (sym));
                                    } else {
                                          if (VALA_IS_FIELD (sym)) {
                                                vala_symbol_add_field ((ValaSymbol*) iface, VALA_FIELD (sym));
                                          } else {
                                                if (VALA_IS_METHOD (sym)) {
                                                      vala_symbol_add_method ((ValaSymbol*) iface, VALA_METHOD (sym));
                                                } else {
                                                      if (VALA_IS_PROPERTY (sym)) {
                                                            vala_symbol_add_property ((ValaSymbol*) iface, VALA_PROPERTY (sym));
                                                      } else {
                                                            if (VALA_IS_SIGNAL (sym)) {
                                                                  vala_symbol_add_signal ((ValaSymbol*) iface, VALA_SIGNAL (sym));
                                                            } else {
                                                                  if (VALA_IS_STRUCT (sym)) {
                                                                        vala_symbol_add_struct ((ValaSymbol*) iface, VALA_STRUCT (sym));
                                                                  }
                                                            }
                                                      }
                                                }
                                          }
                                    }
                              }
                        }
                  } else {
                        if (VALA_IS_NAMESPACE (container)) {
                              ValaNamespace* ns;
                              ns = VALA_NAMESPACE (container);
                              if (VALA_IS_NAMESPACE (sym)) {
                                    vala_symbol_add_namespace ((ValaSymbol*) ns, VALA_NAMESPACE (sym));
                              } else {
                                    if (VALA_IS_CLASS (sym)) {
                                          vala_symbol_add_class ((ValaSymbol*) ns, VALA_CLASS (sym));
                                    } else {
                                          if (VALA_IS_CONSTANT (sym)) {
                                                vala_symbol_add_constant ((ValaSymbol*) ns, VALA_CONSTANT (sym));
                                          } else {
                                                if (VALA_IS_DELEGATE (sym)) {
                                                      vala_symbol_add_delegate ((ValaSymbol*) ns, VALA_DELEGATE (sym));
                                                } else {
                                                      if (VALA_IS_ENUM (sym)) {
                                                            vala_symbol_add_enum ((ValaSymbol*) ns, VALA_ENUM (sym));
                                                      } else {
                                                            if (VALA_IS_ERROR_DOMAIN (sym)) {
                                                                  vala_symbol_add_error_domain ((ValaSymbol*) ns, VALA_ERROR_DOMAIN (sym));
                                                            } else {
                                                                  if (VALA_IS_FIELD (sym)) {
                                                                        vala_symbol_add_field ((ValaSymbol*) ns, VALA_FIELD (sym));
                                                                  } else {
                                                                        if (VALA_IS_INTERFACE (sym)) {
                                                                              vala_symbol_add_interface ((ValaSymbol*) ns, VALA_INTERFACE (sym));
                                                                        } else {
                                                                              if (VALA_IS_METHOD (sym)) {
                                                                                    vala_symbol_add_method ((ValaSymbol*) ns, VALA_METHOD (sym));
                                                                              } else {
                                                                                    if (VALA_IS_NAMESPACE (sym)) {
                                                                                          vala_symbol_add_namespace ((ValaSymbol*) ns, VALA_NAMESPACE (sym));
                                                                                    } else {
                                                                                          if (VALA_IS_STRUCT (sym)) {
                                                                                                vala_symbol_add_struct ((ValaSymbol*) ns, VALA_STRUCT (sym));
                                                                                          }
                                                                                    }
                                                                              }
                                                                        }
                                                                  }
                                                            }
                                                      }
                                                }
                                          }
                                    }
                              }
                        } else {
                              if (VALA_IS_STRUCT (container)) {
                                    ValaStruct* st;
                                    st = VALA_STRUCT (container);
                                    if (VALA_IS_CONSTANT (sym)) {
                                          vala_symbol_add_constant ((ValaSymbol*) st, VALA_CONSTANT (sym));
                                    } else {
                                          if (VALA_IS_FIELD (sym)) {
                                                vala_symbol_add_field ((ValaSymbol*) st, VALA_FIELD (sym));
                                          } else {
                                                if (VALA_IS_METHOD (sym)) {
                                                      vala_symbol_add_method ((ValaSymbol*) st, VALA_METHOD (sym));
                                                } else {
                                                      if (VALA_IS_PROPERTY (sym)) {
                                                            vala_symbol_add_property ((ValaSymbol*) st, VALA_PROPERTY (sym));
                                                      }
                                                }
                                          }
                                    }
                              } else {
                                    ValaSourceReference* _tmp0_ = NULL;
                                    const gchar* _tmp1_ = NULL;
                                    gchar* _tmp2_ = NULL;
                                    gchar* _tmp3_;
                                    _tmp0_ = vala_code_node_get_source_reference ((ValaCodeNode*) sym);
                                    _tmp1_ = vala_symbol_get_name (container);
                                    _tmp2_ = g_strdup_printf ("impossible to add to container `%s'", _tmp1_);
                                    _tmp3_ = _tmp2_;
                                    vala_report_error (_tmp0_, _tmp3_);
                                    _g_free0 (_tmp3_);
                              }
                        }
                  }
            }
      }
}


static ValaUnresolvedSymbol* vala_gir_parser_parse_symbol_from_string (ValaGirParser* self, const gchar* symbol_string, ValaSourceReference* source_reference) {
      ValaUnresolvedSymbol* result = NULL;
      ValaUnresolvedSymbol* sym;
      gchar** _tmp0_;
      gchar** _tmp1_ = NULL;
      g_return_val_if_fail (self != NULL, NULL);
      g_return_val_if_fail (symbol_string != NULL, NULL);
      sym = NULL;
      _tmp1_ = _tmp0_ = g_strsplit (symbol_string, ".", 0);
      {
            gchar** s_collection;
            int s_collection_length1;
            int s_it;
            s_collection = _tmp1_;
            s_collection_length1 = _vala_array_length (_tmp0_);
            for (s_it = 0; s_it < _vala_array_length (_tmp0_); s_it = s_it + 1) {
                  const gchar* s;
                  s = s_collection[s_it];
                  {
                        ValaUnresolvedSymbol* _tmp2_ = NULL;
                        _tmp2_ = vala_unresolved_symbol_new (sym, s, source_reference);
                        _vala_code_node_unref0 (sym);
                        sym = _tmp2_;
                  }
            }
            s_collection = (_vala_array_free (s_collection, s_collection_length1, (GDestroyNotify) g_free), NULL);
      }
      if (sym == NULL) {
            vala_report_error (source_reference, "a symbol must be specified");
      }
      result = sym;
      return result;
}


static ValaUnresolvedSymbol* vala_gir_parser_get_unresolved_symbol (ValaGirParser* self, ValaSymbol* symbol) {
      ValaUnresolvedSymbol* result = NULL;
      const gchar* _tmp1_ = NULL;
      ValaUnresolvedSymbol* _tmp2_ = NULL;
      ValaUnresolvedSymbol* sym;
      ValaUnresolvedSymbol* _tmp3_;
      ValaUnresolvedSymbol* _result_;
      ValaCodeNode* _tmp4_ = NULL;
      ValaCodeNode* _tmp5_;
      ValaSymbol* _tmp6_;
      ValaSymbol* cur;
      g_return_val_if_fail (self != NULL, NULL);
      g_return_val_if_fail (symbol != NULL, NULL);
      if (VALA_IS_UNRESOLVED_SYMBOL (symbol)) {
            ValaUnresolvedSymbol* _tmp0_;
            _tmp0_ = _vala_code_node_ref0 (VALA_UNRESOLVED_SYMBOL (symbol));
            result = _tmp0_;
            return result;
      }
      _tmp1_ = vala_symbol_get_name (symbol);
      _tmp2_ = vala_unresolved_symbol_new (NULL, _tmp1_, NULL);
      sym = _tmp2_;
      _tmp3_ = _vala_code_node_ref0 (sym);
      _result_ = _tmp3_;
      _tmp4_ = vala_code_node_get_parent_node ((ValaCodeNode*) symbol);
      _tmp5_ = _tmp4_;
      _tmp6_ = _vala_code_node_ref0 (VALA_IS_SYMBOL (_tmp5_) ? ((ValaSymbol*) _tmp5_) : NULL);
      cur = _tmp6_;
      while (TRUE) {
            gboolean _tmp7_ = FALSE;
            const gchar* _tmp9_ = NULL;
            ValaUnresolvedSymbol* _tmp10_ = NULL;
            ValaCodeNode* _tmp11_ = NULL;
            ValaCodeNode* _tmp12_;
            ValaSymbol* _tmp13_;
            if (cur != NULL) {
                  const gchar* _tmp8_ = NULL;
                  _tmp8_ = vala_symbol_get_name (cur);
                  _tmp7_ = _tmp8_ != NULL;
            } else {
                  _tmp7_ = FALSE;
            }
            if (!_tmp7_) {
                  break;
            }
            _tmp9_ = vala_symbol_get_name (cur);
            _tmp10_ = vala_unresolved_symbol_new (sym, _tmp9_, NULL);
            _vala_code_node_unref0 (sym);
            sym = _tmp10_;
            _tmp11_ = vala_code_node_get_parent_node ((ValaCodeNode*) cur);
            _tmp12_ = _tmp11_;
            _tmp13_ = _vala_code_node_ref0 (VALA_IS_SYMBOL (_tmp12_) ? ((ValaSymbol*) _tmp12_) : NULL);
            _vala_code_node_unref0 (cur);
            cur = _tmp13_;
      }
      result = _result_;
      _vala_code_node_unref0 (cur);
      _vala_code_node_unref0 (sym);
      return result;
}


static void vala_gir_parser_set_symbol_mapping (ValaGirParser* self, ValaSymbol* map_from, ValaSymbol* map_to) {
      g_return_if_fail (self != NULL);
      g_return_if_fail (map_from != NULL);
      g_return_if_fail (map_to != NULL);
      if (VALA_IS_UNRESOLVED_SYMBOL (map_from)) {
            vala_map_set ((ValaMap*) self->priv->unresolved_symbols_map, VALA_UNRESOLVED_SYMBOL (map_from), map_to);
      } else {
            vala_map_set ((ValaMap*) self->priv->concrete_symbols_map, map_from, map_to);
      }
}


static void vala_gir_parser_assume_parameter_names (ValaGirParser* self, ValaSignal* sig, ValaSymbol* sym) {
      ValaIterator* iter = NULL;
      g_return_if_fail (self != NULL);
      g_return_if_fail (sig != NULL);
      g_return_if_fail (sym != NULL);
      if (VALA_IS_METHOD (sym)) {
            ValaList* _tmp0_ = NULL;
            ValaList* _tmp1_;
            ValaIterator* _tmp2_ = NULL;
            _tmp0_ = vala_method_get_parameters (VALA_METHOD (sym));
            _tmp1_ = _tmp0_;
            _tmp2_ = vala_iterable_iterator ((ValaIterable*) _tmp1_);
            _vala_iterator_unref0 (iter);
            iter = _tmp2_;
            _vala_iterable_unref0 (_tmp1_);
      } else {
            ValaList* _tmp3_ = NULL;
            ValaList* _tmp4_;
            ValaIterator* _tmp5_ = NULL;
            _tmp3_ = vala_delegate_get_parameters (VALA_DELEGATE (sym));
            _tmp4_ = _tmp3_;
            _tmp5_ = vala_iterable_iterator ((ValaIterable*) _tmp4_);
            _vala_iterator_unref0 (iter);
            iter = _tmp5_;
            _vala_iterable_unref0 (_tmp4_);
      }
      {
            ValaList* _tmp6_ = NULL;
            ValaList* _param_list;
            gint _tmp7_;
            gint _param_size;
            gint _param_index;
            _tmp6_ = vala_signal_get_parameters (sig);
            _param_list = _tmp6_;
            _tmp7_ = vala_collection_get_size ((ValaCollection*) _param_list);
            _param_size = _tmp7_;
            _param_index = -1;
            while (TRUE) {
                  gpointer _tmp8_ = NULL;
                  ValaParameter* param;
                  gboolean _tmp9_;
                  gpointer _tmp10_ = NULL;
                  ValaParameter* _tmp11_;
                  const gchar* _tmp12_ = NULL;
                  _param_index = _param_index + 1;
                  if (!(_param_index < _param_size)) {
                        break;
                  }
                  _tmp8_ = vala_list_get (_param_list, _param_index);
                  param = (ValaParameter*) _tmp8_;
                  _tmp9_ = vala_iterator_next (iter);
                  if (!_tmp9_) {
                        _vala_code_node_unref0 (param);
                        break;
                  }
                  _tmp10_ = vala_iterator_get (iter);
                  _tmp11_ = (ValaParameter*) _tmp10_;
                  _tmp12_ = vala_symbol_get_name ((ValaSymbol*) _tmp11_);
                  vala_symbol_set_name ((ValaSymbol*) param, _tmp12_);
                  _vala_code_node_unref0 (_tmp11_);
                  _vala_code_node_unref0 (param);
            }
            _vala_iterable_unref0 (_param_list);
      }
      _vala_iterator_unref0 (iter);
}


static gpointer _vala_map_ref0 (gpointer self) {
      return self ? vala_map_ref (self) : NULL;
}


static ValaGirParserSymbolInfo* vala_gir_parser_add_symbol_info (ValaGirParser* self, ValaSymbol* symbol) {
      ValaGirParserSymbolInfo* result = NULL;
      const gchar* _tmp0_ = NULL;
      gchar* _tmp1_;
      gchar* name;
      gboolean _tmp2_ = FALSE;
      ValaGirParserSymbolInfo* _tmp4_ = NULL;
      ValaGirParserSymbolInfo* info;
      ValaSymbol* _tmp5_;
      ValaGirParserMetadata* _tmp6_;
      ValaHashMap* _tmp7_;
      gpointer _tmp8_ = NULL;
      ValaArrayList* colliding;
      g_return_val_if_fail (self != NULL, NULL);
      g_return_val_if_fail (symbol != NULL, NULL);
      _tmp0_ = vala_symbol_get_name (symbol);
      _tmp1_ = g_strdup (_tmp0_);
      name = _tmp1_;
      if (VALA_IS_CREATION_METHOD (symbol)) {
            _tmp2_ = name == NULL;
      } else {
            _tmp2_ = FALSE;
      }
      if (_tmp2_) {
            gchar* _tmp3_;
            _tmp3_ = g_strdup (".new");
            _g_free0 (name);
            name = _tmp3_;
      }
      _tmp4_ = vala_gir_parser_symbol_info_new ();
      info = _tmp4_;
      _tmp5_ = _vala_code_node_ref0 (symbol);
      _vala_code_node_unref0 (info->symbol);
      info->symbol = _tmp5_;
      _tmp6_ = _vala_gir_parser_metadata_ref0 (self->priv->metadata);
      _vala_gir_parser_metadata_unref0 (info->metadata);
      info->metadata = _tmp6_;
      _tmp7_ = _vala_map_ref0 (self->priv->girdata);
      _vala_map_unref0 (info->girdata);
      info->girdata = _tmp7_;
      _tmp8_ = vala_map_get ((ValaMap*) self->priv->current_symbols_info, name);
      colliding = (ValaArrayList*) _tmp8_;
      if (colliding == NULL) {
            ValaArrayList* _tmp9_ = NULL;
            _tmp9_ = vala_array_list_new (VALA_GIR_PARSER_TYPE_SYMBOL_INFO, (GBoxedCopyFunc) vala_gir_parser_symbol_info_ref, vala_gir_parser_symbol_info_unref, g_direct_equal);
            _vala_iterable_unref0 (colliding);
            colliding = _tmp9_;
            vala_map_set ((ValaMap*) self->priv->current_symbols_info, name, colliding);
      }
      vala_collection_add ((ValaCollection*) colliding, info);
      result = info;
      _vala_iterable_unref0 (colliding);
      _g_free0 (name);
      return result;
}


static gpointer _vala_iterable_ref0 (gpointer self) {
      return self ? vala_iterable_ref (self) : NULL;
}


static ValaGirParserSymbolInfo* vala_gir_parser_find_invoker (ValaGirParser* self, ValaMethod* method) {
      ValaGirParserSymbolInfo* result = NULL;
      const gchar* _tmp0_ = NULL;
      gchar* _tmp1_ = NULL;
      gchar* prefix;
      g_return_val_if_fail (self != NULL, NULL);
      g_return_val_if_fail (method != NULL, NULL);
      _tmp0_ = vala_symbol_get_name ((ValaSymbol*) method);
      _tmp1_ = g_strdup_printf ("%s_", _tmp0_);
      prefix = _tmp1_;
      {
            ValaSet* _tmp2_ = NULL;
            ValaSet* _tmp3_;
            ValaIterator* _tmp4_ = NULL;
            ValaIterator* _tmp5_;
            ValaIterator* _name_it;
            _tmp2_ = vala_map_get_keys ((ValaMap*) self->priv->current_symbols_info);
            _tmp3_ = _tmp2_;
            _tmp4_ = vala_iterable_iterator ((ValaIterable*) _tmp3_);
            _tmp5_ = _tmp4_;
            _vala_iterable_unref0 (_tmp3_);
            _name_it = _tmp5_;
            while (TRUE) {
                  gboolean _tmp6_;
                  gpointer _tmp7_ = NULL;
                  gchar* name;
                  gboolean _tmp8_;
                  gpointer _tmp9_ = NULL;
                  ValaArrayList* infos;
                  _tmp6_ = vala_iterator_next (_name_it);
                  if (!_tmp6_) {
                        break;
                  }
                  _tmp7_ = vala_iterator_get (_name_it);
                  name = (gchar*) _tmp7_;
                  _tmp8_ = g_str_has_prefix (name, prefix);
                  if (!_tmp8_) {
                        _g_free0 (name);
                        continue;
                  }
                  _tmp9_ = vala_map_get ((ValaMap*) self->priv->current_symbols_info, name);
                  infos = (ValaArrayList*) _tmp9_;
                  {
                        ValaArrayList* _tmp10_;
                        ValaArrayList* _cinfo_list;
                        gint _tmp11_;
                        gint _cinfo_size;
                        gint _cinfo_index;
                        _tmp10_ = _vala_iterable_ref0 (infos);
                        _cinfo_list = _tmp10_;
                        _tmp11_ = vala_collection_get_size ((ValaCollection*) _cinfo_list);
                        _cinfo_size = _tmp11_;
                        _cinfo_index = -1;
                        while (TRUE) {
                              gpointer _tmp12_ = NULL;
                              ValaGirParserSymbolInfo* cinfo;
                              ValaSymbol* _tmp13_;
                              ValaMethod* _tmp14_;
                              ValaMethod* invoker;
                              gboolean _tmp15_ = FALSE;
                              ValaList* _tmp22_ = NULL;
                              ValaList* _tmp23_;
                              ValaIterator* _tmp24_ = NULL;
                              ValaIterator* _tmp25_;
                              ValaIterator* iter;
                              _cinfo_index = _cinfo_index + 1;
                              if (!(_cinfo_index < _cinfo_size)) {
                                    break;
                              }
                              _tmp12_ = vala_list_get ((ValaList*) _cinfo_list, _cinfo_index);
                              cinfo = (ValaGirParserSymbolInfo*) _tmp12_;
                              _tmp13_ = cinfo->symbol;
                              _tmp14_ = _vala_code_node_ref0 (VALA_IS_METHOD (_tmp13_) ? ((ValaMethod*) _tmp13_) : NULL);
                              invoker = _tmp14_;
                              if (invoker == NULL) {
                                    _tmp15_ = TRUE;
                              } else {
                                    ValaList* _tmp16_ = NULL;
                                    ValaList* _tmp17_;
                                    gint _tmp18_;
                                    ValaList* _tmp19_ = NULL;
                                    ValaList* _tmp20_;
                                    gint _tmp21_;
                                    _tmp16_ = vala_method_get_parameters (method);
                                    _tmp17_ = _tmp16_;
                                    _tmp18_ = vala_collection_get_size ((ValaCollection*) _tmp17_);
                                    _tmp19_ = vala_method_get_parameters (invoker);
                                    _tmp20_ = _tmp19_;
                                    _tmp21_ = vala_collection_get_size ((ValaCollection*) _tmp20_);
                                    _tmp15_ = _tmp18_ != _tmp21_;
                                    _vala_iterable_unref0 (_tmp20_);
                                    _vala_iterable_unref0 (_tmp17_);
                              }
                              if (_tmp15_) {
                                    _vala_code_node_unref0 (invoker);
                                    _vala_gir_parser_symbol_info_unref0 (cinfo);
                                    continue;
                              }
                              _tmp22_ = vala_method_get_parameters (invoker);
                              _tmp23_ = _tmp22_;
                              _tmp24_ = vala_iterable_iterator ((ValaIterable*) _tmp23_);
                              _tmp25_ = _tmp24_;
                              _vala_iterable_unref0 (_tmp23_);
                              iter = _tmp25_;
                              {
                                    ValaList* _tmp26_ = NULL;
                                    ValaList* _param_list;
                                    gint _tmp27_;
                                    gint _param_size;
                                    gint _param_index;
                                    _tmp26_ = vala_method_get_parameters (method);
                                    _param_list = _tmp26_;
                                    _tmp27_ = vala_collection_get_size ((ValaCollection*) _param_list);
                                    _param_size = _tmp27_;
                                    _param_index = -1;
                                    while (TRUE) {
                                          gpointer _tmp28_ = NULL;
                                          ValaParameter* param;
                                          gboolean _tmp29_;
                                          const gchar* _tmp30_ = NULL;
                                          gpointer _tmp31_ = NULL;
                                          ValaParameter* _tmp32_;
                                          const gchar* _tmp33_ = NULL;
                                          gboolean _tmp34_;
                                          _param_index = _param_index + 1;
                                          if (!(_param_index < _param_size)) {
                                                break;
                                          }
                                          _tmp28_ = vala_list_get (_param_list, _param_index);
                                          param = (ValaParameter*) _tmp28_;
                                          _tmp29_ = vala_iterator_next (iter);
                                          g_assert (_tmp29_);
                                          _tmp30_ = vala_symbol_get_name ((ValaSymbol*) param);
                                          _tmp31_ = vala_iterator_get (iter);
                                          _tmp32_ = (ValaParameter*) _tmp31_;
                                          _tmp33_ = vala_symbol_get_name ((ValaSymbol*) _tmp32_);
                                          _tmp34_ = g_strcmp0 (_tmp30_, _tmp33_) != 0;
                                          _vala_code_node_unref0 (_tmp32_);
                                          if (_tmp34_) {
                                                _vala_code_node_unref0 (invoker);
                                                invoker = NULL;
                                                _vala_code_node_unref0 (param);
                                                break;
                                          }
                                          _vala_code_node_unref0 (param);
                                    }
                                    _vala_iterable_unref0 (_param_list);
                              }
                              if (invoker != NULL) {
                                    result = cinfo;
                                    _vala_iterator_unref0 (iter);
                                    _vala_code_node_unref0 (invoker);
                                    _vala_iterable_unref0 (_cinfo_list);
                                    _vala_iterable_unref0 (infos);
                                    _g_free0 (name);
                                    _vala_iterator_unref0 (_name_it);
                                    _g_free0 (prefix);
                                    return result;
                              }
                              _vala_iterator_unref0 (iter);
                              _vala_code_node_unref0 (invoker);
                              _vala_gir_parser_symbol_info_unref0 (cinfo);
                        }
                        _vala_iterable_unref0 (_cinfo_list);
                  }
                  _vala_iterable_unref0 (infos);
                  _g_free0 (name);
            }
            _vala_iterator_unref0 (_name_it);
      }
      result = NULL;
      _g_free0 (prefix);
      return result;
}


static void vala_gir_parser_merge (ValaGirParser* self, ValaGirParserSymbolInfo* info, ValaArrayList* colliding, ValaArrayList* merged) {
      g_return_if_fail (self != NULL);
      g_return_if_fail (info != NULL);
      g_return_if_fail (colliding != NULL);
      g_return_if_fail (merged != NULL);
      if (VALA_IS_STRUCT (info->symbol)) {
            gpointer _tmp0_ = NULL;
            gchar* gtype_struct_for;
            gboolean _tmp1_ = FALSE;
            _tmp0_ = vala_map_get ((ValaMap*) info->girdata, "glib:is-gtype-struct-for");
            gtype_struct_for = (gchar*) _tmp0_;
            if (gtype_struct_for != NULL) {
                  gboolean _tmp2_;
                  _tmp2_ = vala_map_contains ((ValaMap*) self->priv->current_symbols_info, gtype_struct_for);
                  _tmp1_ = _tmp2_;
            } else {
                  _tmp1_ = FALSE;
            }
            if (_tmp1_) {
                  gpointer _tmp3_ = NULL;
                  ValaArrayList* _tmp4_;
                  gpointer _tmp5_ = NULL;
                  ValaGirParserSymbolInfo* _tmp6_;
                  ValaSymbol* _tmp7_;
                  ValaInterface* _tmp8_;
                  ValaInterface* _tmp9_;
                  ValaInterface* iface;
                  _tmp3_ = vala_map_get ((ValaMap*) self->priv->current_symbols_info, gtype_struct_for);
                  _tmp4_ = (ValaArrayList*) _tmp3_;
                  _tmp5_ = vala_list_get ((ValaList*) _tmp4_, 0);
                  _tmp6_ = (ValaGirParserSymbolInfo*) _tmp5_;
                  _tmp7_ = _tmp6_->symbol;
                  _tmp8_ = _vala_code_node_ref0 (VALA_IS_INTERFACE (_tmp7_) ? ((ValaInterface*) _tmp7_) : NULL);
                  _tmp9_ = _tmp8_;
                  _vala_gir_parser_symbol_info_unref0 (_tmp6_);
                  _vala_iterable_unref0 (_tmp4_);
                  iface = _tmp9_;
                  if (iface != NULL) {
                        gchar* _tmp10_ = NULL;
                        gchar* _tmp11_;
                        _tmp10_ = vala_typesymbol_get_cname ((ValaTypeSymbol*) VALA_STRUCT (info->symbol), FALSE);
                        _tmp11_ = _tmp10_;
                        vala_interface_set_type_cname (iface, _tmp11_);
                        _g_free0 (_tmp11_);
                  }
                  vala_collection_add ((ValaCollection*) merged, info);
                  _vala_code_node_unref0 (iface);
            }
            _g_free0 (gtype_struct_for);
      } else {
            if (VALA_IS_PROPERTY (info->symbol)) {
                  const gchar* _tmp17_ = NULL;
                  gchar* _tmp18_ = NULL;
                  gchar* getter_name;
                  gboolean _tmp19_;
                  {
                        ValaArrayList* _tmp12_;
                        ValaArrayList* _cinfo_list;
                        gint _tmp13_;
                        gint _cinfo_size;
                        gint _cinfo_index;
                        _tmp12_ = _vala_iterable_ref0 (colliding);
                        _cinfo_list = _tmp12_;
                        _tmp13_ = vala_collection_get_size ((ValaCollection*) _cinfo_list);
                        _cinfo_size = _tmp13_;
                        _cinfo_index = -1;
                        while (TRUE) {
                              gpointer _tmp14_ = NULL;
                              ValaGirParserSymbolInfo* cinfo;
                              ValaSymbol* _tmp15_;
                              ValaSymbol* sym;
                              gboolean _tmp16_ = FALSE;
                              _cinfo_index = _cinfo_index + 1;
                              if (!(_cinfo_index < _cinfo_size)) {
                                    break;
                              }
                              _tmp14_ = vala_list_get ((ValaList*) _cinfo_list, _cinfo_index);
                              cinfo = (ValaGirParserSymbolInfo*) _tmp14_;
                              _tmp15_ = _vala_code_node_ref0 (cinfo->symbol);
                              sym = _tmp15_;
                              if (VALA_IS_SIGNAL (sym)) {
                                    _tmp16_ = TRUE;
                              } else {
                                    _tmp16_ = VALA_IS_FIELD (sym);
                              }
                              if (_tmp16_) {
                                    vala_collection_add ((ValaCollection*) merged, cinfo);
                              } else {
                                    if (VALA_IS_METHOD (sym)) {
                                          vala_collection_add ((ValaCollection*) merged, cinfo);
                                    }
                              }
                              _vala_code_node_unref0 (sym);
                              _vala_gir_parser_symbol_info_unref0 (cinfo);
                        }
                        _vala_iterable_unref0 (_cinfo_list);
                  }
                  _tmp17_ = vala_symbol_get_name (info->symbol);
                  _tmp18_ = g_strdup_printf ("get_%s", _tmp17_);
                  getter_name = _tmp18_;
                  _tmp19_ = vala_map_contains ((ValaMap*) self->priv->current_symbols_info, getter_name);
                  if (_tmp19_) {
                        vala_property_set_no_accessor_method (VALA_PROPERTY (info->symbol), FALSE);
                  }
                  _g_free0 (getter_name);
            } else {
                  if (VALA_IS_SIGNAL (info->symbol)) {
                        ValaSignal* _tmp20_;
                        ValaSignal* sig;
                        _tmp20_ = _vala_code_node_ref0 (VALA_SIGNAL (info->symbol));
                        sig = _tmp20_;
                        {
                              ValaArrayList* _tmp21_;
                              ValaArrayList* _cinfo_list;
                              gint _tmp22_;
                              gint _cinfo_size;
                              gint _cinfo_index;
                              _tmp21_ = _vala_iterable_ref0 (colliding);
                              _cinfo_list = _tmp21_;
                              _tmp22_ = vala_collection_get_size ((ValaCollection*) _cinfo_list);
                              _cinfo_size = _tmp22_;
                              _cinfo_index = -1;
                              while (TRUE) {
                                    gpointer _tmp23_ = NULL;
                                    ValaGirParserSymbolInfo* cinfo;
                                    ValaSymbol* _tmp24_;
                                    ValaSymbol* sym;
                                    _cinfo_index = _cinfo_index + 1;
                                    if (!(_cinfo_index < _cinfo_size)) {
                                          break;
                                    }
                                    _tmp23_ = vala_list_get ((ValaList*) _cinfo_list, _cinfo_index);
                                    cinfo = (ValaGirParserSymbolInfo*) _tmp23_;
                                    _tmp24_ = _vala_code_node_ref0 (cinfo->symbol);
                                    sym = _tmp24_;
                                    if (VALA_IS_METHOD (sym)) {
                                          ValaMethod* _tmp25_;
                                          ValaMethod* method;
                                          gboolean _tmp26_;
                                          _tmp25_ = _vala_code_node_ref0 (VALA_METHOD (sym));
                                          method = _tmp25_;
                                          _tmp26_ = vala_method_get_is_virtual (method);
                                          if (_tmp26_) {
                                                vala_signal_set_is_virtual (sig, TRUE);
                                          } else {
                                                vala_signal_set_has_emitter (sig, TRUE);
                                          }
                                          vala_gir_parser_assume_parameter_names (self, sig, (ValaSymbol*) method);
                                          vala_collection_add ((ValaCollection*) merged, cinfo);
                                          _vala_code_node_unref0 (method);
                                    } else {
                                          if (VALA_IS_FIELD (sym)) {
                                                vala_collection_add ((ValaCollection*) merged, cinfo);
                                          }
                                    }
                                    _vala_code_node_unref0 (sym);
                                    _vala_gir_parser_symbol_info_unref0 (cinfo);
                              }
                              _vala_iterable_unref0 (_cinfo_list);
                        }
                        _vala_code_node_unref0 (sig);
                  } else {
                        gboolean _tmp27_ = FALSE;
                        if (VALA_IS_METHOD (info->symbol)) {
                              _tmp27_ = !VALA_IS_CREATION_METHOD (info->symbol);
                        } else {
                              _tmp27_ = FALSE;
                        }
                        if (_tmp27_) {
                              ValaMethod* _tmp28_;
                              ValaMethod* method;
                              _tmp28_ = _vala_code_node_ref0 (VALA_METHOD (info->symbol));
                              method = _tmp28_;
                              {
                                    ValaArrayList* _tmp29_;
                                    ValaArrayList* _cinfo_list;
                                    gint _tmp30_;
                                    gint _cinfo_size;
                                    gint _cinfo_index;
                                    _tmp29_ = _vala_iterable_ref0 (colliding);
                                    _cinfo_list = _tmp29_;
                                    _tmp30_ = vala_collection_get_size ((ValaCollection*) _cinfo_list);
                                    _cinfo_size = _tmp30_;
                                    _cinfo_index = -1;
                                    while (TRUE) {
                                          gpointer _tmp31_ = NULL;
                                          ValaGirParserSymbolInfo* cinfo;
                                          ValaSymbol* _tmp32_;
                                          ValaSymbol* sym;
                                          gboolean _tmp33_ = FALSE;
                                          gboolean _tmp34_ = FALSE;
                                          _cinfo_index = _cinfo_index + 1;
                                          if (!(_cinfo_index < _cinfo_size)) {
                                                break;
                                          }
                                          _tmp31_ = vala_list_get ((ValaList*) _cinfo_list, _cinfo_index);
                                          cinfo = (ValaGirParserSymbolInfo*) _tmp31_;
                                          _tmp32_ = _vala_code_node_ref0 (cinfo->symbol);
                                          sym = _tmp32_;
                                          if (sym != VALA_SYMBOL (method)) {
                                                gboolean _tmp35_;
                                                _tmp35_ = vala_method_get_is_virtual (method);
                                                _tmp34_ = _tmp35_;
                                          } else {
                                                _tmp34_ = FALSE;
                                          }
                                          if (_tmp34_) {
                                                _tmp33_ = VALA_IS_METHOD (sym);
                                          } else {
                                                _tmp33_ = FALSE;
                                          }
                                          if (_tmp33_) {
                                                gboolean different_invoker;
                                                different_invoker = FALSE;
                                                {
                                                      GList* attr_collection;
                                                      GList* attr_it;
                                                      attr_collection = ((ValaCodeNode*) method)->attributes;
                                                      for (attr_it = attr_collection; attr_it != NULL; attr_it = attr_it->next) {
                                                            ValaAttribute* _tmp36_;
                                                            ValaAttribute* attr;
                                                            _tmp36_ = _vala_code_node_ref0 ((ValaAttribute*) attr_it->data);
                                                            attr = _tmp36_;
                                                            {
                                                                  const gchar* _tmp37_ = NULL;
                                                                  _tmp37_ = vala_attribute_get_name (attr);
                                                                  if (g_strcmp0 (_tmp37_, "NoWrapper") == 0) {
                                                                        ValaGirParserSymbolInfo* _tmp38_ = NULL;
                                                                        ValaGirParserSymbolInfo* invoker;
                                                                        _tmp38_ = vala_gir_parser_find_invoker (self, method);
                                                                        invoker = _tmp38_;
                                                                        if (invoker != NULL) {
                                                                              const gchar* _tmp39_ = NULL;
                                                                              const gchar* _tmp40_ = NULL;
                                                                              _tmp39_ = vala_symbol_get_name ((ValaSymbol*) method);
                                                                              vala_method_set_vfunc_name (method, _tmp39_);
                                                                              _tmp40_ = vala_symbol_get_name (invoker->symbol);
                                                                              vala_symbol_set_name ((ValaSymbol*) method, _tmp40_);
                                                                              ((ValaCodeNode*) method)->attributes = g_list_remove (((ValaCodeNode*) method)->attributes, attr);
                                                                              vala_collection_add ((ValaCollection*) merged, invoker);
                                                                              different_invoker = TRUE;
                                                                              _vala_gir_parser_symbol_info_unref0 (invoker);
                                                                              _vala_code_node_unref0 (attr);
                                                                              break;
                                                                        }
                                                                        _vala_gir_parser_symbol_info_unref0 (invoker);
                                                                  }
                                                                  _vala_code_node_unref0 (attr);
                                                            }
                                                      }
                                                }
                                                if (!different_invoker) {
                                                      vala_collection_add ((ValaCollection*) merged, cinfo);
                                                }
                                          }
                                          _vala_code_node_unref0 (sym);
                                          _vala_gir_parser_symbol_info_unref0 (cinfo);
                                    }
                                    _vala_iterable_unref0 (_cinfo_list);
                              }
                              _vala_code_node_unref0 (method);
                        } else {
                              if (VALA_IS_FIELD (info->symbol)) {
                                    ValaField* _tmp45_;
                                    ValaField* field;
                                    ValaDataType* _tmp46_ = NULL;
                                    {
                                          ValaArrayList* _tmp41_;
                                          ValaArrayList* _cinfo_list;
                                          gint _tmp42_;
                                          gint _cinfo_size;
                                          gint _cinfo_index;
                                          _tmp41_ = _vala_iterable_ref0 (colliding);
                                          _cinfo_list = _tmp41_;
                                          _tmp42_ = vala_collection_get_size ((ValaCollection*) _cinfo_list);
                                          _cinfo_size = _tmp42_;
                                          _cinfo_index = -1;
                                          while (TRUE) {
                                                gpointer _tmp43_ = NULL;
                                                ValaGirParserSymbolInfo* cinfo;
                                                ValaSymbol* _tmp44_;
                                                ValaSymbol* sym;
                                                _cinfo_index = _cinfo_index + 1;
                                                if (!(_cinfo_index < _cinfo_size)) {
                                                      break;
                                                }
                                                _tmp43_ = vala_list_get ((ValaList*) _cinfo_list, _cinfo_index);
                                                cinfo = (ValaGirParserSymbolInfo*) _tmp43_;
                                                _tmp44_ = _vala_code_node_ref0 (cinfo->symbol);
                                                sym = _tmp44_;
                                                if (VALA_IS_METHOD (sym)) {
                                                      vala_collection_add ((ValaCollection*) merged, cinfo);
                                                }
                                                _vala_code_node_unref0 (sym);
                                                _vala_gir_parser_symbol_info_unref0 (cinfo);
                                          }
                                          _vala_iterable_unref0 (_cinfo_list);
                                    }
                                    _tmp45_ = _vala_code_node_ref0 (VALA_FIELD (info->symbol));
                                    field = _tmp45_;
                                    _tmp46_ = vala_variable_get_variable_type ((ValaVariable*) field);
                                    if (VALA_IS_ARRAY_TYPE (_tmp46_)) {
                                          ValaGirParserSymbolInfo* array_length;
                                          const gchar* _tmp47_ = NULL;
                                          gchar* _tmp48_ = NULL;
                                          gchar* _tmp49_;
                                          gboolean _tmp50_;
                                          gboolean _tmp51_;
                                          array_length = NULL;
                                          _tmp47_ = vala_symbol_get_name ((ValaSymbol*) field);
                                          _tmp48_ = g_strdup_printf ("n_%s", _tmp47_);
                                          _tmp49_ = _tmp48_;
                                          _tmp50_ = vala_map_contains ((ValaMap*) self->priv->current_symbols_info, _tmp49_);
                                          _tmp51_ = _tmp50_;
                                          _g_free0 (_tmp49_);
                                          if (_tmp51_) {
                                                const gchar* _tmp52_ = NULL;
                                                gchar* _tmp53_ = NULL;
                                                gchar* _tmp54_;
                                                gpointer _tmp55_ = NULL;
                                                ValaArrayList* _tmp56_;
                                                gpointer _tmp57_ = NULL;
                                                _tmp52_ = vala_symbol_get_name ((ValaSymbol*) field);
                                                _tmp53_ = g_strdup_printf ("n_%s", _tmp52_);
                                                _tmp54_ = _tmp53_;
                                                _tmp55_ = vala_map_get ((ValaMap*) self->priv->current_symbols_info, _tmp54_);
                                                _tmp56_ = (ValaArrayList*) _tmp55_;
                                                _tmp57_ = vala_list_get ((ValaList*) _tmp56_, 0);
                                                _vala_gir_parser_symbol_info_unref0 (array_length);
                                                array_length = (ValaGirParserSymbolInfo*) _tmp57_;
                                                _vala_iterable_unref0 (_tmp56_);
                                                _g_free0 (_tmp54_);
                                          } else {
                                                const gchar* _tmp58_ = NULL;
                                                gchar* _tmp59_ = NULL;
                                                gchar* _tmp60_;
                                                gboolean _tmp61_;
                                                gboolean _tmp62_;
                                                _tmp58_ = vala_symbol_get_name ((ValaSymbol*) field);
                                                _tmp59_ = g_strdup_printf ("%s_length", _tmp58_);
                                                _tmp60_ = _tmp59_;
                                                _tmp61_ = vala_map_contains ((ValaMap*) self->priv->current_symbols_info, _tmp60_);
                                                _tmp62_ = _tmp61_;
                                                _g_free0 (_tmp60_);
                                                if (_tmp62_) {
                                                      const gchar* _tmp63_ = NULL;
                                                      gchar* _tmp64_ = NULL;
                                                      gchar* _tmp65_;
                                                      gpointer _tmp66_ = NULL;
                                                      ValaArrayList* _tmp67_;
                                                      gpointer _tmp68_ = NULL;
                                                      _tmp63_ = vala_symbol_get_name ((ValaSymbol*) field);
                                                      _tmp64_ = g_strdup_printf ("%s_length", _tmp63_);
                                                      _tmp65_ = _tmp64_;
                                                      _tmp66_ = vala_map_get ((ValaMap*) self->priv->current_symbols_info, _tmp65_);
                                                      _tmp67_ = (ValaArrayList*) _tmp66_;
                                                      _tmp68_ = vala_list_get ((ValaList*) _tmp67_, 0);
                                                      _vala_gir_parser_symbol_info_unref0 (array_length);
                                                      array_length = (ValaGirParserSymbolInfo*) _tmp68_;
                                                      _vala_iterable_unref0 (_tmp67_);
                                                      _g_free0 (_tmp65_);
                                                }
                                          }
                                          if (array_length != NULL) {
                                                const gchar* _tmp69_ = NULL;
                                                _tmp69_ = vala_symbol_get_name (array_length->symbol);
                                                vala_variable_set_array_length_cname ((ValaVariable*) field, _tmp69_);
                                                vala_variable_set_no_array_length ((ValaVariable*) field, FALSE);
                                                vala_collection_add ((ValaCollection*) merged, array_length);
                                          }
                                          _vala_gir_parser_symbol_info_unref0 (array_length);
                                    }
                                    _vala_code_node_unref0 (field);
                              }
                        }
                  }
            }
      }
}


static void vala_gir_parser_postprocess_symbol (ValaGirParser* self, ValaSymbol* symbol, ValaGirParserMetadata* metadata) {
      gchar* _tmp0_ = NULL;
      gchar* _tmp1_;
      gchar* _tmp2_ = NULL;
      gchar* _tmp3_;
      gboolean _tmp4_ = FALSE;
      gboolean _tmp5_ = FALSE;
      gboolean _tmp6_;
      gboolean _tmp9_;
      g_return_if_fail (self != NULL);
      g_return_if_fail (symbol != NULL);
      g_return_if_fail (metadata != NULL);
      _tmp0_ = vala_gir_parser_metadata_get_string (metadata, VALA_GIR_PARSER_ARGUMENT_TYPE_REPLACEMENT);
      _tmp1_ = _tmp0_;
      vala_symbol_set_replacement (symbol, _tmp1_);
      _g_free0 (_tmp1_);
      _tmp2_ = vala_gir_parser_element_get_string (self, "deprecated-version", VALA_GIR_PARSER_ARGUMENT_TYPE_DEPRECATED_SINCE);
      _tmp3_ = _tmp2_;
      vala_symbol_set_deprecated_since (symbol, _tmp3_);
      _g_free0 (_tmp3_);
      _tmp6_ = vala_gir_parser_metadata_get_bool (metadata, VALA_GIR_PARSER_ARGUMENT_TYPE_DEPRECATED);
      if (_tmp6_) {
            _tmp5_ = TRUE;
      } else {
            const gchar* _tmp7_ = NULL;
            _tmp7_ = vala_symbol_get_replacement (symbol);
            _tmp5_ = _tmp7_ != NULL;
      }
      if (_tmp5_) {
            _tmp4_ = TRUE;
      } else {
            const gchar* _tmp8_ = NULL;
            _tmp8_ = vala_symbol_get_deprecated_since (symbol);
            _tmp4_ = _tmp8_ != NULL;
      }
      vala_symbol_set_deprecated (symbol, _tmp4_);
      _tmp9_ = vala_gir_parser_metadata_has_argument (metadata, VALA_GIR_PARSER_ARGUMENT_TYPE_PARENT);
      if (_tmp9_) {
            gchar* _tmp10_ = NULL;
            gchar* _tmp11_;
            ValaSourceReference* _tmp12_ = NULL;
            ValaSourceReference* _tmp13_;
            ValaUnresolvedSymbol* _tmp14_ = NULL;
            ValaUnresolvedSymbol* _tmp15_;
            ValaUnresolvedSymbol* target_symbol;
            gpointer _tmp16_ = NULL;
            ValaArrayList* reparent_list;
            gboolean _tmp18_ = FALSE;
            _tmp10_ = vala_gir_parser_metadata_get_string (metadata, VALA_GIR_PARSER_ARGUMENT_TYPE_PARENT);
            _tmp11_ = _tmp10_;
            _tmp12_ = vala_gir_parser_metadata_get_source_reference (metadata, VALA_GIR_PARSER_ARGUMENT_TYPE_PARENT);
            _tmp13_ = _tmp12_;
            _tmp14_ = vala_gir_parser_parse_symbol_from_string (self, _tmp11_, _tmp13_);
            _tmp15_ = _tmp14_;
            _vala_source_reference_unref0 (_tmp13_);
            _g_free0 (_tmp11_);
            target_symbol = _tmp15_;
            _tmp16_ = vala_map_get ((ValaMap*) self->priv->symbol_reparent_map, target_symbol);
            reparent_list = (ValaArrayList*) _tmp16_;
            if (reparent_list == NULL) {
                  ValaArrayList* _tmp17_ = NULL;
                  _tmp17_ = vala_array_list_new (VALA_TYPE_SYMBOL, (GBoxedCopyFunc) vala_code_node_ref, vala_code_node_unref, g_direct_equal);
                  _vala_iterable_unref0 (reparent_list);
                  reparent_list = _tmp17_;
                  vala_map_set ((ValaMap*) self->priv->symbol_reparent_map, target_symbol, reparent_list);
            }
            vala_collection_add ((ValaCollection*) reparent_list, symbol);
            if (VALA_IS_NAMESPACE (symbol)) {
                  _tmp18_ = TRUE;
            } else {
                  _tmp18_ = VALA_IS_TYPESYMBOL (symbol);
            }
            if (_tmp18_) {
                  const gchar* _tmp19_ = NULL;
                  ValaUnresolvedSymbol* _tmp20_ = NULL;
                  ValaUnresolvedSymbol* _tmp21_;
                  _tmp19_ = vala_symbol_get_name (symbol);
                  _tmp20_ = vala_unresolved_symbol_new (target_symbol, _tmp19_, NULL);
                  _tmp21_ = _tmp20_;
                  vala_gir_parser_set_symbol_mapping (self, symbol, (ValaSymbol*) _tmp21_);
                  _vala_code_node_unref0 (_tmp21_);
            }
            _vala_iterable_unref0 (reparent_list);
            _vala_code_node_unref0 (target_symbol);
      }
}


static void vala_gir_parser_merge_add_process (ValaGirParser* self, ValaSymbol* container) {
      ValaArrayList* _tmp0_ = NULL;
      ValaArrayList* merged;
      g_return_if_fail (self != NULL);
      g_return_if_fail (container != NULL);
      _tmp0_ = vala_array_list_new (VALA_GIR_PARSER_TYPE_SYMBOL_INFO, (GBoxedCopyFunc) vala_gir_parser_symbol_info_ref, vala_gir_parser_symbol_info_unref, g_direct_equal);
      merged = _tmp0_;
      {
            ValaSet* _tmp1_ = NULL;
            ValaSet* _tmp2_;
            ValaIterator* _tmp3_ = NULL;
            ValaIterator* _tmp4_;
            ValaIterator* _name_it;
            _tmp1_ = vala_map_get_keys ((ValaMap*) self->priv->current_symbols_info);
            _tmp2_ = _tmp1_;
            _tmp3_ = vala_iterable_iterator ((ValaIterable*) _tmp2_);
            _tmp4_ = _tmp3_;
            _vala_iterable_unref0 (_tmp2_);
            _name_it = _tmp4_;
            while (TRUE) {
                  gboolean _tmp5_;
                  gpointer _tmp6_ = NULL;
                  gchar* name;
                  gpointer _tmp7_ = NULL;
                  ValaArrayList* colliding;
                  _tmp5_ = vala_iterator_next (_name_it);
                  if (!_tmp5_) {
                        break;
                  }
                  _tmp6_ = vala_iterator_get (_name_it);
                  name = (gchar*) _tmp6_;
                  _tmp7_ = vala_map_get ((ValaMap*) self->priv->current_symbols_info, name);
                  colliding = (ValaArrayList*) _tmp7_;
                  {
                        ValaArrayList* _tmp8_;
                        ValaArrayList* _info_list;
                        gint _tmp9_;
                        gint _info_size;
                        gint _info_index;
                        _tmp8_ = _vala_iterable_ref0 (colliding);
                        _info_list = _tmp8_;
                        _tmp9_ = vala_collection_get_size ((ValaCollection*) _info_list);
                        _info_size = _tmp9_;
                        _info_index = -1;
                        while (TRUE) {
                              gpointer _tmp10_ = NULL;
                              ValaGirParserSymbolInfo* info;
                              _info_index = _info_index + 1;
                              if (!(_info_index < _info_size)) {
                                    break;
                              }
                              _tmp10_ = vala_list_get ((ValaList*) _info_list, _info_index);
                              info = (ValaGirParserSymbolInfo*) _tmp10_;
                              vala_gir_parser_merge (self, info, colliding, merged);
                              _vala_gir_parser_symbol_info_unref0 (info);
                        }
                        _vala_iterable_unref0 (_info_list);
                  }
                  _vala_iterable_unref0 (colliding);
                  _g_free0 (name);
            }
            _vala_iterator_unref0 (_name_it);
      }
      {
            ValaCollection* _tmp11_ = NULL;
            ValaCollection* _tmp12_;
            ValaIterator* _tmp13_ = NULL;
            ValaIterator* _tmp14_;
            ValaIterator* _infos_it;
            _tmp11_ = vala_map_get_values ((ValaMap*) self->priv->current_symbols_info);
            _tmp12_ = _tmp11_;
            _tmp13_ = vala_iterable_iterator ((ValaIterable*) _tmp12_);
            _tmp14_ = _tmp13_;
            _vala_iterable_unref0 (_tmp12_);
            _infos_it = _tmp14_;
            while (TRUE) {
                  gboolean _tmp15_;
                  gpointer _tmp16_ = NULL;
                  ValaArrayList* infos;
                  _tmp15_ = vala_iterator_next (_infos_it);
                  if (!_tmp15_) {
                        break;
                  }
                  _tmp16_ = vala_iterator_get (_infos_it);
                  infos = (ValaArrayList*) _tmp16_;
                  {
                        ValaArrayList* _tmp17_;
                        ValaArrayList* _info_list;
                        gint _tmp18_;
                        gint _info_size;
                        gint _info_index;
                        _tmp17_ = _vala_iterable_ref0 (infos);
                        _info_list = _tmp17_;
                        _tmp18_ = vala_collection_get_size ((ValaCollection*) _info_list);
                        _info_size = _tmp18_;
                        _info_index = -1;
                        while (TRUE) {
                              gpointer _tmp19_ = NULL;
                              ValaGirParserSymbolInfo* info;
                              gboolean _tmp20_ = FALSE;
                              gboolean _tmp21_;
                              gboolean _tmp23_;
                              _info_index = _info_index + 1;
                              if (!(_info_index < _info_size)) {
                                    break;
                              }
                              _tmp19_ = vala_list_get ((ValaList*) _info_list, _info_index);
                              info = (ValaGirParserSymbolInfo*) _tmp19_;
                              _tmp21_ = vala_collection_contains ((ValaCollection*) merged, info);
                              if (_tmp21_) {
                                    _tmp20_ = TRUE;
                              } else {
                                    gboolean _tmp22_;
                                    _tmp22_ = vala_gir_parser_metadata_get_bool (info->metadata, VALA_GIR_PARSER_ARGUMENT_TYPE_HIDDEN);
                                    _tmp20_ = _tmp22_;
                              }
                              if (_tmp20_) {
                                    _vala_gir_parser_symbol_info_unref0 (info);
                                    continue;
                              }
                              _tmp23_ = vala_gir_parser_metadata_has_argument (info->metadata, VALA_GIR_PARSER_ARGUMENT_TYPE_PARENT);
                              if (!_tmp23_) {
                                    vala_gir_parser_add_symbol_to_container (self, container, info->symbol);
                              }
                              vala_gir_parser_postprocess_symbol (self, info->symbol, info->metadata);
                              _vala_gir_parser_symbol_info_unref0 (info);
                        }
                        _vala_iterable_unref0 (_info_list);
                  }
                  _vala_iterable_unref0 (infos);
            }
            _vala_iterator_unref0 (_infos_it);
      }
      _vala_iterable_unref0 (merged);
}


static ValaGirParserMetadata* vala_gir_parser_get_current_metadata (ValaGirParser* self) {
      ValaGirParserMetadata* result = NULL;
      const gchar* _tmp0_ = NULL;
      gchar* _tmp1_;
      gchar* name;
      gchar* _tmp2_ = NULL;
      gchar* child_name;
      ValaGirParserMetadataType type;
      ValaGirParserMetadata* _tmp5_ = NULL;
      g_return_val_if_fail (self != NULL, NULL);
      _tmp0_ = vala_markup_reader_get_name (self->priv->reader);
      _tmp1_ = g_strdup (_tmp0_);
      name = _tmp1_;
      _tmp2_ = vala_markup_reader_get_attribute (self->priv->reader, "name");
      child_name = _tmp2_;
      if (child_name == NULL) {
            ValaGirParserMetadata* _tmp3_ = NULL;
            ValaGirParserMetadata* _tmp4_;
            _tmp3_ = vala_gir_parser_metadata_get_empty ();
            _tmp4_ = _vala_gir_parser_metadata_ref0 (_tmp3_);
            result = _tmp4_;
            _g_free0 (child_name);
            _g_free0 (name);
            return result;
      }
      type = VALA_GIR_PARSER_METADATA_TYPE_GENERIC;
      if (g_strcmp0 (name, "glib:signal") == 0) {
            type = VALA_GIR_PARSER_METADATA_TYPE_SIGNAL;
      } else {
            if (g_strcmp0 (name, "property") == 0) {
                  type = VALA_GIR_PARSER_METADATA_TYPE_PROPERTY;
            }
      }
      _tmp5_ = vala_gir_parser_metadata_match_child (self->priv->metadata, child_name, type);
      result = _tmp5_;
      _g_free0 (child_name);
      _g_free0 (name);
      return result;
}


static gboolean vala_gir_parser_push_metadata (ValaGirParser* self) {
      gboolean result = FALSE;
      gchar* _tmp0_ = NULL;
      gchar* _tmp1_;
      gboolean _tmp2_;
      ValaGirParserMetadata* _tmp3_ = NULL;
      ValaGirParserMetadata* new_metadata;
      gboolean _tmp4_;
      ValaGirParserMetadata* _tmp5_;
      ValaHashMap* _tmp6_ = NULL;
      g_return_val_if_fail (self != NULL, FALSE);
      _tmp0_ = vala_markup_reader_get_attribute (self->priv->reader, "introspectable");
      _tmp1_ = _tmp0_;
      _tmp2_ = g_strcmp0 (_tmp1_, "0") == 0;
      _g_free0 (_tmp1_);
      if (_tmp2_) {
            result = FALSE;
            return result;
      }
      _tmp3_ = vala_gir_parser_get_current_metadata (self);
      new_metadata = _tmp3_;
      _tmp4_ = vala_gir_parser_metadata_get_bool (new_metadata, VALA_GIR_PARSER_ARGUMENT_TYPE_SKIP);
      if (_tmp4_) {
            result = FALSE;
            _vala_gir_parser_metadata_unref0 (new_metadata);
            return result;
      }
      vala_collection_add ((ValaCollection*) self->priv->metadata_stack, self->priv->metadata);
      _tmp5_ = _vala_gir_parser_metadata_ref0 (new_metadata);
      _vala_gir_parser_metadata_unref0 (self->priv->metadata);
      self->priv->metadata = _tmp5_;
      vala_collection_add ((ValaCollection*) self->priv->girdata_stack, self->priv->girdata);
      _tmp6_ = vala_hash_map_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, g_str_hash, g_str_equal, g_direct_equal);
      _vala_map_unref0 (self->priv->girdata);
      self->priv->girdata = _tmp6_;
      result = TRUE;
      _vala_gir_parser_metadata_unref0 (new_metadata);
      return result;
}


static void vala_gir_parser_pop_metadata (ValaGirParser* self) {
      gint _tmp0_;
      gpointer _tmp1_ = NULL;
      gint _tmp2_;
      gint _tmp3_;
      gpointer _tmp4_ = NULL;
      gint _tmp5_;
      g_return_if_fail (self != NULL);
      _tmp0_ = vala_collection_get_size ((ValaCollection*) self->priv->metadata_stack);
      _tmp1_ = vala_list_get ((ValaList*) self->priv->metadata_stack, _tmp0_ - 1);
      _vala_gir_parser_metadata_unref0 (self->priv->metadata);
      self->priv->metadata = (ValaGirParserMetadata*) _tmp1_;
      _tmp2_ = vala_collection_get_size ((ValaCollection*) self->priv->metadata_stack);
      vala_list_remove_at ((ValaList*) self->priv->metadata_stack, _tmp2_ - 1);
      _tmp3_ = vala_collection_get_size ((ValaCollection*) self->priv->girdata_stack);
      _tmp4_ = vala_list_get ((ValaList*) self->priv->girdata_stack, _tmp3_ - 1);
      _vala_map_unref0 (self->priv->girdata);
      self->priv->girdata = (ValaHashMap*) _tmp4_;
      _tmp5_ = vala_collection_get_size ((ValaCollection*) self->priv->girdata_stack);
      vala_list_remove_at ((ValaList*) self->priv->girdata_stack, _tmp5_ - 1);
}


static gchar string_get (const gchar* self, glong index) {
      gchar result = '\0';
      g_return_val_if_fail (self != NULL, '\0');
      result = ((gchar*) self)[index];
      return result;
}


static gboolean vala_gir_parser_parse_type_arguments_from_string (ValaGirParser* self, ValaDataType* parent_type, const gchar* type_arguments, ValaSourceReference* source_reference) {
      gboolean result = FALSE;
      gint _tmp0_;
      gint type_arguments_length;
      GString* _tmp1_ = NULL;
      GString* current;
      gint depth;
      ValaDataType* _tmp15_ = NULL;
      ValaDataType* dt;
      g_return_val_if_fail (self != NULL, FALSE);
      g_return_val_if_fail (parent_type != NULL, FALSE);
      g_return_val_if_fail (type_arguments != NULL, FALSE);
      _tmp0_ = strlen (type_arguments);
      type_arguments_length = (gint) _tmp0_;
      _tmp1_ = g_string_sized_new ((gsize) type_arguments_length);
      current = _tmp1_;
      depth = 0;
      {
            gint c;
            c = 0;
            {
                  gboolean _tmp2_;
                  _tmp2_ = TRUE;
                  while (TRUE) {
                        gboolean _tmp3_ = FALSE;
                        gchar _tmp4_;
                        if (!_tmp2_) {
                              c++;
                        }
                        _tmp2_ = FALSE;
                        if (!(c < type_arguments_length)) {
                              break;
                        }
                        _tmp4_ = string_get (type_arguments, (glong) c);
                        if (_tmp4_ == '<') {
                              _tmp3_ = TRUE;
                        } else {
                              gchar _tmp5_;
                              _tmp5_ = string_get (type_arguments, (glong) c);
                              _tmp3_ = _tmp5_ == '[';
                        }
                        if (_tmp3_) {
                              gchar _tmp6_;
                              depth++;
                              _tmp6_ = string_get (type_arguments, (glong) c);
                              g_string_append_unichar (current, (gunichar) _tmp6_);
                        } else {
                              gboolean _tmp7_ = FALSE;
                              gchar _tmp8_;
                              _tmp8_ = string_get (type_arguments, (glong) c);
                              if (_tmp8_ == '>') {
                                    _tmp7_ = TRUE;
                              } else {
                                    gchar _tmp9_;
                                    _tmp9_ = string_get (type_arguments, (glong) c);
                                    _tmp7_ = _tmp9_ == ']';
                              }
                              if (_tmp7_) {
                                    gchar _tmp10_;
                                    depth--;
                                    _tmp10_ = string_get (type_arguments, (glong) c);
                                    g_string_append_unichar (current, (gunichar) _tmp10_);
                              } else {
                                    gchar _tmp11_;
                                    _tmp11_ = string_get (type_arguments, (glong) c);
                                    if (_tmp11_ == ',') {
                                          if (depth == 0) {
                                                ValaDataType* _tmp12_ = NULL;
                                                ValaDataType* dt;
                                                _tmp12_ = vala_gir_parser_parse_type_from_string (self, current->str, TRUE, source_reference);
                                                dt = _tmp12_;
                                                if (dt == NULL) {
                                                      result = FALSE;
                                                      _vala_code_node_unref0 (dt);
                                                      _g_string_free0 (current);
                                                      return result;
                                                }
                                                vala_data_type_add_type_argument (parent_type, dt);
                                                g_string_truncate (current, (gsize) 0);
                                                _vala_code_node_unref0 (dt);
                                          } else {
                                                gchar _tmp13_;
                                                _tmp13_ = string_get (type_arguments, (glong) c);
                                                g_string_append_unichar (current, (gunichar) _tmp13_);
                                          }
                                    } else {
                                          gchar _tmp14_;
                                          _tmp14_ = string_get (type_arguments, (glong) c);
                                          g_string_append_unichar (current, (gunichar) _tmp14_);
                                    }
                              }
                        }
                  }
            }
      }
      _tmp15_ = vala_gir_parser_parse_type_from_string (self, current->str, TRUE, source_reference);
      dt = _tmp15_;
      if (dt == NULL) {
            result = FALSE;
            _vala_code_node_unref0 (dt);
            _g_string_free0 (current);
            return result;
      }
      vala_data_type_add_type_argument (parent_type, dt);
      result = TRUE;
      _vala_code_node_unref0 (dt);
      _g_string_free0 (current);
      return result;
}


static ValaDataType* vala_gir_parser_parse_type_from_string (ValaGirParser* self, const gchar* type_string, gboolean owned_by_default, ValaSourceReference* source_reference) {
      ValaDataType* result = NULL;
      GMatchInfo* match = NULL;
      GMatchInfo* _tmp2_ = NULL;
      gboolean _tmp3_;
      ValaDataType* type;
      gchar* _tmp4_ = NULL;
      gchar* ownership_data;
      gchar* _tmp5_ = NULL;
      gchar* type_name;
      gchar* _tmp6_ = NULL;
      gchar* type_arguments_data;
      gchar* _tmp7_ = NULL;
      gchar* pointers_data;
      gchar* _tmp8_ = NULL;
      gchar* array_data;
      gchar* _tmp9_ = NULL;
      gchar* nullable_data;
      gboolean _tmp10_ = FALSE;
      gboolean nullable;
      gboolean _tmp12_ = FALSE;
      gboolean value_owned;
      ValaUnresolvedSymbol* _tmp18_ = NULL;
      ValaUnresolvedSymbol* sym;
      ValaUnresolvedType* _tmp19_ = NULL;
      gboolean _tmp20_ = FALSE;
      GError * _inner_error_ = NULL;
      g_return_val_if_fail (self != NULL, NULL);
      g_return_val_if_fail (type_string != NULL, NULL);
      if (vala_gir_parser_type_from_string_regex == NULL) {
            GRegex* _tmp0_ = NULL;
            GRegex* _tmp1_;
            _tmp0_ = g_regex_new ("^(?:(owned|unowned|weak) +)?([0-9a-zA-Z_\\.]+)(?:<(.+)>)?(\\*+)?(\\[(," \
"*)?\\])?(\\?)?$", (G_REGEX_ANCHORED | G_REGEX_DOLLAR_ENDONLY) | G_REGEX_OPTIMIZE, 0, &_inner_error_);
            _tmp1_ = _tmp0_;
            if (_inner_error_ != NULL) {
                  if (_inner_error_->domain == G_REGEX_ERROR) {
                        goto __catch3_g_regex_error;
                  }
                  g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
                  g_clear_error (&_inner_error_);
                  return NULL;
            }
            _g_regex_unref0 (vala_gir_parser_type_from_string_regex);
            vala_gir_parser_type_from_string_regex = _tmp1_;
            goto __finally3;
            __catch3_g_regex_error:
            {
                  GError * e;
                  e = _inner_error_;
                  _inner_error_ = NULL;
                  g_error ("valagirparser.vala:1051: Unable to compile regex: %s", e->message);
                  _g_error_free0 (e);
            }
            __finally3:
            if (_inner_error_ != NULL) {
                  g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
                  g_clear_error (&_inner_error_);
                  return NULL;
            }
      }
      _tmp3_ = g_regex_match (vala_gir_parser_type_from_string_regex, type_string, 0, &_tmp2_);
      _g_match_info_free0 (match);
      match = _tmp2_;
      if (!_tmp3_) {
            vala_report_error (source_reference, "unable to parse type");
            result = NULL;
            _g_match_info_free0 (match);
            return result;
      }
      type = NULL;
      _tmp4_ = g_match_info_fetch (match, 1);
      ownership_data = _tmp4_;
      _tmp5_ = g_match_info_fetch (match, 2);
      type_name = _tmp5_;
      _tmp6_ = g_match_info_fetch (match, 3);
      type_arguments_data = _tmp6_;
      _tmp7_ = g_match_info_fetch (match, 4);
      pointers_data = _tmp7_;
      _tmp8_ = g_match_info_fetch (match, 5);
      array_data = _tmp8_;
      _tmp9_ = g_match_info_fetch (match, 6);
      nullable_data = _tmp9_;
      if (nullable_data != NULL) {
            gint _tmp11_;
            _tmp11_ = strlen (nullable_data);
            _tmp10_ = _tmp11_ > 0;
      } else {
            _tmp10_ = FALSE;
      }
      nullable = _tmp10_;
      if (ownership_data == NULL) {
            _tmp12_ = g_strcmp0 (type_name, "void") == 0;
      } else {
            _tmp12_ = FALSE;
      }
      if (_tmp12_) {
            gboolean _tmp13_ = FALSE;
            if (array_data == NULL) {
                  _tmp13_ = !nullable;
            } else {
                  _tmp13_ = FALSE;
            }
            if (_tmp13_) {
                  ValaVoidType* _tmp14_ = NULL;
                  _tmp14_ = vala_void_type_new (source_reference);
                  _vala_code_node_unref0 (type);
                  type = (ValaDataType*) _tmp14_;
                  if (pointers_data != NULL) {
                        {
                              gint i;
                              i = 0;
                              {
                                    gboolean _tmp15_;
                                    _tmp15_ = TRUE;
                                    while (TRUE) {
                                          gint _tmp16_;
                                          ValaPointerType* _tmp17_ = NULL;
                                          if (!_tmp15_) {
                                                i++;
                                          }
                                          _tmp15_ = FALSE;
                                          _tmp16_ = strlen (pointers_data);
                                          if (!(i < _tmp16_)) {
                                                break;
                                          }
                                          _tmp17_ = vala_pointer_type_new (type, NULL);
                                          _vala_code_node_unref0 (type);
                                          type = (ValaDataType*) _tmp17_;
                                    }
                              }
                        }
                  }
                  result = type;
                  _g_free0 (nullable_data);
                  _g_free0 (array_data);
                  _g_free0 (pointers_data);
                  _g_free0 (type_arguments_data);
                  _g_free0 (type_name);
                  _g_free0 (ownership_data);
                  _g_match_info_free0 (match);
                  return result;
            } else {
                  vala_report_error (source_reference, "invalid void type");
                  result = NULL;
                  _g_free0 (nullable_data);
                  _g_free0 (array_data);
                  _g_free0 (pointers_data);
                  _g_free0 (type_arguments_data);
                  _g_free0 (type_name);
                  _g_free0 (ownership_data);
                  _vala_code_node_unref0 (type);
                  _g_match_info_free0 (match);
                  return result;
            }
      }
      value_owned = owned_by_default;
      if (g_strcmp0 (ownership_data, "owned") == 0) {
            if (owned_by_default) {
                  vala_report_error (source_reference, "unexpected `owned' keyword");
            } else {
                  value_owned = TRUE;
            }
      } else {
            if (g_strcmp0 (ownership_data, "unowned") == 0) {
                  if (owned_by_default) {
                        value_owned = TRUE;
                  } else {
                        vala_report_error (source_reference, "unexpected `unowned' keyword");
                        result = NULL;
                        _g_free0 (nullable_data);
                        _g_free0 (array_data);
                        _g_free0 (pointers_data);
                        _g_free0 (type_arguments_data);
                        _g_free0 (type_name);
                        _g_free0 (ownership_data);
                        _vala_code_node_unref0 (type);
                        _g_match_info_free0 (match);
                        return result;
                  }
            }
      }
      _tmp18_ = vala_gir_parser_parse_symbol_from_string (self, type_name, source_reference);
      sym = _tmp18_;
      if (sym == NULL) {
            result = NULL;
            _vala_code_node_unref0 (sym);
            _g_free0 (nullable_data);
            _g_free0 (array_data);
            _g_free0 (pointers_data);
            _g_free0 (type_arguments_data);
            _g_free0 (type_name);
            _g_free0 (ownership_data);
            _vala_code_node_unref0 (type);
            _g_match_info_free0 (match);
            return result;
      }
      _tmp19_ = vala_unresolved_type_new_from_symbol (sym, source_reference);
      _vala_code_node_unref0 (type);
      type = (ValaDataType*) _tmp19_;
      if (type_arguments_data != NULL) {
            gint _tmp21_;
            _tmp21_ = strlen (type_arguments_data);
            _tmp20_ = _tmp21_ > 0;
      } else {
            _tmp20_ = FALSE;
      }
      if (_tmp20_) {
            gboolean _tmp22_;
            _tmp22_ = vala_gir_parser_parse_type_arguments_from_string (self, type, type_arguments_data, source_reference);
            if (!_tmp22_) {
                  result = NULL;
                  _vala_code_node_unref0 (sym);
                  _g_free0 (nullable_data);
                  _g_free0 (array_data);
                  _g_free0 (pointers_data);
                  _g_free0 (type_arguments_data);
                  _g_free0 (type_name);
                  _g_free0 (ownership_data);
                  _vala_code_node_unref0 (type);
                  _g_match_info_free0 (match);
                  return result;
            }
      }
      if (pointers_data != NULL) {
            {
                  gint i;
                  i = 0;
                  {
                        gboolean _tmp23_;
                        _tmp23_ = TRUE;
                        while (TRUE) {
                              gint _tmp24_;
                              ValaPointerType* _tmp25_ = NULL;
                              if (!_tmp23_) {
                                    i++;
                              }
                              _tmp23_ = FALSE;
                              _tmp24_ = strlen (pointers_data);
                              if (!(i < _tmp24_)) {
                                    break;
                              }
                              _tmp25_ = vala_pointer_type_new (type, NULL);
                              _vala_code_node_unref0 (type);
                              type = (ValaDataType*) _tmp25_;
                        }
                  }
            }
      }
      if (array_data != NULL) {
            gint _tmp26_;
            ValaArrayType* _tmp27_ = NULL;
            _tmp26_ = strlen (array_data);
            _tmp27_ = vala_array_type_new (type, ((gint) _tmp26_) + 1, source_reference);
            _vala_code_node_unref0 (type);
            type = (ValaDataType*) _tmp27_;
      }
      vala_data_type_set_nullable (type, nullable);
      vala_data_type_set_value_owned (type, value_owned);
      result = type;
      _vala_code_node_unref0 (sym);
      _g_free0 (nullable_data);
      _g_free0 (array_data);
      _g_free0 (pointers_data);
      _g_free0 (type_arguments_data);
      _g_free0 (type_name);
      _g_free0 (ownership_data);
      _g_match_info_free0 (match);
      return result;
}


static gchar* vala_gir_parser_element_get_string (ValaGirParser* self, const gchar* attribute_name, ValaGirParserArgumentType arg_type) {
      gchar* result = NULL;
      gchar* _tmp0_ = NULL;
      gchar* str;
      g_return_val_if_fail (self != NULL, NULL);
      g_return_val_if_fail (attribute_name != NULL, NULL);
      _tmp0_ = vala_gir_parser_metadata_get_string (self->priv->metadata, arg_type);
      str = _tmp0_;
      if (str == NULL) {
            gchar* _tmp1_ = NULL;
            _tmp1_ = vala_markup_reader_get_attribute (self->priv->reader, attribute_name);
            _g_free0 (str);
            str = _tmp1_;
      }
      result = str;
      return result;
}


static ValaDataType* vala_gir_parser_element_get_type (ValaGirParser* self, ValaDataType* orig_type, gboolean owned_by_default, gboolean* changed) {
      gboolean _changed = FALSE;
      ValaDataType* result = NULL;
      ValaDataType* _tmp0_;
      ValaDataType* type;
      gboolean _tmp1_;
      gboolean _tmp8_;
      gboolean _tmp13_;
      gboolean _tmp20_;
      g_return_val_if_fail (self != NULL, NULL);
      g_return_val_if_fail (orig_type != NULL, NULL);
      if ((&_changed) != NULL) {
            _changed = FALSE;
      }
      _tmp0_ = _vala_code_node_ref0 (orig_type);
      type = _tmp0_;
      _tmp1_ = vala_gir_parser_metadata_has_argument (self->priv->metadata, VALA_GIR_PARSER_ARGUMENT_TYPE_TYPE);
      if (_tmp1_) {
            gchar* _tmp2_ = NULL;
            gchar* _tmp3_;
            ValaSourceReference* _tmp4_ = NULL;
            ValaSourceReference* _tmp5_;
            ValaDataType* _tmp6_ = NULL;
            ValaDataType* _tmp7_;
            ValaDataType* new_type;
            _tmp2_ = vala_gir_parser_metadata_get_string (self->priv->metadata, VALA_GIR_PARSER_ARGUMENT_TYPE_TYPE);
            _tmp3_ = _tmp2_;
            _tmp4_ = vala_gir_parser_metadata_get_source_reference (self->priv->metadata, VALA_GIR_PARSER_ARGUMENT_TYPE_TYPE);
            _tmp5_ = _tmp4_;
            _tmp6_ = vala_gir_parser_parse_type_from_string (self, _tmp3_, owned_by_default, _tmp5_);
            _tmp7_ = _tmp6_;
            _vala_source_reference_unref0 (_tmp5_);
            _g_free0 (_tmp3_);
            new_type = _tmp7_;
            if ((&_changed) != NULL) {
                  _changed = TRUE;
            }
            result = new_type;
            _vala_code_node_unref0 (type);
            if (changed) {
                  *changed = _changed;
            }
            return result;
      }
      _tmp8_ = vala_gir_parser_metadata_has_argument (self->priv->metadata, VALA_GIR_PARSER_ARGUMENT_TYPE_TYPE_ARGUMENTS);
      if (_tmp8_) {
            gchar* _tmp9_ = NULL;
            gchar* _tmp10_;
            ValaSourceReference* _tmp11_ = NULL;
            ValaSourceReference* _tmp12_;
            _tmp9_ = vala_gir_parser_metadata_get_string (self->priv->metadata, VALA_GIR_PARSER_ARGUMENT_TYPE_TYPE_ARGUMENTS);
            _tmp10_ = _tmp9_;
            _tmp11_ = vala_gir_parser_metadata_get_source_reference (self->priv->metadata, VALA_GIR_PARSER_ARGUMENT_TYPE_TYPE_ARGUMENTS);
            _tmp12_ = _tmp11_;
            vala_gir_parser_parse_type_arguments_from_string (self, type, _tmp10_, _tmp12_);
            _vala_source_reference_unref0 (_tmp12_);
            _g_free0 (_tmp10_);
            if ((&_changed) != NULL) {
                  _changed = TRUE;
            }
      }
      if (VALA_IS_VOID_TYPE (type)) {
            result = type;
            if (changed) {
                  *changed = _changed;
            }
            return result;
      }
      _tmp13_ = vala_gir_parser_metadata_get_bool (self->priv->metadata, VALA_GIR_PARSER_ARGUMENT_TYPE_ARRAY);
      if (_tmp13_) {
            ValaSourceReference* _tmp14_ = NULL;
            ValaArrayType* _tmp15_ = NULL;
            _tmp14_ = vala_code_node_get_source_reference ((ValaCodeNode*) type);
            _tmp15_ = vala_array_type_new (type, 1, _tmp14_);
            _vala_code_node_unref0 (type);
            type = (ValaDataType*) _tmp15_;
            if ((&_changed) != NULL) {
                  _changed = TRUE;
            }
      }
      if (owned_by_default) {
            gboolean _tmp16_;
            _tmp16_ = vala_gir_parser_metadata_has_argument (self->priv->metadata, VALA_GIR_PARSER_ARGUMENT_TYPE_UNOWNED);
            if (_tmp16_) {
                  gboolean _tmp17_;
                  _tmp17_ = vala_gir_parser_metadata_get_bool (self->priv->metadata, VALA_GIR_PARSER_ARGUMENT_TYPE_UNOWNED);
                  vala_data_type_set_value_owned (type, !_tmp17_);
            }
      } else {
            gboolean _tmp18_;
            _tmp18_ = vala_gir_parser_metadata_has_argument (self->priv->metadata, VALA_GIR_PARSER_ARGUMENT_TYPE_OWNED);
            if (_tmp18_) {
                  gboolean _tmp19_;
                  _tmp19_ = vala_gir_parser_metadata_get_bool (self->priv->metadata, VALA_GIR_PARSER_ARGUMENT_TYPE_OWNED);
                  vala_data_type_set_value_owned (type, _tmp19_);
            }
      }
      _tmp20_ = vala_gir_parser_metadata_has_argument (self->priv->metadata, VALA_GIR_PARSER_ARGUMENT_TYPE_NULLABLE);
      if (_tmp20_) {
            gboolean _tmp21_;
            _tmp21_ = vala_gir_parser_metadata_get_bool (self->priv->metadata, VALA_GIR_PARSER_ARGUMENT_TYPE_NULLABLE);
            vala_data_type_set_nullable (type, _tmp21_);
      }
      result = type;
      if (changed) {
            *changed = _changed;
      }
      return result;
}


static gchar* vala_gir_parser_element_get_name (ValaGirParser* self, const gchar* attribute_name, ValaGirParserArgumentType arg_type) {
      gchar* result = NULL;
      gchar* _tmp0_ = NULL;
      gchar* name;
      gchar* _tmp1_ = NULL;
      gchar* pattern;
      GError * _inner_error_ = NULL;
      g_return_val_if_fail (self != NULL, NULL);
      g_return_val_if_fail (attribute_name != NULL, NULL);
      _tmp0_ = vala_markup_reader_get_attribute (self->priv->reader, attribute_name);
      name = _tmp0_;
      _tmp1_ = vala_gir_parser_metadata_get_string (self->priv->metadata, arg_type);
      pattern = _tmp1_;
      if (pattern != NULL) {
            GRegex* _tmp2_ = NULL;
            GRegex* regex;
            GMatchInfo* match = NULL;
            GMatchInfo* _tmp3_ = NULL;
            gboolean _tmp4_;
            _tmp2_ = g_regex_new (pattern, G_REGEX_ANCHORED, G_REGEX_MATCH_ANCHORED, &_inner_error_);
            regex = _tmp2_;
            if (_inner_error_ != NULL) {
                  goto __catch4_g_error;
            }
            _tmp4_ = g_regex_match (regex, name, 0, &_tmp3_);
            _g_match_info_free0 (match);
            match = _tmp3_;
            if (!_tmp4_) {
                  gchar* _tmp5_;
                  _tmp5_ = g_strdup (pattern);
                  _g_free0 (name);
                  name = _tmp5_;
            } else {
                  gchar* _tmp6_ = NULL;
                  gchar* matched;
                  gboolean _tmp7_ = FALSE;
                  _tmp6_ = g_match_info_fetch (match, 1);
                  matched = _tmp6_;
                  if (matched != NULL) {
                        gint _tmp8_;
                        _tmp8_ = strlen (matched);
                        _tmp7_ = _tmp8_ > 0;
                  } else {
                        _tmp7_ = FALSE;
                  }
                  if (_tmp7_) {
                        gchar* _tmp9_;
                        _tmp9_ = g_strdup (matched);
                        _g_free0 (name);
                        name = _tmp9_;
                  } else {
                        gchar* _tmp10_;
                        _tmp10_ = g_strdup (pattern);
                        _g_free0 (name);
                        name = _tmp10_;
                  }
                  _g_free0 (matched);
            }
            _g_match_info_free0 (match);
            _g_regex_unref0 (regex);
            goto __finally4;
            __catch4_g_error:
            {
                  GError * e;
                  gchar* _tmp11_;
                  e = _inner_error_;
                  _inner_error_ = NULL;
                  _tmp11_ = g_strdup (pattern);
                  _g_free0 (name);
                  name = _tmp11_;
                  _g_error_free0 (e);
            }
            __finally4:
            if (_inner_error_ != NULL) {
                  _g_free0 (pattern);
                  _g_free0 (name);
                  g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
                  g_clear_error (&_inner_error_);
                  return NULL;
            }
      }
      result = name;
      _g_free0 (pattern);
      return result;
}


static void vala_gir_parser_parse_repository (ValaGirParser* self) {
      gchar* _tmp0_ = NULL;
      gchar* _tmp1_;
      gboolean _tmp2_;
      g_return_if_fail (self != NULL);
      vala_gir_parser_start_element (self, "repository");
      _tmp0_ = vala_markup_reader_get_attribute (self->priv->reader, "version");
      _tmp1_ = _tmp0_;
      _tmp2_ = g_strcmp0 (_tmp1_, VALA_GIR_PARSER_GIR_VERSION) != 0;
      _g_free0 (_tmp1_);
      if (_tmp2_) {
            ValaSourceReference* _tmp3_ = NULL;
            ValaSourceReference* _tmp4_;
            gchar* _tmp5_ = NULL;
            gchar* _tmp6_;
            gchar* _tmp7_ = NULL;
            gchar* _tmp8_;
            _tmp3_ = vala_gir_parser_get_current_src (self);
            _tmp4_ = _tmp3_;
            _tmp5_ = vala_markup_reader_get_attribute (self->priv->reader, "version");
            _tmp6_ = _tmp5_;
            _tmp7_ = g_strdup_printf ("unsupported GIR version %s (supported: %s)", _tmp6_, VALA_GIR_PARSER_GIR_VERSION);
            _tmp8_ = _tmp7_;
            vala_report_error (_tmp4_, _tmp8_);
            _g_free0 (_tmp8_);
            _g_free0 (_tmp6_);
            _vala_source_reference_unref0 (_tmp4_);
            return;
      }
      vala_gir_parser_next (self);
      while (TRUE) {
            const gchar* _tmp9_ = NULL;
            if (!(self->priv->current_token == VALA_MARKUP_TOKEN_TYPE_START_ELEMENT)) {
                  break;
            }
            _tmp9_ = vala_markup_reader_get_name (self->priv->reader);
            if (g_strcmp0 (_tmp9_, "namespace") == 0) {
                  ValaNamespace* _tmp10_ = NULL;
                  ValaNamespace* ns;
                  _tmp10_ = vala_gir_parser_parse_namespace (self);
                  ns = _tmp10_;
                  if (ns != NULL) {
                        ValaNamespace* _tmp11_ = NULL;
                        _tmp11_ = vala_code_context_get_root (self->priv->context);
                        vala_symbol_add_namespace ((ValaSymbol*) _tmp11_, ns);
                  }
                  _vala_code_node_unref0 (ns);
            } else {
                  const gchar* _tmp12_ = NULL;
                  _tmp12_ = vala_markup_reader_get_name (self->priv->reader);
                  if (g_strcmp0 (_tmp12_, "include") == 0) {
                        vala_gir_parser_parse_include (self);
                  } else {
                        const gchar* _tmp13_ = NULL;
                        _tmp13_ = vala_markup_reader_get_name (self->priv->reader);
                        if (g_strcmp0 (_tmp13_, "package") == 0) {
                              gchar* _tmp14_ = NULL;
                              gchar* pkg;
                              gboolean _tmp15_;
                              _tmp14_ = vala_gir_parser_parse_package (self);
                              pkg = _tmp14_;
                              _tmp15_ = vala_code_context_has_package (self->priv->context, pkg);
                              if (_tmp15_) {
                                    _g_free0 (pkg);
                                    return;
                              } else {
                                    vala_code_context_add_package (self->priv->context, pkg);
                              }
                              _g_free0 (pkg);
                        } else {
                              const gchar* _tmp16_ = NULL;
                              _tmp16_ = vala_markup_reader_get_name (self->priv->reader);
                              if (g_strcmp0 (_tmp16_, "c:include") == 0) {
                                    vala_gir_parser_parse_c_include (self);
                              } else {
                                    ValaSourceReference* _tmp17_ = NULL;
                                    ValaSourceReference* _tmp18_;
                                    const gchar* _tmp19_ = NULL;
                                    gchar* _tmp20_ = NULL;
                                    gchar* _tmp21_;
                                    _tmp17_ = vala_gir_parser_get_current_src (self);
                                    _tmp18_ = _tmp17_;
                                    _tmp19_ = vala_markup_reader_get_name (self->priv->reader);
                                    _tmp20_ = g_strdup_printf ("unknown child element `%s' in `repository'", _tmp19_);
                                    _tmp21_ = _tmp20_;
                                    vala_report_error (_tmp18_, _tmp21_);
                                    _g_free0 (_tmp21_);
                                    _vala_source_reference_unref0 (_tmp18_);
                                    vala_gir_parser_skip_element (self);
                              }
                        }
                  }
            }
      }
      vala_gir_parser_end_element (self, "repository");
}


static void vala_gir_parser_parse_include (ValaGirParser* self) {
      gchar* _tmp0_ = NULL;
      gchar* pkg;
      gchar* _tmp1_ = NULL;
      gchar* version;
      g_return_if_fail (self != NULL);
      vala_gir_parser_start_element (self, "include");
      _tmp0_ = vala_markup_reader_get_attribute (self->priv->reader, "name");
      pkg = _tmp0_;
      _tmp1_ = vala_markup_reader_get_attribute (self->priv->reader, "version");
      version = _tmp1_;
      if (version != NULL) {
            gchar* _tmp2_ = NULL;
            _tmp2_ = g_strdup_printf ("%s-%s", pkg, version);
            _g_free0 (pkg);
            pkg = _tmp2_;
      }
      vala_code_context_add_external_package (self->priv->context, pkg);
      vala_gir_parser_next (self);
      vala_gir_parser_end_element (self, "include");
      _g_free0 (version);
      _g_free0 (pkg);
}


static gchar* vala_gir_parser_parse_package (ValaGirParser* self) {
      gchar* result = NULL;
      gchar* _tmp0_ = NULL;
      gchar* pkg;
      g_return_val_if_fail (self != NULL, NULL);
      vala_gir_parser_start_element (self, "package");
      _tmp0_ = vala_markup_reader_get_attribute (self->priv->reader, "name");
      pkg = _tmp0_;
      vala_gir_parser_next (self);
      vala_gir_parser_end_element (self, "package");
      result = pkg;
      return result;
}


static void _vala_array_add1 (gchar*** array, int* length, int* size, gchar* value) {
      if ((*length) == (*size)) {
            *size = (*size) ? (2 * (*size)) : 4;
            *array = g_renew (gchar*, *array, (*size) + 1);
      }
      (*array)[(*length)++] = value;
      (*array)[*length] = NULL;
}


static void vala_gir_parser_parse_c_include (ValaGirParser* self) {
      gchar* _tmp0_ = NULL;
      g_return_if_fail (self != NULL);
      vala_gir_parser_start_element (self, "c:include");
      _tmp0_ = vala_markup_reader_get_attribute (self->priv->reader, "name");
      _vala_array_add1 (&self->priv->cheader_filenames, &self->priv->cheader_filenames_length1, &self->priv->_cheader_filenames_size_, _tmp0_);
      vala_gir_parser_next (self);
      vala_gir_parser_end_element (self, "c:include");
}


static void vala_gir_parser_skip_element (ValaGirParser* self) {
      gint level;
      g_return_if_fail (self != NULL);
      vala_gir_parser_next (self);
      level = 1;
      while (TRUE) {
            if (!(level > 0)) {
                  break;
            }
            if (self->priv->current_token == VALA_MARKUP_TOKEN_TYPE_START_ELEMENT) {
                  level++;
            } else {
                  if (self->priv->current_token == VALA_MARKUP_TOKEN_TYPE_END_ELEMENT) {
                        level--;
                  } else {
                        if (self->priv->current_token == VALA_MARKUP_TOKEN_TYPE_EOF) {
                              ValaSourceReference* _tmp0_ = NULL;
                              ValaSourceReference* _tmp1_;
                              _tmp0_ = vala_gir_parser_get_current_src (self);
                              _tmp1_ = _tmp0_;
                              vala_report_error (_tmp1_, "unexpected end of file");
                              _vala_source_reference_unref0 (_tmp1_);
                              break;
                        }
                  }
            }
            vala_gir_parser_next (self);
      }
}


static void _vala_code_node_unref0_ (gpointer var) {
      (var == NULL) ? NULL : (var = (vala_code_node_unref (var), NULL));
}


static void _g_list_free__vala_code_node_unref0_ (GList* self) {
      g_list_foreach (self, (GFunc) _vala_code_node_unref0_, NULL);
      g_list_free (self);
}


static ValaNamespace* vala_gir_parser_parse_namespace (ValaGirParser* self) {
      ValaNamespace* result = NULL;
      gboolean new_namespace;
      gchar* _tmp0_ = NULL;
      gchar* cprefix;
      gchar* _tmp1_;
      gchar* namespace_name;
      gchar* _tmp2_ = NULL;
      gchar* gir_namespace;
      gchar* _tmp3_ = NULL;
      gchar* gir_version;
      ValaGirParserMetadata* _tmp5_ = NULL;
      ValaGirParserMetadata* ns_metadata;
      gboolean _tmp6_;
      ValaNamespace* _tmp8_ = NULL;
      ValaScope* _tmp9_ = NULL;
      ValaSymbol* _tmp10_ = NULL;
      ValaSymbol* _tmp11_;
      ValaNamespace* ns;
      const gchar* _tmp18_ = NULL;
      ValaNamespace* _tmp21_;
      ValaNamespace* old_namespace;
      ValaNamespace* _tmp22_;
      gboolean _tmp27_;
      gpointer _tmp33_ = NULL;
      ValaArrayList* current_namespace_methods;
      ValaHashMap* _tmp35_;
      ValaHashMap* old_symbols_info;
      ValaHashMap* _tmp36_ = NULL;
      ValaHashMap* _tmp106_;
      ValaNamespace* _tmp107_;
      g_return_val_if_fail (self != NULL, NULL);
      vala_gir_parser_start_element (self, "namespace");
      new_namespace = FALSE;
      _tmp0_ = vala_markup_reader_get_attribute (self->priv->reader, "c:identifier-prefixes");
      cprefix = _tmp0_;
      _tmp1_ = g_strdup (cprefix);
      namespace_name = _tmp1_;
      _tmp2_ = vala_markup_reader_get_attribute (self->priv->reader, "name");
      gir_namespace = _tmp2_;
      _tmp3_ = vala_markup_reader_get_attribute (self->priv->reader, "version");
      gir_version = _tmp3_;
      if (namespace_name == NULL) {
            gchar* _tmp4_;
            _tmp4_ = g_strdup (gir_namespace);
            _g_free0 (namespace_name);
            namespace_name = _tmp4_;
      }
      vala_source_file_set_gir_namespace (self->priv->current_source_file, gir_namespace);
      vala_source_file_set_gir_version (self->priv->current_source_file, gir_version);
      _tmp5_ = vala_gir_parser_metadata_match_child (self->priv->metadata, gir_namespace, VALA_GIR_PARSER_METADATA_TYPE_GENERIC);
      ns_metadata = _tmp5_;
      _tmp6_ = vala_gir_parser_metadata_has_argument (ns_metadata, VALA_GIR_PARSER_ARGUMENT_TYPE_NAME);
      if (_tmp6_) {
            gchar* _tmp7_ = NULL;
            _tmp7_ = vala_gir_parser_metadata_get_string (ns_metadata, VALA_GIR_PARSER_ARGUMENT_TYPE_NAME);
            _g_free0 (namespace_name);
            namespace_name = _tmp7_;
      }
      _tmp8_ = vala_code_context_get_root (self->priv->context);
      _tmp9_ = vala_symbol_get_scope ((ValaSymbol*) _tmp8_);
      _tmp10_ = vala_scope_lookup (_tmp9_, namespace_name);
      _tmp11_ = _tmp10_;
      ns = VALA_IS_NAMESPACE (_tmp11_) ? ((ValaNamespace*) _tmp11_) : NULL;
      if (ns == NULL) {
            ValaSourceReference* _tmp12_ = NULL;
            ValaSourceReference* _tmp13_;
            ValaNamespace* _tmp14_ = NULL;
            _tmp12_ = vala_gir_parser_get_current_src (self);
            _tmp13_ = _tmp12_;
            _tmp14_ = vala_namespace_new (namespace_name, _tmp13_);
            _vala_code_node_unref0 (ns);
            ns = _tmp14_;
            _vala_source_reference_unref0 (_tmp13_);
            new_namespace = TRUE;
      } else {
            gboolean _tmp15_;
            _tmp15_ = vala_symbol_get_external_package ((ValaSymbol*) ns);
            if (_tmp15_) {
                  ValaSourceReference* _tmp16_ = NULL;
                  ValaSourceReference* _tmp17_;
                  __g_list_free__vala_code_node_unref0_0 (((ValaCodeNode*) ns)->attributes);
                  ((ValaCodeNode*) ns)->attributes = NULL;
                  _tmp16_ = vala_gir_parser_get_current_src (self);
                  _tmp17_ = _tmp16_;
                  vala_code_node_set_source_reference ((ValaCodeNode*) ns, _tmp17_);
                  _vala_source_reference_unref0 (_tmp17_);
            }
      }
      _tmp18_ = vala_symbol_get_name ((ValaSymbol*) ns);
      if (g_strcmp0 (gir_namespace, _tmp18_) != 0) {
            ValaUnresolvedSymbol* _tmp19_ = NULL;
            ValaUnresolvedSymbol* _tmp20_;
            _tmp19_ = vala_unresolved_symbol_new (NULL, gir_namespace, NULL);
            _tmp20_ = _tmp19_;
            vala_gir_parser_set_symbol_mapping (self, (ValaSymbol*) _tmp20_, (ValaSymbol*) ns);
            _vala_code_node_unref0 (_tmp20_);
      }
      _tmp21_ = _vala_code_node_ref0 (self->priv->current_namespace);
      old_namespace = _tmp21_;
      _tmp22_ = _vala_code_node_ref0 (ns);
      _vala_code_node_unref0 (self->priv->current_namespace);
      self->priv->current_namespace = _tmp22_;
      if (cprefix != NULL) {
            gchar* _tmp23_ = NULL;
            gchar* _tmp24_;
            gchar* _tmp25_;
            gchar* _tmp26_;
            vala_namespace_add_cprefix (ns, cprefix);
            _tmp23_ = vala_symbol_camel_case_to_lower_case (cprefix);
            _tmp24_ = _tmp23_;
            _tmp25_ = g_strconcat (_tmp24_, "_", NULL);
            _tmp26_ = _tmp25_;
            vala_namespace_set_lower_case_cprefix (ns, _tmp26_);
            _g_free0 (_tmp26_);
            _g_free0 (_tmp24_);
      }
      _tmp27_ = vala_gir_parser_metadata_has_argument (ns_metadata, VALA_GIR_PARSER_ARGUMENT_TYPE_CHEADER_FILENAME);
      if (_tmp27_) {
            gchar* _tmp28_ = NULL;
            gchar* val;
            gchar** _tmp29_;
            gchar** _tmp30_ = NULL;
            _tmp28_ = vala_gir_parser_metadata_get_string (ns_metadata, VALA_GIR_PARSER_ARGUMENT_TYPE_CHEADER_FILENAME);
            val = _tmp28_;
            _tmp30_ = _tmp29_ = g_strsplit (val, ",", 0);
            {
                  gchar** filename_collection;
                  int filename_collection_length1;
                  int filename_it;
                  filename_collection = _tmp30_;
                  filename_collection_length1 = _vala_array_length (_tmp29_);
                  for (filename_it = 0; filename_it < _vala_array_length (_tmp29_); filename_it = filename_it + 1) {
                        gchar* _tmp31_;
                        gchar* filename;
                        _tmp31_ = g_strdup (filename_collection[filename_it]);
                        filename = _tmp31_;
                        {
                              vala_symbol_add_cheader_filename ((ValaSymbol*) ns, filename);
                              _g_free0 (filename);
                        }
                  }
                  filename_collection = (_vala_array_free (filename_collection, filename_collection_length1, (GDestroyNotify) g_free), NULL);
            }
            _g_free0 (val);
      } else {
            {
                  gchar** c_header_collection;
                  int c_header_collection_length1;
                  int c_header_it;
                  c_header_collection = self->priv->cheader_filenames;
                  c_header_collection_length1 = self->priv->cheader_filenames_length1;
                  for (c_header_it = 0; c_header_it < self->priv->cheader_filenames_length1; c_header_it = c_header_it + 1) {
                        gchar* _tmp32_;
                        gchar* c_header;
                        _tmp32_ = g_strdup (c_header_collection[c_header_it]);
                        c_header = _tmp32_;
                        {
                              vala_symbol_add_cheader_filename ((ValaSymbol*) ns, c_header);
                              _g_free0 (c_header);
                        }
                  }
            }
      }
      vala_gir_parser_next (self);
      _tmp33_ = vala_map_get ((ValaMap*) self->priv->namespace_methods, ns);
      current_namespace_methods = (ValaArrayList*) _tmp33_;
      if (current_namespace_methods == NULL) {
            ValaArrayList* _tmp34_ = NULL;
            _tmp34_ = vala_array_list_new (VALA_TYPE_METHOD, (GBoxedCopyFunc) vala_code_node_ref, vala_code_node_unref, g_direct_equal);
            _vala_iterable_unref0 (current_namespace_methods);
            current_namespace_methods = _tmp34_;
            vala_map_set ((ValaMap*) self->priv->namespace_methods, ns, current_namespace_methods);
      }
      _tmp35_ = _vala_map_ref0 (self->priv->current_symbols_info);
      old_symbols_info = _tmp35_;
      _tmp36_ = vala_hash_map_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, VALA_TYPE_ARRAY_LIST, (GBoxedCopyFunc) vala_iterable_ref, vala_iterable_unref, g_str_hash, g_str_equal, g_direct_equal);
      _vala_map_unref0 (self->priv->current_symbols_info);
      self->priv->current_symbols_info = _tmp36_;
      while (TRUE) {
            gboolean _tmp37_;
            const gchar* _tmp38_ = NULL;
            if (!(self->priv->current_token == VALA_MARKUP_TOKEN_TYPE_START_ELEMENT)) {
                  break;
            }
            _tmp37_ = vala_gir_parser_push_metadata (self);
            if (!_tmp37_) {
                  vala_gir_parser_skip_element (self);
                  continue;
            }
            _tmp38_ = vala_markup_reader_get_name (self->priv->reader);
            if (g_strcmp0 (_tmp38_, "alias") == 0) {
                  ValaGirParserAlias* _tmp39_ = NULL;
                  ValaGirParserAlias* alias;
                  _tmp39_ = vala_gir_parser_parse_alias (self);
                  alias = _tmp39_;
                  vala_collection_add ((ValaCollection*) self->priv->aliases, alias);
                  _vala_gir_parser_alias_unref0 (alias);
            } else {
                  const gchar* _tmp40_ = NULL;
                  _tmp40_ = vala_markup_reader_get_name (self->priv->reader);
                  if (g_strcmp0 (_tmp40_, "enumeration") == 0) {
                        gchar* _tmp41_ = NULL;
                        gchar* _tmp42_;
                        gboolean _tmp43_;
                        _tmp41_ = vala_markup_reader_get_attribute (self->priv->reader, "glib:error-quark");
                        _tmp42_ = _tmp41_;
                        _tmp43_ = _tmp42_ != NULL;
                        _g_free0 (_tmp42_);
                        if (_tmp43_) {
                              ValaErrorDomain* _tmp44_ = NULL;
                              ValaErrorDomain* _tmp45_;
                              ValaGirParserSymbolInfo* _tmp46_ = NULL;
                              ValaGirParserSymbolInfo* _tmp47_;
                              _tmp44_ = vala_gir_parser_parse_error_domain (self);
                              _tmp45_ = _tmp44_;
                              _tmp46_ = vala_gir_parser_add_symbol_info (self, (ValaSymbol*) _tmp45_);
                              _tmp47_ = _tmp46_;
                              _vala_gir_parser_symbol_info_unref0 (_tmp47_);
                              _vala_code_node_unref0 (_tmp45_);
                        } else {
                              ValaEnum* _tmp48_ = NULL;
                              ValaEnum* _tmp49_;
                              ValaGirParserSymbolInfo* _tmp50_ = NULL;
                              ValaGirParserSymbolInfo* _tmp51_;
                              _tmp48_ = vala_gir_parser_parse_enumeration (self);
                              _tmp49_ = _tmp48_;
                              _tmp50_ = vala_gir_parser_add_symbol_info (self, (ValaSymbol*) _tmp49_);
                              _tmp51_ = _tmp50_;
                              _vala_gir_parser_symbol_info_unref0 (_tmp51_);
                              _vala_code_node_unref0 (_tmp49_);
                        }
                  } else {
                        const gchar* _tmp52_ = NULL;
                        _tmp52_ = vala_markup_reader_get_name (self->priv->reader);
                        if (g_strcmp0 (_tmp52_, "bitfield") == 0) {
                              ValaEnum* _tmp53_ = NULL;
                              ValaEnum* _tmp54_;
                              ValaGirParserSymbolInfo* _tmp55_ = NULL;
                              ValaGirParserSymbolInfo* _tmp56_;
                              _tmp53_ = vala_gir_parser_parse_bitfield (self);
                              _tmp54_ = _tmp53_;
                              _tmp55_ = vala_gir_parser_add_symbol_info (self, (ValaSymbol*) _tmp54_);
                              _tmp56_ = _tmp55_;
                              _vala_gir_parser_symbol_info_unref0 (_tmp56_);
                              _vala_code_node_unref0 (_tmp54_);
                        } else {
                              const gchar* _tmp57_ = NULL;
                              _tmp57_ = vala_markup_reader_get_name (self->priv->reader);
                              if (g_strcmp0 (_tmp57_, "function") == 0) {
                                    ValaMethod* _tmp58_ = NULL;
                                    ValaMethod* _tmp59_;
                                    _tmp58_ = vala_gir_parser_parse_method (self, "function");
                                    _tmp59_ = _tmp58_;
                                    vala_collection_add ((ValaCollection*) current_namespace_methods, _tmp59_);
                                    _vala_code_node_unref0 (_tmp59_);
                              } else {
                                    const gchar* _tmp60_ = NULL;
                                    _tmp60_ = vala_markup_reader_get_name (self->priv->reader);
                                    if (g_strcmp0 (_tmp60_, "callback") == 0) {
                                          ValaDelegate* _tmp61_ = NULL;
                                          ValaDelegate* _tmp62_;
                                          ValaGirParserSymbolInfo* _tmp63_ = NULL;
                                          ValaGirParserSymbolInfo* _tmp64_;
                                          _tmp61_ = vala_gir_parser_parse_callback (self);
                                          _tmp62_ = _tmp61_;
                                          _tmp63_ = vala_gir_parser_add_symbol_info (self, (ValaSymbol*) _tmp62_);
                                          _tmp64_ = _tmp63_;
                                          _vala_gir_parser_symbol_info_unref0 (_tmp64_);
                                          _vala_code_node_unref0 (_tmp62_);
                                    } else {
                                          const gchar* _tmp65_ = NULL;
                                          _tmp65_ = vala_markup_reader_get_name (self->priv->reader);
                                          if (g_strcmp0 (_tmp65_, "record") == 0) {
                                                gchar* _tmp66_ = NULL;
                                                gchar* _tmp67_;
                                                gboolean _tmp68_;
                                                _tmp66_ = vala_markup_reader_get_attribute (self->priv->reader, "glib:get-type");
                                                _tmp67_ = _tmp66_;
                                                _tmp68_ = _tmp67_ != NULL;
                                                _g_free0 (_tmp67_);
                                                if (_tmp68_) {
                                                      ValaClass* _tmp69_ = NULL;
                                                      ValaClass* _tmp70_;
                                                      ValaGirParserSymbolInfo* _tmp71_ = NULL;
                                                      ValaGirParserSymbolInfo* _tmp72_;
                                                      _tmp69_ = vala_gir_parser_parse_boxed (self, "record");
                                                      _tmp70_ = _tmp69_;
                                                      _tmp71_ = vala_gir_parser_add_symbol_info (self, (ValaSymbol*) _tmp70_);
                                                      _tmp72_ = _tmp71_;
                                                      _vala_gir_parser_symbol_info_unref0 (_tmp72_);
                                                      _vala_code_node_unref0 (_tmp70_);
                                                } else {
                                                      ValaStruct* _tmp73_ = NULL;
                                                      ValaStruct* _tmp74_;
                                                      ValaGirParserSymbolInfo* _tmp75_ = NULL;
                                                      ValaGirParserSymbolInfo* _tmp76_;
                                                      _tmp73_ = vala_gir_parser_parse_record (self);
                                                      _tmp74_ = _tmp73_;
                                                      _tmp75_ = vala_gir_parser_add_symbol_info (self, (ValaSymbol*) _tmp74_);
                                                      _tmp76_ = _tmp75_;
                                                      _vala_gir_parser_symbol_info_unref0 (_tmp76_);
                                                      _vala_code_node_unref0 (_tmp74_);
                                                }
                                          } else {
                                                const gchar* _tmp77_ = NULL;
                                                _tmp77_ = vala_markup_reader_get_name (self->priv->reader);
                                                if (g_strcmp0 (_tmp77_, "class") == 0) {
                                                      ValaClass* _tmp78_ = NULL;
                                                      ValaClass* _tmp79_;
                                                      ValaGirParserSymbolInfo* _tmp80_ = NULL;
                                                      ValaGirParserSymbolInfo* _tmp81_;
                                                      _tmp78_ = vala_gir_parser_parse_class (self);
                                                      _tmp79_ = _tmp78_;
                                                      _tmp80_ = vala_gir_parser_add_symbol_info (self, (ValaSymbol*) _tmp79_);
                                                      _tmp81_ = _tmp80_;
                                                      _vala_gir_parser_symbol_info_unref0 (_tmp81_);
                                                      _vala_code_node_unref0 (_tmp79_);
                                                } else {
                                                      const gchar* _tmp82_ = NULL;
                                                      _tmp82_ = vala_markup_reader_get_name (self->priv->reader);
                                                      if (g_strcmp0 (_tmp82_, "interface") == 0) {
                                                            ValaInterface* _tmp83_ = NULL;
                                                            ValaInterface* iface;
                                                            ValaGirParserSymbolInfo* _tmp84_ = NULL;
                                                            ValaGirParserSymbolInfo* _tmp85_;
                                                            _tmp83_ = vala_gir_parser_parse_interface (self);
                                                            iface = _tmp83_;
                                                            _tmp84_ = vala_gir_parser_add_symbol_info (self, (ValaSymbol*) iface);
                                                            _tmp85_ = _tmp84_;
                                                            _vala_gir_parser_symbol_info_unref0 (_tmp85_);
                                                            vala_collection_add ((ValaCollection*) self->priv->interfaces, iface);
                                                            _vala_code_node_unref0 (iface);
                                                      } else {
                                                            const gchar* _tmp86_ = NULL;
                                                            _tmp86_ = vala_markup_reader_get_name (self->priv->reader);
                                                            if (g_strcmp0 (_tmp86_, "glib:boxed") == 0) {
                                                                  ValaClass* _tmp87_ = NULL;
                                                                  ValaClass* _tmp88_;
                                                                  ValaGirParserSymbolInfo* _tmp89_ = NULL;
                                                                  ValaGirParserSymbolInfo* _tmp90_;
                                                                  _tmp87_ = vala_gir_parser_parse_boxed (self, "glib:boxed");
                                                                  _tmp88_ = _tmp87_;
                                                                  _tmp89_ = vala_gir_parser_add_symbol_info (self, (ValaSymbol*) _tmp88_);
                                                                  _tmp90_ = _tmp89_;
                                                                  _vala_gir_parser_symbol_info_unref0 (_tmp90_);
                                                                  _vala_code_node_unref0 (_tmp88_);
                                                            } else {
                                                                  const gchar* _tmp91_ = NULL;
                                                                  _tmp91_ = vala_markup_reader_get_name (self->priv->reader);
                                                                  if (g_strcmp0 (_tmp91_, "union") == 0) {
                                                                        ValaStruct* _tmp92_ = NULL;
                                                                        ValaStruct* _tmp93_;
                                                                        ValaGirParserSymbolInfo* _tmp94_ = NULL;
                                                                        ValaGirParserSymbolInfo* _tmp95_;
                                                                        _tmp92_ = vala_gir_parser_parse_union (self);
                                                                        _tmp93_ = _tmp92_;
                                                                        _tmp94_ = vala_gir_parser_add_symbol_info (self, (ValaSymbol*) _tmp93_);
                                                                        _tmp95_ = _tmp94_;
                                                                        _vala_gir_parser_symbol_info_unref0 (_tmp95_);
                                                                        _vala_code_node_unref0 (_tmp93_);
                                                                  } else {
                                                                        const gchar* _tmp96_ = NULL;
                                                                        _tmp96_ = vala_markup_reader_get_name (self->priv->reader);
                                                                        if (g_strcmp0 (_tmp96_, "constant") == 0) {
                                                                              ValaConstant* _tmp97_ = NULL;
                                                                              ValaConstant* _tmp98_;
                                                                              ValaGirParserSymbolInfo* _tmp99_ = NULL;
                                                                              ValaGirParserSymbolInfo* _tmp100_;
                                                                              _tmp97_ = vala_gir_parser_parse_constant (self);
                                                                              _tmp98_ = _tmp97_;
                                                                              _tmp99_ = vala_gir_parser_add_symbol_info (self, (ValaSymbol*) _tmp98_);
                                                                              _tmp100_ = _tmp99_;
                                                                              _vala_gir_parser_symbol_info_unref0 (_tmp100_);
                                                                              _vala_code_node_unref0 (_tmp98_);
                                                                        } else {
                                                                              ValaSourceReference* _tmp101_ = NULL;
                                                                              ValaSourceReference* _tmp102_;
                                                                              const gchar* _tmp103_ = NULL;
                                                                              gchar* _tmp104_ = NULL;
                                                                              gchar* _tmp105_;
                                                                              _tmp101_ = vala_gir_parser_get_current_src (self);
                                                                              _tmp102_ = _tmp101_;
                                                                              _tmp103_ = vala_markup_reader_get_name (self->priv->reader);
                                                                              _tmp104_ = g_strdup_printf ("unknown child element `%s' in `namespace'", _tmp103_);
                                                                              _tmp105_ = _tmp104_;
                                                                              vala_report_error (_tmp102_, _tmp105_);
                                                                              _g_free0 (_tmp105_);
                                                                              _vala_source_reference_unref0 (_tmp102_);
                                                                              vala_gir_parser_skip_element (self);
                                                                        }
                                                                  }
                                                            }
                                                      }
                                                }
                                          }
                                    }
                              }
                        }
                  }
            }
            vala_gir_parser_pop_metadata (self);
      }
      vala_gir_parser_end_element (self, "namespace");
      vala_gir_parser_merge_add_process (self, (ValaSymbol*) ns);
      _tmp106_ = _vala_map_ref0 (old_symbols_info);
      _vala_map_unref0 (self->priv->current_symbols_info);
      self->priv->current_symbols_info = _tmp106_;
      _tmp107_ = _vala_code_node_ref0 (old_namespace);
      _vala_code_node_unref0 (self->priv->current_namespace);
      self->priv->current_namespace = _tmp107_;
      if (!new_namespace) {
            _vala_code_node_unref0 (ns);
            ns = NULL;
      }
      result = ns;
      _vala_map_unref0 (old_symbols_info);
      _vala_iterable_unref0 (current_namespace_methods);
      _vala_code_node_unref0 (old_namespace);
      _vala_gir_parser_metadata_unref0 (ns_metadata);
      _g_free0 (gir_version);
      _g_free0 (gir_namespace);
      _g_free0 (namespace_name);
      _g_free0 (cprefix);
      return result;
}


static ValaGirParserAlias* vala_gir_parser_parse_alias (ValaGirParser* self) {
      ValaGirParserAlias* result = NULL;
      ValaGirParserAlias* _tmp0_ = NULL;
      ValaGirParserAlias* alias;
      ValaSourceReference* _tmp1_ = NULL;
      gchar* _tmp2_ = NULL;
      ValaNamespace* _tmp3_;
      ValaDataType* _tmp4_ = NULL;
      ValaDataType* _tmp5_;
      ValaDataType* _tmp6_ = NULL;
      g_return_val_if_fail (self != NULL, NULL);
      vala_gir_parser_start_element (self, "alias");
      _tmp0_ = vala_gir_parser_alias_new ();
      alias = _tmp0_;
      _tmp1_ = vala_gir_parser_get_current_src (self);
      _vala_source_reference_unref0 (alias->source_reference);
      alias->source_reference = _tmp1_;
      _tmp2_ = vala_markup_reader_get_attribute (self->priv->reader, "name");
      _g_free0 (alias->name);
      alias->name = _tmp2_;
      _tmp3_ = _vala_code_node_ref0 (self->priv->current_namespace);
      _vala_code_node_unref0 (alias->parent_namespace);
      alias->parent_namespace = _tmp3_;
      vala_gir_parser_next (self);
      _tmp4_ = vala_gir_parser_parse_type (self, NULL, NULL, TRUE, NULL, NULL);
      _tmp5_ = _tmp4_;
      _tmp6_ = vala_gir_parser_element_get_type (self, _tmp5_, TRUE, NULL);
      _vala_code_node_unref0 (alias->base_type);
      alias->base_type = _tmp6_;
      _vala_code_node_unref0 (_tmp5_);
      vala_gir_parser_end_element (self, "alias");
      result = alias;
      return result;
}


static gunichar string_get_char (const gchar* self, glong index) {
      gunichar result = 0U;
      gunichar _tmp0_;
      g_return_val_if_fail (self != NULL, 0U);
      _tmp0_ = g_utf8_get_char (((gchar*) self) + index);
      result = _tmp0_;
      return result;
}


static void vala_gir_parser_calculate_common_prefix (ValaGirParser* self, gchar** common_prefix, const gchar* cname) {
      g_return_if_fail (self != NULL);
      g_return_if_fail (common_prefix != NULL);
      g_return_if_fail (cname != NULL);
      if ((*common_prefix) == NULL) {
            gchar* _tmp0_;
            _tmp0_ = g_strdup (cname);
            _g_free0 (*common_prefix);
            *common_prefix = _tmp0_;
            while (TRUE) {
                  gboolean _tmp1_ = FALSE;
                  gint _tmp2_;
                  gint _tmp4_;
                  gchar* _tmp5_ = NULL;
                  _tmp2_ = strlen (*common_prefix);
                  if (_tmp2_ > 0) {
                        gboolean _tmp3_;
                        _tmp3_ = g_str_has_suffix (*common_prefix, "_");
                        _tmp1_ = !_tmp3_;
                  } else {
                        _tmp1_ = FALSE;
                  }
                  if (!_tmp1_) {
                        break;
                  }
                  _tmp4_ = strlen (*common_prefix);
                  _tmp5_ = string_substring (*common_prefix, (glong) 0, (glong) (_tmp4_ - 1));
                  _g_free0 (*common_prefix);
                  *common_prefix = _tmp5_;
            }
      } else {
            while (TRUE) {
                  gboolean _tmp6_;
                  gint _tmp7_;
                  gchar* _tmp8_ = NULL;
                  _tmp6_ = g_str_has_prefix (cname, *common_prefix);
                  if (!(!_tmp6_)) {
                        break;
                  }
                  _tmp7_ = strlen (*common_prefix);
                  _tmp8_ = string_substring (*common_prefix, (glong) 0, (glong) (_tmp7_ - 1));
                  _g_free0 (*common_prefix);
                  *common_prefix = _tmp8_;
            }
      }
      while (TRUE) {
            gboolean _tmp9_ = FALSE;
            gint _tmp10_;
            gint _tmp19_;
            gchar* _tmp20_ = NULL;
            _tmp10_ = strlen (*common_prefix);
            if (_tmp10_ > 0) {
                  gboolean _tmp11_ = FALSE;
                  gboolean _tmp12_;
                  _tmp12_ = g_str_has_suffix (*common_prefix, "_");
                  if (!_tmp12_) {
                        _tmp11_ = TRUE;
                  } else {
                        gboolean _tmp13_ = FALSE;
                        gint _tmp14_;
                        gunichar _tmp15_;
                        gboolean _tmp16_;
                        _tmp14_ = strlen (*common_prefix);
                        _tmp15_ = string_get_char (cname, (glong) _tmp14_);
                        _tmp16_ = g_unichar_isdigit (_tmp15_);
                        if (_tmp16_) {
                              gint _tmp17_;
                              gint _tmp18_;
                              _tmp17_ = strlen (cname);
                              _tmp18_ = strlen (*common_prefix);
                              _tmp13_ = (_tmp17_ - _tmp18_) <= 1;
                        } else {
                              _tmp13_ = FALSE;
                        }
                        _tmp11_ = _tmp13_;
                  }
                  _tmp9_ = _tmp11_;
            } else {
                  _tmp9_ = FALSE;
            }
            if (!_tmp9_) {
                  break;
            }
            _tmp19_ = strlen (*common_prefix);
            _tmp20_ = string_substring (*common_prefix, (glong) 0, (glong) (_tmp19_ - 1));
            _g_free0 (*common_prefix);
            *common_prefix = _tmp20_;
      }
}


static ValaEnum* vala_gir_parser_parse_enumeration (ValaGirParser* self) {
      ValaEnum* result = NULL;
      gchar* _tmp0_ = NULL;
      gchar* _tmp1_;
      ValaSourceReference* _tmp2_ = NULL;
      ValaSourceReference* _tmp3_;
      ValaEnum* _tmp4_ = NULL;
      ValaEnum* _tmp5_;
      ValaEnum* en;
      gchar* _tmp6_ = NULL;
      gchar* enum_cname;
      gchar* common_prefix;
      g_return_val_if_fail (self != NULL, NULL);
      vala_gir_parser_start_element (self, "enumeration");
      _tmp0_ = vala_markup_reader_get_attribute (self->priv->reader, "name");
      _tmp1_ = _tmp0_;
      _tmp2_ = vala_gir_parser_get_current_src (self);
      _tmp3_ = _tmp2_;
      _tmp4_ = vala_enum_new (_tmp1_, _tmp3_, NULL);
      _tmp5_ = _tmp4_;
      _vala_source_reference_unref0 (_tmp3_);
      _g_free0 (_tmp1_);
      en = _tmp5_;
      vala_symbol_set_access ((ValaSymbol*) en, VALA_SYMBOL_ACCESSIBILITY_PUBLIC);
      _tmp6_ = vala_markup_reader_get_attribute (self->priv->reader, "c:type");
      enum_cname = _tmp6_;
      if (enum_cname != NULL) {
            vala_enum_set_cname (en, enum_cname);
      }
      vala_gir_parser_next (self);
      common_prefix = NULL;
      while (TRUE) {
            gboolean _tmp7_;
            const gchar* _tmp8_ = NULL;
            if (!(self->priv->current_token == VALA_MARKUP_TOKEN_TYPE_START_ELEMENT)) {
                  break;
            }
            _tmp7_ = vala_gir_parser_push_metadata (self);
            if (!_tmp7_) {
                  vala_gir_parser_skip_element (self);
                  continue;
            }
            _tmp8_ = vala_markup_reader_get_name (self->priv->reader);
            if (g_strcmp0 (_tmp8_, "member") == 0) {
                  ValaEnumValue* _tmp9_ = NULL;
                  ValaEnumValue* ev;
                  gchar* _tmp10_ = NULL;
                  gchar* _tmp11_;
                  _tmp9_ = vala_gir_parser_parse_enumeration_member (self);
                  ev = _tmp9_;
                  vala_enum_add_value (en, ev);
                  _tmp10_ = vala_constant_get_cname ((ValaConstant*) ev);
                  _tmp11_ = _tmp10_;
                  vala_gir_parser_calculate_common_prefix (self, &common_prefix, _tmp11_);
                  _g_free0 (_tmp11_);
                  _vala_code_node_unref0 (ev);
            } else {
                  ValaSourceReference* _tmp12_ = NULL;
                  ValaSourceReference* _tmp13_;
                  const gchar* _tmp14_ = NULL;
                  gchar* _tmp15_ = NULL;
                  gchar* _tmp16_;
                  _tmp12_ = vala_gir_parser_get_current_src (self);
                  _tmp13_ = _tmp12_;
                  _tmp14_ = vala_markup_reader_get_name (self->priv->reader);
                  _tmp15_ = g_strdup_printf ("unknown child element `%s' in `enumaration'", _tmp14_);
                  _tmp16_ = _tmp15_;
                  vala_report_error (_tmp13_, _tmp16_);
                  _g_free0 (_tmp16_);
                  _vala_source_reference_unref0 (_tmp13_);
                  vala_gir_parser_skip_element (self);
            }
            vala_gir_parser_pop_metadata (self);
      }
      vala_enum_set_cprefix (en, common_prefix);
      vala_gir_parser_end_element (self, "enumeration");
      result = en;
      _g_free0 (common_prefix);
      _g_free0 (enum_cname);
      return result;
}


static ValaErrorDomain* vala_gir_parser_parse_error_domain (ValaGirParser* self) {
      ValaErrorDomain* result = NULL;
      gchar* _tmp0_ = NULL;
      gchar* _tmp1_;
      ValaSourceReference* _tmp2_ = NULL;
      ValaSourceReference* _tmp3_;
      ValaErrorDomain* _tmp4_ = NULL;
      ValaErrorDomain* _tmp5_;
      ValaErrorDomain* ed;
      gchar* _tmp6_ = NULL;
      gchar* enum_cname;
      gchar* common_prefix;
      g_return_val_if_fail (self != NULL, NULL);
      vala_gir_parser_start_element (self, "enumeration");
      _tmp0_ = vala_markup_reader_get_attribute (self->priv->reader, "name");
      _tmp1_ = _tmp0_;
      _tmp2_ = vala_gir_parser_get_current_src (self);
      _tmp3_ = _tmp2_;
      _tmp4_ = vala_error_domain_new (_tmp1_, _tmp3_, NULL);
      _tmp5_ = _tmp4_;
      _vala_source_reference_unref0 (_tmp3_);
      _g_free0 (_tmp1_);
      ed = _tmp5_;
      vala_symbol_set_access ((ValaSymbol*) ed, VALA_SYMBOL_ACCESSIBILITY_PUBLIC);
      _tmp6_ = vala_markup_reader_get_attribute (self->priv->reader, "c:type");
      enum_cname = _tmp6_;
      if (enum_cname != NULL) {
            vala_error_domain_set_cname (ed, enum_cname);
      }
      vala_gir_parser_next (self);
      common_prefix = NULL;
      while (TRUE) {
            gboolean _tmp7_;
            const gchar* _tmp8_ = NULL;
            if (!(self->priv->current_token == VALA_MARKUP_TOKEN_TYPE_START_ELEMENT)) {
                  break;
            }
            _tmp7_ = vala_gir_parser_push_metadata (self);
            if (!_tmp7_) {
                  vala_gir_parser_skip_element (self);
                  continue;
            }
            _tmp8_ = vala_markup_reader_get_name (self->priv->reader);
            if (g_strcmp0 (_tmp8_, "member") == 0) {
                  ValaErrorCode* _tmp9_ = NULL;
                  ValaErrorCode* ec;
                  gchar* _tmp10_ = NULL;
                  gchar* _tmp11_;
                  _tmp9_ = vala_gir_parser_parse_error_member (self);
                  ec = _tmp9_;
                  vala_error_domain_add_code (ed, ec);
                  _tmp10_ = vala_typesymbol_get_cname ((ValaTypeSymbol*) ec, FALSE);
                  _tmp11_ = _tmp10_;
                  vala_gir_parser_calculate_common_prefix (self, &common_prefix, _tmp11_);
                  _g_free0 (_tmp11_);
                  _vala_code_node_unref0 (ec);
            } else {
                  ValaSourceReference* _tmp12_ = NULL;
                  ValaSourceReference* _tmp13_;
                  const gchar* _tmp14_ = NULL;
                  gchar* _tmp15_ = NULL;
                  gchar* _tmp16_;
                  _tmp12_ = vala_gir_parser_get_current_src (self);
                  _tmp13_ = _tmp12_;
                  _tmp14_ = vala_markup_reader_get_name (self->priv->reader);
                  _tmp15_ = g_strdup_printf ("unknown child element `%s' in `enumeration'", _tmp14_);
                  _tmp16_ = _tmp15_;
                  vala_report_error (_tmp13_, _tmp16_);
                  _g_free0 (_tmp16_);
                  _vala_source_reference_unref0 (_tmp13_);
                  vala_gir_parser_skip_element (self);
            }
            vala_gir_parser_pop_metadata (self);
      }
      vala_error_domain_set_cprefix (ed, common_prefix);
      vala_gir_parser_end_element (self, "enumeration");
      result = ed;
      _g_free0 (common_prefix);
      _g_free0 (enum_cname);
      return result;
}


static ValaEnum* vala_gir_parser_parse_bitfield (ValaGirParser* self) {
      ValaEnum* result = NULL;
      gchar* _tmp0_ = NULL;
      gchar* _tmp1_;
      ValaSourceReference* _tmp2_ = NULL;
      ValaSourceReference* _tmp3_;
      ValaEnum* _tmp4_ = NULL;
      ValaEnum* _tmp5_;
      ValaEnum* en;
      g_return_val_if_fail (self != NULL, NULL);
      vala_gir_parser_start_element (self, "bitfield");
      _tmp0_ = vala_markup_reader_get_attribute (self->priv->reader, "name");
      _tmp1_ = _tmp0_;
      _tmp2_ = vala_gir_parser_get_current_src (self);
      _tmp3_ = _tmp2_;
      _tmp4_ = vala_enum_new (_tmp1_, _tmp3_, NULL);
      _tmp5_ = _tmp4_;
      _vala_source_reference_unref0 (_tmp3_);
      _g_free0 (_tmp1_);
      en = _tmp5_;
      vala_symbol_set_access ((ValaSymbol*) en, VALA_SYMBOL_ACCESSIBILITY_PUBLIC);
      vala_gir_parser_next (self);
      while (TRUE) {
            gboolean _tmp6_;
            const gchar* _tmp7_ = NULL;
            if (!(self->priv->current_token == VALA_MARKUP_TOKEN_TYPE_START_ELEMENT)) {
                  break;
            }
            _tmp6_ = vala_gir_parser_push_metadata (self);
            if (!_tmp6_) {
                  vala_gir_parser_skip_element (self);
                  continue;
            }
            _tmp7_ = vala_markup_reader_get_name (self->priv->reader);
            if (g_strcmp0 (_tmp7_, "member") == 0) {
                  ValaEnumValue* _tmp8_ = NULL;
                  ValaEnumValue* _tmp9_;
                  _tmp8_ = vala_gir_parser_parse_enumeration_member (self);
                  _tmp9_ = _tmp8_;
                  vala_enum_add_value (en, _tmp9_);
                  _vala_code_node_unref0 (_tmp9_);
            } else {
                  ValaSourceReference* _tmp10_ = NULL;
                  ValaSourceReference* _tmp11_;
                  const gchar* _tmp12_ = NULL;
                  gchar* _tmp13_ = NULL;
                  gchar* _tmp14_;
                  _tmp10_ = vala_gir_parser_get_current_src (self);
                  _tmp11_ = _tmp10_;
                  _tmp12_ = vala_markup_reader_get_name (self->priv->reader);
                  _tmp13_ = g_strdup_printf ("unknown child element `%s' in `bitfield'", _tmp12_);
                  _tmp14_ = _tmp13_;
                  vala_report_error (_tmp11_, _tmp14_);
                  _g_free0 (_tmp14_);
                  _vala_source_reference_unref0 (_tmp11_);
                  vala_gir_parser_skip_element (self);
            }
            vala_gir_parser_pop_metadata (self);
      }
      vala_gir_parser_end_element (self, "bitfield");
      result = en;
      return result;
}


static ValaEnumValue* vala_gir_parser_parse_enumeration_member (ValaGirParser* self) {
      ValaEnumValue* result = NULL;
      gchar* _tmp0_ = NULL;
      gchar* _tmp1_;
      gchar* _tmp2_ = NULL;
      gchar* _tmp3_;
      gchar* _tmp4_ = NULL;
      gchar* _tmp5_;
      ValaSourceReference* _tmp6_ = NULL;
      ValaSourceReference* _tmp7_;
      ValaEnumValue* _tmp8_ = NULL;
      ValaEnumValue* _tmp9_;
      ValaEnumValue* ev;
      gchar* _tmp10_ = NULL;
      gchar* _tmp11_;
      g_return_val_if_fail (self != NULL, NULL);
      vala_gir_parser_start_element (self, "member");
      _tmp0_ = vala_markup_reader_get_attribute (self->priv->reader, "name");
      _tmp1_ = _tmp0_;
      _tmp2_ = g_utf8_strup (_tmp1_, (gssize) (-1));
      _tmp3_ = _tmp2_;
      _tmp4_ = string_replace (_tmp3_, "-", "_");
      _tmp5_ = _tmp4_;
      _tmp6_ = vala_gir_parser_get_current_src (self);
      _tmp7_ = _tmp6_;
      _tmp8_ = vala_enum_value_new (_tmp5_, NULL, _tmp7_, NULL);
      _tmp9_ = _tmp8_;
      _vala_source_reference_unref0 (_tmp7_);
      _g_free0 (_tmp5_);
      _g_free0 (_tmp3_);
      _g_free0 (_tmp1_);
      ev = _tmp9_;
      _tmp10_ = vala_markup_reader_get_attribute (self->priv->reader, "c:identifier");
      _tmp11_ = _tmp10_;
      vala_constant_set_cname ((ValaConstant*) ev, _tmp11_);
      _g_free0 (_tmp11_);
      vala_gir_parser_next (self);
      vala_gir_parser_end_element (self, "member");
      result = ev;
      return result;
}


static ValaErrorCode* vala_gir_parser_parse_error_member (ValaGirParser* self) {
      ValaErrorCode* result = NULL;
      ValaErrorCode* ec = NULL;
      gchar* _tmp0_ = NULL;
      gchar* _tmp1_;
      gchar* _tmp2_ = NULL;
      gchar* _tmp3_;
      gchar* _tmp4_ = NULL;
      gchar* _tmp5_;
      gchar* name;
      gchar* _tmp6_ = NULL;
      gchar* value;
      g_return_val_if_fail (self != NULL, NULL);
      vala_gir_parser_start_element (self, "member");
      _tmp0_ = vala_markup_reader_get_attribute (self->priv->reader, "name");
      _tmp1_ = _tmp0_;
      _tmp2_ = g_utf8_strup (_tmp1_, (gssize) (-1));
      _tmp3_ = _tmp2_;
      _tmp4_ = string_replace (_tmp3_, "-", "_");
      _tmp5_ = _tmp4_;
      _g_free0 (_tmp3_);
      _g_free0 (_tmp1_);
      name = _tmp5_;
      _tmp6_ = vala_markup_reader_get_attribute (self->priv->reader, "value");
      value = _tmp6_;
      if (value != NULL) {
            ValaIntegerLiteral* _tmp7_ = NULL;
            ValaIntegerLiteral* _tmp8_;
            ValaErrorCode* _tmp9_ = NULL;
            _tmp7_ = vala_integer_literal_new (value, NULL);
            _tmp8_ = _tmp7_;
            _tmp9_ = vala_error_code_new_with_value (name, (ValaExpression*) _tmp8_, NULL);
            _vala_code_node_unref0 (ec);
            ec = _tmp9_;
            _vala_code_node_unref0 (_tmp8_);
      } else {
            ValaErrorCode* _tmp10_ = NULL;
            _tmp10_ = vala_error_code_new (name, NULL, NULL);
            _vala_code_node_unref0 (ec);
            ec = _tmp10_;
      }
      vala_gir_parser_next (self);
      vala_gir_parser_end_element (self, "member");
      result = ec;
      _g_free0 (value);
      _g_free0 (name);
      return result;
}


static ValaDataType* vala_gir_parser_parse_return_value (ValaGirParser* self, gchar** ctype) {
      gchar* _ctype = NULL;
      ValaDataType* result = NULL;
      gchar* _tmp0_ = NULL;
      gchar* transfer;
      gchar* _tmp1_ = NULL;
      gchar* allow_none;
      gboolean transfer_elements;
      ValaDataType* _tmp2_ = NULL;
      ValaDataType* _tmp6_;
      ValaDataType* type;
      gboolean _tmp7_ = FALSE;
      g_return_val_if_fail (self != NULL, NULL);
      vala_gir_parser_start_element (self, "return-value");
      _tmp0_ = vala_markup_reader_get_attribute (self->priv->reader, "transfer-ownership");
      transfer = _tmp0_;
      _tmp1_ = vala_markup_reader_get_attribute (self->priv->reader, "allow-none");
      allow_none = _tmp1_;
      vala_gir_parser_next (self);
      transfer_elements = g_strcmp0 (transfer, "full") == 0;
      if ((&_ctype) != NULL) {
            gchar* _tmp3_ = NULL;
            ValaDataType* _tmp4_ = NULL;
            _tmp4_ = vala_gir_parser_parse_type (self, &_tmp3_, NULL, transfer_elements, NULL, NULL);
            _g_free0 (_ctype);
            _ctype = _tmp3_;
            _vala_code_node_unref0 (_tmp2_);
            _tmp2_ = _tmp4_;
      } else {
            ValaDataType* _tmp5_ = NULL;
            _tmp5_ = vala_gir_parser_parse_type (self, NULL, NULL, transfer_elements, NULL, NULL);
            _vala_code_node_unref0 (_tmp2_);
            _tmp2_ = _tmp5_;
      }
      _tmp6_ = _vala_code_node_ref0 (_tmp2_);
      type = _tmp6_;
      if (g_strcmp0 (transfer, "full") == 0) {
            _tmp7_ = TRUE;
      } else {
            _tmp7_ = g_strcmp0 (transfer, "container") == 0;
      }
      if (_tmp7_) {
            vala_data_type_set_value_owned (type, TRUE);
      }
      if (g_strcmp0 (allow_none, "1") == 0) {
            vala_data_type_set_nullable (type, TRUE);
      }
      vala_gir_parser_end_element (self, "return-value");
      result = type;
      _vala_code_node_unref0 (_tmp2_);
      _g_free0 (allow_none);
      _g_free0 (transfer);
      if (ctype) {
            *ctype = _ctype;
      } else {
            _g_free0 (_ctype);
      }
      return result;
}


static ValaParameter* vala_gir_parser_parse_parameter (ValaGirParser* self, gint* array_length_idx, gint* closure_idx, gint* destroy_idx, gchar** scope, const gchar* default_name) {
      gint _array_length_idx = 0;
      gint _closure_idx = 0;
      gint _destroy_idx = 0;
      gchar* _scope = NULL;
      ValaParameter* result = NULL;
      ValaParameter* param = NULL;
      gchar* _tmp0_ = NULL;
      gchar* name;
      gchar* direction;
      gboolean _tmp2_;
      gchar* _tmp9_ = NULL;
      gchar* transfer;
      gchar* _tmp10_ = NULL;
      gchar* allow_none;
      gchar* _tmp12_ = NULL;
      gchar* closure;
      gchar* _tmp13_ = NULL;
      gchar* destroy;
      gboolean _tmp14_ = FALSE;
      gboolean _tmp16_ = FALSE;
      const gchar* _tmp18_ = NULL;
      g_return_val_if_fail (self != NULL, NULL);
      if ((&_array_length_idx) != NULL) {
            _array_length_idx = -1;
      }
      if ((&_closure_idx) != NULL) {
            _closure_idx = -1;
      }
      if ((&_destroy_idx) != NULL) {
            _destroy_idx = -1;
      }
      vala_gir_parser_start_element (self, "parameter");
      _tmp0_ = vala_markup_reader_get_attribute (self->priv->reader, "name");
      name = _tmp0_;
      if (name == NULL) {
            gchar* _tmp1_;
            _tmp1_ = g_strdup (default_name);
            _g_free0 (name);
            name = _tmp1_;
      }
      direction = NULL;
      _tmp2_ = vala_gir_parser_metadata_has_argument (self->priv->metadata, VALA_GIR_PARSER_ARGUMENT_TYPE_OUT);
      if (_tmp2_) {
            gboolean _tmp3_;
            _tmp3_ = vala_gir_parser_metadata_get_bool (self->priv->metadata, VALA_GIR_PARSER_ARGUMENT_TYPE_OUT);
            if (_tmp3_) {
                  gchar* _tmp4_;
                  _tmp4_ = g_strdup ("out");
                  _g_free0 (direction);
                  direction = _tmp4_;
            }
      } else {
            gboolean _tmp5_;
            _tmp5_ = vala_gir_parser_metadata_has_argument (self->priv->metadata, VALA_GIR_PARSER_ARGUMENT_TYPE_REF);
            if (_tmp5_) {
                  gboolean _tmp6_;
                  _tmp6_ = vala_gir_parser_metadata_get_bool (self->priv->metadata, VALA_GIR_PARSER_ARGUMENT_TYPE_REF);
                  if (_tmp6_) {
                        gchar* _tmp7_;
                        _tmp7_ = g_strdup ("inout");
                        _g_free0 (direction);
                        direction = _tmp7_;
                  }
            } else {
                  gchar* _tmp8_ = NULL;
                  _tmp8_ = vala_markup_reader_get_attribute (self->priv->reader, "direction");
                  _g_free0 (direction);
                  direction = _tmp8_;
            }
      }
      _tmp9_ = vala_markup_reader_get_attribute (self->priv->reader, "transfer-ownership");
      transfer = _tmp9_;
      _tmp10_ = vala_markup_reader_get_attribute (self->priv->reader, "allow-none");
      allow_none = _tmp10_;
      if ((&_scope) != NULL) {
            gchar* _tmp11_ = NULL;
            _tmp11_ = vala_markup_reader_get_attribute (self->priv->reader, "scope");
            _g_free0 (_scope);
            _scope = _tmp11_;
      }
      _tmp12_ = vala_markup_reader_get_attribute (self->priv->reader, "closure");
      closure = _tmp12_;
      _tmp13_ = vala_markup_reader_get_attribute (self->priv->reader, "destroy");
      destroy = _tmp13_;
      if (closure != NULL) {
            _tmp14_ = (&_closure_idx) != NULL;
      } else {
            _tmp14_ = FALSE;
      }
      if (_tmp14_) {
            gint _tmp15_;
            _tmp15_ = atoi (closure);
            _closure_idx = _tmp15_;
      }
      if (destroy != NULL) {
            _tmp16_ = (&_destroy_idx) != NULL;
      } else {
            _tmp16_ = FALSE;
      }
      if (_tmp16_) {
            gint _tmp17_;
            _tmp17_ = atoi (destroy);
            _destroy_idx = _tmp17_;
      }
      vala_gir_parser_next (self);
      _tmp18_ = vala_markup_reader_get_name (self->priv->reader);
      if (g_strcmp0 (_tmp18_, "varargs") == 0) {
            ValaSourceReference* _tmp19_ = NULL;
            ValaSourceReference* _tmp20_;
            ValaParameter* _tmp21_ = NULL;
            vala_gir_parser_start_element (self, "varargs");
            vala_gir_parser_next (self);
            _tmp19_ = vala_gir_parser_get_current_src (self);
            _tmp20_ = _tmp19_;
            _tmp21_ = vala_parameter_new_with_ellipsis (_tmp20_);
            _vala_code_node_unref0 (param);
            param = _tmp21_;
            _vala_source_reference_unref0 (_tmp20_);
            vala_gir_parser_end_element (self, "varargs");
      } else {
            gchar* ctype = NULL;
            gchar* _tmp22_ = NULL;
            gint _tmp23_;
            ValaDataType* _tmp24_ = NULL;
            ValaDataType* type;
            gboolean changed = FALSE;
            gboolean _tmp25_;
            ValaDataType* _tmp26_ = NULL;
            gboolean _tmp27_ = FALSE;
            gboolean _tmp30_ = FALSE;
            gboolean _tmp31_ = FALSE;
            ValaSourceReference* _tmp32_ = NULL;
            ValaSourceReference* _tmp33_;
            ValaParameter* _tmp34_ = NULL;
            ValaExpression* _tmp35_ = NULL;
            ValaExpression* _tmp36_;
            _tmp24_ = vala_gir_parser_parse_type (self, &_tmp22_, &_tmp23_, g_strcmp0 (transfer, "full") == 0, NULL, NULL);
            _g_free0 (ctype);
            ctype = _tmp22_;
            _array_length_idx = _tmp23_;
            type = _tmp24_;
            _tmp26_ = vala_gir_parser_element_get_type (self, type, FALSE, &_tmp25_);
            changed = _tmp25_;
            _vala_code_node_unref0 (type);
            type = _tmp26_;
            if (!changed) {
                  _g_free0 (ctype);
                  ctype = NULL;
            }
            if (VALA_IS_ARRAY_TYPE (type)) {
                  gboolean _tmp28_;
                  _tmp28_ = vala_gir_parser_metadata_has_argument (self->priv->metadata, VALA_GIR_PARSER_ARGUMENT_TYPE_ARRAY_LENGTH_POS);
                  _tmp27_ = _tmp28_;
            } else {
                  _tmp27_ = FALSE;
            }
            if (_tmp27_) {
                  gint _tmp29_;
                  _tmp29_ = vala_gir_parser_metadata_get_integer (self->priv->metadata, VALA_GIR_PARSER_ARGUMENT_TYPE_ARRAY_LENGTH_POS);
                  _array_length_idx = _tmp29_;
            }
            if (g_strcmp0 (transfer, "full") == 0) {
                  _tmp31_ = TRUE;
            } else {
                  _tmp31_ = g_strcmp0 (transfer, "container") == 0;
            }
            if (_tmp31_) {
                  _tmp30_ = TRUE;
            } else {
                  _tmp30_ = destroy != NULL;
            }
            if (_tmp30_) {
                  vala_data_type_set_value_owned (type, TRUE);
            }
            if (g_strcmp0 (allow_none, "1") == 0) {
                  vala_data_type_set_nullable (type, TRUE);
            }
            _tmp32_ = vala_gir_parser_get_current_src (self);
            _tmp33_ = _tmp32_;
            _tmp34_ = vala_parameter_new (name, type, _tmp33_);
            _vala_code_node_unref0 (param);
            param = _tmp34_;
            _vala_source_reference_unref0 (_tmp33_);
            vala_parameter_set_ctype (param, ctype);
            if (g_strcmp0 (direction, "out") == 0) {
                  vala_parameter_set_direction (param, VALA_PARAMETER_DIRECTION_OUT);
            } else {
                  if (g_strcmp0 (direction, "inout") == 0) {
                        vala_parameter_set_direction (param, VALA_PARAMETER_DIRECTION_REF);
                  }
            }
            _tmp35_ = vala_gir_parser_metadata_get_expression (self->priv->metadata, VALA_GIR_PARSER_ARGUMENT_TYPE_DEFAULT);
            _tmp36_ = _tmp35_;
            vala_variable_set_initializer ((ValaVariable*) param, _tmp36_);
            _vala_code_node_unref0 (_tmp36_);
            _vala_code_node_unref0 (type);
            _g_free0 (ctype);
      }
      vala_gir_parser_end_element (self, "parameter");
      result = param;
      _g_free0 (destroy);
      _g_free0 (closure);
      _g_free0 (allow_none);
      _g_free0 (transfer);
      _g_free0 (direction);
      _g_free0 (name);
      if (array_length_idx) {
            *array_length_idx = _array_length_idx;
      }
      if (closure_idx) {
            *closure_idx = _closure_idx;
      }
      if (destroy_idx) {
            *destroy_idx = _destroy_idx;
      }
      if (scope) {
            *scope = _scope;
      } else {
            _g_free0 (_scope);
      }
      return result;
}


static ValaDataType* vala_gir_parser_parse_type (ValaGirParser* self, gchar** ctype, gint* array_length_index, gboolean transfer_elements, gboolean* no_array_length, gboolean* array_null_terminated) {
      gchar* _ctype = NULL;
      gint _array_length_index = 0;
      gboolean _no_array_length = FALSE;
      gboolean _array_null_terminated = FALSE;
      ValaDataType* result = NULL;
      gboolean is_array;
      gchar* _tmp0_ = NULL;
      gchar* type_name;
      const gchar* _tmp1_ = NULL;
      gboolean _tmp16_ = FALSE;
      gboolean _tmp18_;
      gboolean _tmp19_;
      ValaDataType* _tmp20_ = NULL;
      ValaDataType* type;
      const gchar* _tmp22_ = NULL;
      g_return_val_if_fail (self != NULL, NULL);
      is_array = FALSE;
      _tmp0_ = vala_markup_reader_get_attribute (self->priv->reader, "name");
      type_name = _tmp0_;
      if ((&_array_length_index) != NULL) {
            _array_length_index = -1;
      }
      _tmp1_ = vala_markup_reader_get_name (self->priv->reader);
      if (g_strcmp0 (_tmp1_, "array") == 0) {
            gboolean _tmp2_ = FALSE;
            is_array = TRUE;
            vala_gir_parser_start_element (self, "array");
            if (g_strcmp0 (type_name, "GLib.Array") == 0) {
                  _tmp2_ = TRUE;
            } else {
                  _tmp2_ = g_strcmp0 (type_name, "GLib.PtrArray") == 0;
            }
            if (!_tmp2_) {
                  gboolean _tmp3_ = FALSE;
                  gchar* _tmp4_ = NULL;
                  gchar* _tmp5_;
                  gboolean _tmp6_;
                  ValaDataType* _tmp10_ = NULL;
                  ValaDataType* element_type;
                  ValaArrayType* _tmp11_ = NULL;
                  _tmp4_ = vala_markup_reader_get_attribute (self->priv->reader, "length");
                  _tmp5_ = _tmp4_;
                  _tmp6_ = _tmp5_ != NULL;
                  _g_free0 (_tmp5_);
                  if (_tmp6_) {
                        _tmp3_ = (&_array_length_index) != NULL;
                  } else {
                        _tmp3_ = FALSE;
                  }
                  if (_tmp3_) {
                        gchar* _tmp7_ = NULL;
                        gchar* _tmp8_;
                        gint _tmp9_;
                        _tmp7_ = vala_markup_reader_get_attribute (self->priv->reader, "length");
                        _tmp8_ = _tmp7_;
                        _tmp9_ = atoi (_tmp8_);
                        _array_length_index = _tmp9_;
                        _g_free0 (_tmp8_);
                  }
                  vala_gir_parser_next (self);
                  _tmp10_ = vala_gir_parser_parse_type (self, NULL, NULL, FALSE, NULL, NULL);
                  element_type = _tmp10_;
                  vala_gir_parser_end_element (self, "array");
                  _tmp11_ = vala_array_type_new (element_type, 1, NULL);
                  result = (ValaDataType*) _tmp11_;
                  _vala_code_node_unref0 (element_type);
                  _g_free0 (type_name);
                  if (ctype) {
                        *ctype = _ctype;
                  } else {
                        _g_free0 (_ctype);
                  }
                  if (array_length_index) {
                        *array_length_index = _array_length_index;
                  }
                  if (no_array_length) {
                        *no_array_length = _no_array_length;
                  }
                  if (array_null_terminated) {
                        *array_null_terminated = _array_null_terminated;
                  }
                  return result;
            }
      } else {
            const gchar* _tmp12_ = NULL;
            _tmp12_ = vala_markup_reader_get_name (self->priv->reader);
            if (g_strcmp0 (_tmp12_, "callback") == 0) {
                  ValaDelegate* _tmp13_ = NULL;
                  ValaDelegate* callback;
                  ValaDelegateType* _tmp14_ = NULL;
                  _tmp13_ = vala_gir_parser_parse_callback (self);
                  callback = _tmp13_;
                  _tmp14_ = vala_delegate_type_new (callback);
                  result = (ValaDataType*) _tmp14_;
                  _vala_code_node_unref0 (callback);
                  _g_free0 (type_name);
                  if (ctype) {
                        *ctype = _ctype;
                  } else {
                        _g_free0 (_ctype);
                  }
                  if (array_length_index) {
                        *array_length_index = _array_length_index;
                  }
                  if (no_array_length) {
                        *no_array_length = _no_array_length;
                  }
                  if (array_null_terminated) {
                        *array_null_terminated = _array_null_terminated;
                  }
                  return result;
            } else {
                  vala_gir_parser_start_element (self, "type");
            }
      }
      if ((&_ctype) != NULL) {
            gchar* _tmp15_ = NULL;
            _tmp15_ = vala_markup_reader_get_attribute (self->priv->reader, "c:type");
            _g_free0 (_ctype);
            _ctype = _tmp15_;
      }
      vala_gir_parser_next (self);
      if (g_strcmp0 (type_name, "GLib.PtrArray") == 0) {
            _tmp16_ = self->priv->current_token == VALA_MARKUP_TOKEN_TYPE_START_ELEMENT;
      } else {
            _tmp16_ = FALSE;
      }
      if (_tmp16_) {
            gchar* _tmp17_;
            _tmp17_ = g_strdup ("GLib.GenericArray");
            _g_free0 (type_name);
            type_name = _tmp17_;
      }
      _tmp20_ = vala_gir_parser_parse_type_from_gir_name (self, type_name, &_tmp18_, &_tmp19_);
      _no_array_length = _tmp18_;
      _array_null_terminated = _tmp19_;
      type = _tmp20_;
      while (TRUE) {
            ValaDataType* _tmp21_ = NULL;
            ValaDataType* element_type;
            if (!(self->priv->current_token == VALA_MARKUP_TOKEN_TYPE_START_ELEMENT)) {
                  break;
            }
            _tmp21_ = vala_gir_parser_parse_type (self, NULL, NULL, FALSE, NULL, NULL);
            element_type = _tmp21_;
            vala_data_type_set_value_owned (element_type, transfer_elements);
            vala_data_type_add_type_argument (type, element_type);
            _vala_code_node_unref0 (element_type);
      }
      if (is_array) {
            _tmp22_ = "array";
      } else {
            _tmp22_ = "type";
      }
      vala_gir_parser_end_element (self, _tmp22_);
      result = type;
      _g_free0 (type_name);
      if (ctype) {
            *ctype = _ctype;
      } else {
            _g_free0 (_ctype);
      }
      if (array_length_index) {
            *array_length_index = _array_length_index;
      }
      if (no_array_length) {
            *no_array_length = _no_array_length;
      }
      if (array_null_terminated) {
            *array_null_terminated = _array_null_terminated;
      }
      return result;
}


static ValaDataType* vala_gir_parser_parse_type_from_gir_name (ValaGirParser* self, const gchar* type_name, gboolean* no_array_length, gboolean* array_null_terminated) {
      gboolean _no_array_length = FALSE;
      gboolean _array_null_terminated = FALSE;
      ValaDataType* result = NULL;
      ValaDataType* type = NULL;
      g_return_val_if_fail (self != NULL, NULL);
      g_return_val_if_fail (type_name != NULL, NULL);
      if ((&_no_array_length) != NULL) {
            _no_array_length = FALSE;
      }
      if ((&_array_null_terminated) != NULL) {
            _array_null_terminated = FALSE;
      }
      if (g_strcmp0 (type_name, "none") == 0) {
            ValaSourceReference* _tmp0_ = NULL;
            ValaSourceReference* _tmp1_;
            ValaVoidType* _tmp2_ = NULL;
            _tmp0_ = vala_gir_parser_get_current_src (self);
            _tmp1_ = _tmp0_;
            _tmp2_ = vala_void_type_new (_tmp1_);
            _vala_code_node_unref0 (type);
            type = (ValaDataType*) _tmp2_;
            _vala_source_reference_unref0 (_tmp1_);
      } else {
            if (g_strcmp0 (type_name, "gpointer") == 0) {
                  ValaSourceReference* _tmp3_ = NULL;
                  ValaSourceReference* _tmp4_;
                  ValaVoidType* _tmp5_ = NULL;
                  ValaVoidType* _tmp6_;
                  ValaSourceReference* _tmp7_ = NULL;
                  ValaSourceReference* _tmp8_;
                  ValaPointerType* _tmp9_ = NULL;
                  _tmp3_ = vala_gir_parser_get_current_src (self);
                  _tmp4_ = _tmp3_;
                  _tmp5_ = vala_void_type_new (_tmp4_);
                  _tmp6_ = _tmp5_;
                  _tmp7_ = vala_gir_parser_get_current_src (self);
                  _tmp8_ = _tmp7_;
                  _tmp9_ = vala_pointer_type_new ((ValaDataType*) _tmp6_, _tmp8_);
                  _vala_code_node_unref0 (type);
                  type = (ValaDataType*) _tmp9_;
                  _vala_source_reference_unref0 (_tmp8_);
                  _vala_code_node_unref0 (_tmp6_);
                  _vala_source_reference_unref0 (_tmp4_);
            } else {
                  if (g_strcmp0 (type_name, "GObject.Strv") == 0) {
                        ValaUnresolvedSymbol* _tmp10_ = NULL;
                        ValaUnresolvedSymbol* _tmp11_;
                        ValaUnresolvedType* _tmp12_ = NULL;
                        ValaUnresolvedType* _tmp13_;
                        ValaSourceReference* _tmp14_ = NULL;
                        ValaSourceReference* _tmp15_;
                        ValaArrayType* _tmp16_ = NULL;
                        _tmp10_ = vala_unresolved_symbol_new (NULL, "string", NULL);
                        _tmp11_ = _tmp10_;
                        _tmp12_ = vala_unresolved_type_new_from_symbol (_tmp11_, NULL);
                        _tmp13_ = _tmp12_;
                        _tmp14_ = vala_gir_parser_get_current_src (self);
                        _tmp15_ = _tmp14_;
                        _tmp16_ = vala_array_type_new ((ValaDataType*) _tmp13_, 1, _tmp15_);
                        _vala_code_node_unref0 (type);
                        type = (ValaDataType*) _tmp16_;
                        _vala_source_reference_unref0 (_tmp15_);
                        _vala_code_node_unref0 (_tmp13_);
                        _vala_code_node_unref0 (_tmp11_);
                        if ((&_no_array_length) != NULL) {
                              _no_array_length = TRUE;
                        }
                        if ((&_array_null_terminated) != NULL) {
                              _array_null_terminated = TRUE;
                        }
                  } else {
                        gboolean known_type;
                        ValaSourceReference* _tmp17_ = NULL;
                        ValaSourceReference* _tmp18_;
                        ValaUnresolvedSymbol* _tmp19_ = NULL;
                        ValaUnresolvedSymbol* _tmp20_;
                        ValaUnresolvedSymbol* sym;
                        ValaSourceReference* _tmp21_ = NULL;
                        ValaSourceReference* _tmp22_;
                        ValaUnresolvedType* _tmp23_ = NULL;
                        known_type = TRUE;
                        if (g_strcmp0 (type_name, "utf8") == 0) {
                              type_name = "string";
                        } else {
                              if (g_strcmp0 (type_name, "gboolean") == 0) {
                                    type_name = "bool";
                              } else {
                                    if (g_strcmp0 (type_name, "gchar") == 0) {
                                          type_name = "char";
                                    } else {
                                          if (g_strcmp0 (type_name, "gshort") == 0) {
                                                type_name = "short";
                                          } else {
                                                if (g_strcmp0 (type_name, "gushort") == 0) {
                                                      type_name = "ushort";
                                                } else {
                                                      if (g_strcmp0 (type_name, "gint") == 0) {
                                                            type_name = "int";
                                                      } else {
                                                            if (g_strcmp0 (type_name, "guint") == 0) {
                                                                  type_name = "uint";
                                                            } else {
                                                                  if (g_strcmp0 (type_name, "glong") == 0) {
                                                                        type_name = "long";
                                                                  } else {
                                                                        if (g_strcmp0 (type_name, "gulong") == 0) {
                                                                              type_name = "ulong";
                                                                        } else {
                                                                              if (g_strcmp0 (type_name, "gint8") == 0) {
                                                                                    type_name = "int8";
                                                                              } else {
                                                                                    if (g_strcmp0 (type_name, "guint8") == 0) {
                                                                                          type_name = "uint8";
                                                                                    } else {
                                                                                          if (g_strcmp0 (type_name, "gint16") == 0) {
                                                                                                type_name = "int16";
                                                                                          } else {
                                                                                                if (g_strcmp0 (type_name, "guint16") == 0) {
                                                                                                      type_name = "uint16";
                                                                                                } else {
                                                                                                      if (g_strcmp0 (type_name, "gint32") == 0) {
                                                                                                            type_name = "int32";
                                                                                                      } else {
                                                                                                            if (g_strcmp0 (type_name, "guint32") == 0) {
                                                                                                                  type_name = "uint32";
                                                                                                            } else {
                                                                                                                  if (g_strcmp0 (type_name, "gint64") == 0) {
                                                                                                                        type_name = "int64";
                                                                                                                  } else {
                                                                                                                        if (g_strcmp0 (type_name, "guint64") == 0) {
                                                                                                                              type_name = "uint64";
                                                                                                                        } else {
                                                                                                                              if (g_strcmp0 (type_name, "gfloat") == 0) {
                                                                                                                                    type_name = "float";
                                                                                                                              } else {
                                                                                                                                    if (g_strcmp0 (type_name, "gdouble") == 0) {
                                                                                                                                          type_name = "double";
                                                                                                                                    } else {
                                                                                                                                          if (g_strcmp0 (type_name, "filename") == 0) {
                                                                                                                                                type_name = "string";
                                                                                                                                          } else {
                                                                                                                                                if (g_strcmp0 (type_name, "GLib.offset") == 0) {
                                                                                                                                                      type_name = "int64";
                                                                                                                                                } else {
                                                                                                                                                      if (g_strcmp0 (type_name, "gsize") == 0) {
                                                                                                                                                            type_name = "size_t";
                                                                                                                                                      } else {
                                                                                                                                                            if (g_strcmp0 (type_name, "gssize") == 0) {
                                                                                                                                                                  type_name = "ssize_t";
                                                                                                                                                            } else {
                                                                                                                                                                  if (g_strcmp0 (type_name, "GType") == 0) {
                                                                                                                                                                        type_name = "GLib.Type";
                                                                                                                                                                  } else {
                                                                                                                                                                        if (g_strcmp0 (type_name, "GLib.String") == 0) {
                                                                                                                                                                              type_name = "GLib.StringBuilder";
                                                                                                                                                                        } else {
                                                                                                                                                                              if (g_strcmp0 (type_name, "GObject.Class") == 0) {
                                                                                                                                                                                    type_name = "GLib.ObjectClass";
                                                                                                                                                                              } else {
                                                                                                                                                                                    if (g_strcmp0 (type_name, "GLib.unichar") == 0) {
                                                                                                                                                                                          type_name = "unichar";
                                                                                                                                                                                    } else {
                                                                                                                                                                                          if (g_strcmp0 (type_name, "GLib.Data") == 0) {
                                                                                                                                                                                                type_name = "GLib.Datalist";
                                                                                                                                                                                          } else {
                                                                                                                                                                                                if (g_strcmp0 (type_name, "Atk.ImplementorIface") == 0) {
                                                                                                                                                                                                      type_name = "Atk.Implementor";
                                                                                                                                                                                                } else {
                                                                                                                                                                                                      known_type = FALSE;
                                                                                                                                                                                                }
                                                                                                                                                                                          }
                                                                                                                                                                                    }
                                                                                                                                                                              }
                                                                                                                                                                        }
                                                                                                                                                                  }
                                                                                                                                                            }
                                                                                                                                                      }
                                                                                                                                                }
                                                                                                                                          }
                                                                                                                                    }
                                                                                                                              }
                                                                                                                        }
                                                                                                                  }
                                                                                                            }
                                                                                                      }
                                                                                                }
                                                                                          }
                                                                                    }
                                                                              }
                                                                        }
                                                                  }
                                                            }
                                                      }
                                                }
                                          }
                                    }
                              }
                        }
                        _tmp17_ = vala_gir_parser_get_current_src (self);
                        _tmp18_ = _tmp17_;
                        _tmp19_ = vala_gir_parser_parse_symbol_from_string (self, type_name, _tmp18_);
                        _tmp20_ = _tmp19_;
                        _vala_source_reference_unref0 (_tmp18_);
                        sym = _tmp20_;
                        _tmp21_ = vala_gir_parser_get_current_src (self);
                        _tmp22_ = _tmp21_;
                        _tmp23_ = vala_unresolved_type_new_from_symbol (sym, _tmp22_);
                        _vala_code_node_unref0 (type);
                        type = (ValaDataType*) _tmp23_;
                        _vala_source_reference_unref0 (_tmp22_);
                        if (!known_type) {
                              vala_collection_add ((ValaCollection*) self->priv->unresolved_gir_symbols, sym);
                        }
                        _vala_code_node_unref0 (sym);
                  }
            }
      }
      result = type;
      if (no_array_length) {
            *no_array_length = _no_array_length;
      }
      if (array_null_terminated) {
            *array_null_terminated = _array_null_terminated;
      }
      return result;
}


static ValaStruct* vala_gir_parser_parse_record (ValaGirParser* self) {
      ValaStruct* result = NULL;
      gchar* _tmp0_ = NULL;
      gchar* _tmp1_;
      ValaSourceReference* _tmp2_ = NULL;
      ValaSourceReference* _tmp3_;
      ValaStruct* _tmp4_ = NULL;
      ValaStruct* _tmp5_;
      ValaStruct* st;
      gchar* _tmp6_ = NULL;
      gchar* cname;
      gchar* _tmp7_ = NULL;
      g_return_val_if_fail (self != NULL, NULL);
      vala_gir_parser_start_element (self, "record");
      _tmp0_ = vala_markup_reader_get_attribute (self->priv->reader, "name");
      _tmp1_ = _tmp0_;
      _tmp2_ = vala_gir_parser_get_current_src (self);
      _tmp3_ = _tmp2_;
      _tmp4_ = vala_struct_new (_tmp1_, _tmp3_, NULL);
      _tmp5_ = _tmp4_;
      _vala_source_reference_unref0 (_tmp3_);
      _g_free0 (_tmp1_);
      st = _tmp5_;
      vala_symbol_set_external ((ValaSymbol*) st, TRUE);
      vala_symbol_set_access ((ValaSymbol*) st, VALA_SYMBOL_ACCESSIBILITY_PUBLIC);
      _tmp6_ = vala_markup_reader_get_attribute (self->priv->reader, "c:type");
      cname = _tmp6_;
      if (cname != NULL) {
            vala_struct_set_cname (st, cname);
      }
      _tmp7_ = vala_markup_reader_get_attribute (self->priv->reader, "glib:is-gtype-struct-for");
      _g_free0 (self->priv->current_gtype_struct_for);
      self->priv->current_gtype_struct_for = _tmp7_;
      if (self->priv->current_gtype_struct_for != NULL) {
            vala_map_set ((ValaMap*) self->priv->girdata, "glib:is-gtype-struct-for", self->priv->current_gtype_struct_for);
      }
      vala_gir_parser_next (self);
      while (TRUE) {
            gboolean _tmp8_;
            const gchar* _tmp9_ = NULL;
            if (!(self->priv->current_token == VALA_MARKUP_TOKEN_TYPE_START_ELEMENT)) {
                  break;
            }
            _tmp8_ = vala_gir_parser_push_metadata (self);
            if (!_tmp8_) {
                  vala_gir_parser_skip_element (self);
                  continue;
            }
            _tmp9_ = vala_markup_reader_get_name (self->priv->reader);
            if (g_strcmp0 (_tmp9_, "field") == 0) {
                  gchar* _tmp10_ = NULL;
                  gchar* _tmp11_;
                  gboolean _tmp12_;
                  _tmp10_ = vala_markup_reader_get_attribute (self->priv->reader, "name");
                  _tmp11_ = _tmp10_;
                  _tmp12_ = g_strcmp0 (_tmp11_, "priv") != 0;
                  _g_free0 (_tmp11_);
                  if (_tmp12_) {
                        ValaField* _tmp13_ = NULL;
                        ValaField* _tmp14_;
                        _tmp13_ = vala_gir_parser_parse_field (self);
                        _tmp14_ = _tmp13_;
                        vala_symbol_add_field ((ValaSymbol*) st, _tmp14_);
                        _vala_code_node_unref0 (_tmp14_);
                  } else {
                        vala_gir_parser_skip_element (self);
                  }
            } else {
                  const gchar* _tmp15_ = NULL;
                  _tmp15_ = vala_markup_reader_get_name (self->priv->reader);
                  if (g_strcmp0 (_tmp15_, "constructor") == 0) {
                        ValaMethod* _tmp16_ = NULL;
                        ValaMethod* _tmp17_;
                        _tmp16_ = vala_gir_parser_parse_constructor (self, NULL);
                        _tmp17_ = _tmp16_;
                        _vala_code_node_unref0 (_tmp17_);
                  } else {
                        const gchar* _tmp18_ = NULL;
                        _tmp18_ = vala_markup_reader_get_name (self->priv->reader);
                        if (g_strcmp0 (_tmp18_, "method") == 0) {
                              ValaMethod* _tmp19_ = NULL;
                              ValaMethod* _tmp20_;
                              _tmp19_ = vala_gir_parser_parse_method (self, "method");
                              _tmp20_ = _tmp19_;
                              vala_symbol_add_method ((ValaSymbol*) st, _tmp20_);
                              _vala_code_node_unref0 (_tmp20_);
                        } else {
                              const gchar* _tmp21_ = NULL;
                              _tmp21_ = vala_markup_reader_get_name (self->priv->reader);
                              if (g_strcmp0 (_tmp21_, "union") == 0) {
                                    ValaStruct* _tmp22_ = NULL;
                                    ValaStruct* s;
                                    ValaList* _tmp23_ = NULL;
                                    ValaList* s_fields;
                                    _tmp22_ = vala_gir_parser_parse_union (self);
                                    s = _tmp22_;
                                    _tmp23_ = vala_struct_get_fields (s);
                                    s_fields = _tmp23_;
                                    {
                                          ValaList* _tmp24_;
                                          ValaList* _f_list;
                                          gint _tmp25_;
                                          gint _f_size;
                                          gint _f_index;
                                          _tmp24_ = _vala_iterable_ref0 (s_fields);
                                          _f_list = _tmp24_;
                                          _tmp25_ = vala_collection_get_size ((ValaCollection*) _f_list);
                                          _f_size = _tmp25_;
                                          _f_index = -1;
                                          while (TRUE) {
                                                gpointer _tmp26_ = NULL;
                                                ValaField* f;
                                                gchar* _tmp27_ = NULL;
                                                gchar* _tmp28_;
                                                gchar* _tmp29_;
                                                gchar* _tmp30_;
                                                gchar* _tmp31_ = NULL;
                                                gchar* _tmp32_;
                                                gchar* _tmp33_;
                                                gchar* _tmp34_;
                                                const gchar* _tmp35_ = NULL;
                                                gchar* _tmp36_;
                                                gchar* _tmp37_;
                                                const gchar* _tmp38_ = NULL;
                                                gchar* _tmp39_;
                                                gchar* _tmp40_;
                                                _f_index = _f_index + 1;
                                                if (!(_f_index < _f_size)) {
                                                      break;
                                                }
                                                _tmp26_ = vala_list_get (_f_list, _f_index);
                                                f = (ValaField*) _tmp26_;
                                                _tmp27_ = vala_typesymbol_get_cname ((ValaTypeSymbol*) s, FALSE);
                                                _tmp28_ = _tmp27_;
                                                _tmp29_ = g_strconcat (_tmp28_, ".", NULL);
                                                _tmp30_ = _tmp29_;
                                                _tmp31_ = vala_field_get_cname (f);
                                                _tmp32_ = _tmp31_;
                                                _tmp33_ = g_strconcat (_tmp30_, _tmp32_, NULL);
                                                _tmp34_ = _tmp33_;
                                                vala_field_set_cname (f, _tmp34_);
                                                _g_free0 (_tmp34_);
                                                _g_free0 (_tmp32_);
                                                _g_free0 (_tmp30_);
                                                _g_free0 (_tmp28_);
                                                _tmp35_ = vala_symbol_get_name ((ValaSymbol*) s);
                                                _tmp36_ = g_strconcat (_tmp35_, "_", NULL);
                                                _tmp37_ = _tmp36_;
                                                _tmp38_ = vala_symbol_get_name ((ValaSymbol*) f);
                                                _tmp39_ = g_strconcat (_tmp37_, _tmp38_, NULL);
                                                _tmp40_ = _tmp39_;
                                                vala_symbol_set_name ((ValaSymbol*) f, _tmp40_);
                                                _g_free0 (_tmp40_);
                                                _g_free0 (_tmp37_);
                                                vala_symbol_add_field ((ValaSymbol*) st, f);
                                                _vala_code_node_unref0 (f);
                                          }
                                          _vala_iterable_unref0 (_f_list);
                                    }
                                    _vala_iterable_unref0 (s_fields);
                                    _vala_code_node_unref0 (s);
                              } else {
                                    ValaSourceReference* _tmp41_ = NULL;
                                    ValaSourceReference* _tmp42_;
                                    const gchar* _tmp43_ = NULL;
                                    gchar* _tmp44_ = NULL;
                                    gchar* _tmp45_;
                                    _tmp41_ = vala_gir_parser_get_current_src (self);
                                    _tmp42_ = _tmp41_;
                                    _tmp43_ = vala_markup_reader_get_name (self->priv->reader);
                                    _tmp44_ = g_strdup_printf ("unknown child element `%s' in `record'", _tmp43_);
                                    _tmp45_ = _tmp44_;
                                    vala_report_error (_tmp42_, _tmp45_);
                                    _g_free0 (_tmp45_);
                                    _vala_source_reference_unref0 (_tmp42_);
                                    vala_gir_parser_skip_element (self);
                              }
                        }
                  }
            }
            vala_gir_parser_pop_metadata (self);
      }
      vala_gir_parser_end_element (self, "record");
      _g_free0 (self->priv->current_gtype_struct_for);
      self->priv->current_gtype_struct_for = NULL;
      result = st;
      _g_free0 (cname);
      return result;
}


static ValaClass* vala_gir_parser_parse_class (ValaGirParser* self) {
      ValaClass* result = NULL;
      gchar* _tmp0_ = NULL;
      gchar* _tmp1_;
      ValaSourceReference* _tmp2_ = NULL;
      ValaSourceReference* _tmp3_;
      ValaClass* _tmp4_ = NULL;
      ValaClass* _tmp5_;
      ValaClass* cl;
      gchar* _tmp6_ = NULL;
      gchar* cname;
      gchar* _tmp7_ = NULL;
      gchar* parent;
      gboolean first_field;
      ValaHashMap* _tmp10_;
      ValaHashMap* old_symbols_info;
      ValaHashMap* _tmp11_ = NULL;
      ValaHashMap* _tmp86_;
      g_return_val_if_fail (self != NULL, NULL);
      vala_gir_parser_start_element (self, "class");
      _tmp0_ = vala_markup_reader_get_attribute (self->priv->reader, "name");
      _tmp1_ = _tmp0_;
      _tmp2_ = vala_gir_parser_get_current_src (self);
      _tmp3_ = _tmp2_;
      _tmp4_ = vala_class_new (_tmp1_, _tmp3_, NULL);
      _tmp5_ = _tmp4_;
      _vala_source_reference_unref0 (_tmp3_);
      _g_free0 (_tmp1_);
      cl = _tmp5_;
      vala_symbol_set_access ((ValaSymbol*) cl, VALA_SYMBOL_ACCESSIBILITY_PUBLIC);
      vala_symbol_set_external ((ValaSymbol*) cl, TRUE);
      _tmp6_ = vala_markup_reader_get_attribute (self->priv->reader, "c:type");
      cname = _tmp6_;
      if (cname != NULL) {
            vala_class_set_cname (cl, cname);
      }
      _tmp7_ = vala_markup_reader_get_attribute (self->priv->reader, "parent");
      parent = _tmp7_;
      if (parent != NULL) {
            ValaDataType* _tmp8_ = NULL;
            ValaDataType* _tmp9_;
            _tmp8_ = vala_gir_parser_parse_type_from_gir_name (self, parent, NULL, NULL);
            _tmp9_ = _tmp8_;
            vala_class_add_base_type (cl, _tmp9_);
            _vala_code_node_unref0 (_tmp9_);
      }
      vala_gir_parser_next (self);
      first_field = TRUE;
      _tmp10_ = _vala_map_ref0 (self->priv->current_symbols_info);
      old_symbols_info = _tmp10_;
      _tmp11_ = vala_hash_map_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, VALA_TYPE_ARRAY_LIST, (GBoxedCopyFunc) vala_iterable_ref, vala_iterable_unref, g_str_hash, g_str_equal, g_direct_equal);
      _vala_map_unref0 (self->priv->current_symbols_info);
      self->priv->current_symbols_info = _tmp11_;
      while (TRUE) {
            gboolean _tmp12_;
            const gchar* _tmp13_ = NULL;
            if (!(self->priv->current_token == VALA_MARKUP_TOKEN_TYPE_START_ELEMENT)) {
                  break;
            }
            _tmp12_ = vala_gir_parser_push_metadata (self);
            if (!_tmp12_) {
                  vala_gir_parser_skip_element (self);
                  continue;
            }
            _tmp13_ = vala_markup_reader_get_name (self->priv->reader);
            if (g_strcmp0 (_tmp13_, "implements") == 0) {
                  gchar* _tmp14_ = NULL;
                  gchar* _tmp15_;
                  ValaDataType* _tmp16_ = NULL;
                  ValaDataType* _tmp17_;
                  vala_gir_parser_start_element (self, "implements");
                  _tmp14_ = vala_markup_reader_get_attribute (self->priv->reader, "name");
                  _tmp15_ = _tmp14_;
                  _tmp16_ = vala_gir_parser_parse_type_from_gir_name (self, _tmp15_, NULL, NULL);
                  _tmp17_ = _tmp16_;
                  vala_class_add_base_type (cl, _tmp17_);
                  _vala_code_node_unref0 (_tmp17_);
                  _g_free0 (_tmp15_);
                  vala_gir_parser_next (self);
                  vala_gir_parser_end_element (self, "implements");
            } else {
                  const gchar* _tmp18_ = NULL;
                  _tmp18_ = vala_markup_reader_get_name (self->priv->reader);
                  if (g_strcmp0 (_tmp18_, "constant") == 0) {
                        ValaConstant* _tmp19_ = NULL;
                        ValaConstant* _tmp20_;
                        ValaGirParserSymbolInfo* _tmp21_ = NULL;
                        ValaGirParserSymbolInfo* _tmp22_;
                        _tmp19_ = vala_gir_parser_parse_constant (self);
                        _tmp20_ = _tmp19_;
                        _tmp21_ = vala_gir_parser_add_symbol_info (self, (ValaSymbol*) _tmp20_);
                        _tmp22_ = _tmp21_;
                        _vala_gir_parser_symbol_info_unref0 (_tmp22_);
                        _vala_code_node_unref0 (_tmp20_);
                  } else {
                        const gchar* _tmp23_ = NULL;
                        _tmp23_ = vala_markup_reader_get_name (self->priv->reader);
                        if (g_strcmp0 (_tmp23_, "field") == 0) {
                              gboolean _tmp24_ = FALSE;
                              if (first_field) {
                                    _tmp24_ = parent != NULL;
                              } else {
                                    _tmp24_ = FALSE;
                              }
                              if (_tmp24_) {
                                    vala_gir_parser_skip_element (self);
                              } else {
                                    ValaField* _tmp25_ = NULL;
                                    ValaField* _tmp26_;
                                    ValaGirParserSymbolInfo* _tmp27_ = NULL;
                                    ValaGirParserSymbolInfo* _tmp28_;
                                    _tmp25_ = vala_gir_parser_parse_field (self);
                                    _tmp26_ = _tmp25_;
                                    _tmp27_ = vala_gir_parser_add_symbol_info (self, (ValaSymbol*) _tmp26_);
                                    _tmp28_ = _tmp27_;
                                    _vala_gir_parser_symbol_info_unref0 (_tmp28_);
                                    _vala_code_node_unref0 (_tmp26_);
                              }
                              first_field = FALSE;
                        } else {
                              const gchar* _tmp29_ = NULL;
                              _tmp29_ = vala_markup_reader_get_name (self->priv->reader);
                              if (g_strcmp0 (_tmp29_, "property") == 0) {
                                    ValaProperty* _tmp30_ = NULL;
                                    ValaProperty* _tmp31_;
                                    ValaGirParserSymbolInfo* _tmp32_ = NULL;
                                    ValaGirParserSymbolInfo* _tmp33_;
                                    _tmp30_ = vala_gir_parser_parse_property (self);
                                    _tmp31_ = _tmp30_;
                                    _tmp32_ = vala_gir_parser_add_symbol_info (self, (ValaSymbol*) _tmp31_);
                                    _tmp33_ = _tmp32_;
                                    _vala_gir_parser_symbol_info_unref0 (_tmp33_);
                                    _vala_code_node_unref0 (_tmp31_);
                              } else {
                                    const gchar* _tmp34_ = NULL;
                                    _tmp34_ = vala_markup_reader_get_name (self->priv->reader);
                                    if (g_strcmp0 (_tmp34_, "constructor") == 0) {
                                          ValaMethod* _tmp35_ = NULL;
                                          ValaMethod* _tmp36_;
                                          ValaGirParserSymbolInfo* _tmp37_ = NULL;
                                          ValaGirParserSymbolInfo* _tmp38_;
                                          _tmp35_ = vala_gir_parser_parse_constructor (self, cname);
                                          _tmp36_ = _tmp35_;
                                          _tmp37_ = vala_gir_parser_add_symbol_info (self, (ValaSymbol*) _tmp36_);
                                          _tmp38_ = _tmp37_;
                                          _vala_gir_parser_symbol_info_unref0 (_tmp38_);
                                          _vala_code_node_unref0 (_tmp36_);
                                    } else {
                                          const gchar* _tmp39_ = NULL;
                                          _tmp39_ = vala_markup_reader_get_name (self->priv->reader);
                                          if (g_strcmp0 (_tmp39_, "function") == 0) {
                                                ValaMethod* _tmp40_ = NULL;
                                                ValaMethod* _tmp41_;
                                                ValaGirParserSymbolInfo* _tmp42_ = NULL;
                                                ValaGirParserSymbolInfo* _tmp43_;
                                                _tmp40_ = vala_gir_parser_parse_method (self, "function");
                                                _tmp41_ = _tmp40_;
                                                _tmp42_ = vala_gir_parser_add_symbol_info (self, (ValaSymbol*) _tmp41_);
                                                _tmp43_ = _tmp42_;
                                                _vala_gir_parser_symbol_info_unref0 (_tmp43_);
                                                _vala_code_node_unref0 (_tmp41_);
                                          } else {
                                                const gchar* _tmp44_ = NULL;
                                                _tmp44_ = vala_markup_reader_get_name (self->priv->reader);
                                                if (g_strcmp0 (_tmp44_, "method") == 0) {
                                                      ValaMethod* _tmp45_ = NULL;
                                                      ValaMethod* _tmp46_;
                                                      ValaGirParserSymbolInfo* _tmp47_ = NULL;
                                                      ValaGirParserSymbolInfo* _tmp48_;
                                                      _tmp45_ = vala_gir_parser_parse_method (self, "method");
                                                      _tmp46_ = _tmp45_;
                                                      _tmp47_ = vala_gir_parser_add_symbol_info (self, (ValaSymbol*) _tmp46_);
                                                      _tmp48_ = _tmp47_;
                                                      _vala_gir_parser_symbol_info_unref0 (_tmp48_);
                                                      _vala_code_node_unref0 (_tmp46_);
                                                } else {
                                                      const gchar* _tmp49_ = NULL;
                                                      _tmp49_ = vala_markup_reader_get_name (self->priv->reader);
                                                      if (g_strcmp0 (_tmp49_, "virtual-method") == 0) {
                                                            ValaMethod* _tmp50_ = NULL;
                                                            ValaMethod* _tmp51_;
                                                            ValaGirParserSymbolInfo* _tmp52_ = NULL;
                                                            ValaGirParserSymbolInfo* _tmp53_;
                                                            _tmp50_ = vala_gir_parser_parse_method (self, "virtual-method");
                                                            _tmp51_ = _tmp50_;
                                                            _tmp52_ = vala_gir_parser_add_symbol_info (self, (ValaSymbol*) _tmp51_);
                                                            _tmp53_ = _tmp52_;
                                                            _vala_gir_parser_symbol_info_unref0 (_tmp53_);
                                                            _vala_code_node_unref0 (_tmp51_);
                                                      } else {
                                                            const gchar* _tmp54_ = NULL;
                                                            _tmp54_ = vala_markup_reader_get_name (self->priv->reader);
                                                            if (g_strcmp0 (_tmp54_, "union") == 0) {
                                                                  ValaStruct* _tmp55_ = NULL;
                                                                  ValaStruct* s;
                                                                  ValaList* _tmp56_ = NULL;
                                                                  ValaList* s_fields;
                                                                  _tmp55_ = vala_gir_parser_parse_union (self);
                                                                  s = _tmp55_;
                                                                  _tmp56_ = vala_struct_get_fields (s);
                                                                  s_fields = _tmp56_;
                                                                  {
                                                                        ValaList* _tmp57_;
                                                                        ValaList* _f_list;
                                                                        gint _tmp58_;
                                                                        gint _f_size;
                                                                        gint _f_index;
                                                                        _tmp57_ = _vala_iterable_ref0 (s_fields);
                                                                        _f_list = _tmp57_;
                                                                        _tmp58_ = vala_collection_get_size ((ValaCollection*) _f_list);
                                                                        _f_size = _tmp58_;
                                                                        _f_index = -1;
                                                                        while (TRUE) {
                                                                              gpointer _tmp59_ = NULL;
                                                                              ValaField* f;
                                                                              gchar* _tmp60_ = NULL;
                                                                              gchar* _tmp61_;
                                                                              gchar* _tmp62_;
                                                                              gchar* _tmp63_;
                                                                              gchar* _tmp64_ = NULL;
                                                                              gchar* _tmp65_;
                                                                              gchar* _tmp66_;
                                                                              gchar* _tmp67_;
                                                                              const gchar* _tmp68_ = NULL;
                                                                              gchar* _tmp69_;
                                                                              gchar* _tmp70_;
                                                                              const gchar* _tmp71_ = NULL;
                                                                              gchar* _tmp72_;
                                                                              gchar* _tmp73_;
                                                                              ValaGirParserSymbolInfo* _tmp74_ = NULL;
                                                                              ValaGirParserSymbolInfo* _tmp75_;
                                                                              _f_index = _f_index + 1;
                                                                              if (!(_f_index < _f_size)) {
                                                                                    break;
                                                                              }
                                                                              _tmp59_ = vala_list_get (_f_list, _f_index);
                                                                              f = (ValaField*) _tmp59_;
                                                                              _tmp60_ = vala_typesymbol_get_cname ((ValaTypeSymbol*) s, FALSE);
                                                                              _tmp61_ = _tmp60_;
                                                                              _tmp62_ = g_strconcat (_tmp61_, ".", NULL);
                                                                              _tmp63_ = _tmp62_;
                                                                              _tmp64_ = vala_field_get_cname (f);
                                                                              _tmp65_ = _tmp64_;
                                                                              _tmp66_ = g_strconcat (_tmp63_, _tmp65_, NULL);
                                                                              _tmp67_ = _tmp66_;
                                                                              vala_field_set_cname (f, _tmp67_);
                                                                              _g_free0 (_tmp67_);
                                                                              _g_free0 (_tmp65_);
                                                                              _g_free0 (_tmp63_);
                                                                              _g_free0 (_tmp61_);
                                                                              _tmp68_ = vala_symbol_get_name ((ValaSymbol*) s);
                                                                              _tmp69_ = g_strconcat (_tmp68_, "_", NULL);
                                                                              _tmp70_ = _tmp69_;
                                                                              _tmp71_ = vala_symbol_get_name ((ValaSymbol*) f);
                                                                              _tmp72_ = g_strconcat (_tmp70_, _tmp71_, NULL);
                                                                              _tmp73_ = _tmp72_;
                                                                              vala_symbol_set_name ((ValaSymbol*) f, _tmp73_);
                                                                              _g_free0 (_tmp73_);
                                                                              _g_free0 (_tmp70_);
                                                                              _tmp74_ = vala_gir_parser_add_symbol_info (self, (ValaSymbol*) f);
                                                                              _tmp75_ = _tmp74_;
                                                                              _vala_gir_parser_symbol_info_unref0 (_tmp75_);
                                                                              _vala_code_node_unref0 (f);
                                                                        }
                                                                        _vala_iterable_unref0 (_f_list);
                                                                  }
                                                                  _vala_iterable_unref0 (s_fields);
                                                                  _vala_code_node_unref0 (s);
                                                            } else {
                                                                  const gchar* _tmp76_ = NULL;
                                                                  _tmp76_ = vala_markup_reader_get_name (self->priv->reader);
                                                                  if (g_strcmp0 (_tmp76_, "glib:signal") == 0) {
                                                                        ValaSignal* _tmp77_ = NULL;
                                                                        ValaSignal* _tmp78_;
                                                                        ValaGirParserSymbolInfo* _tmp79_ = NULL;
                                                                        ValaGirParserSymbolInfo* _tmp80_;
                                                                        _tmp77_ = vala_gir_parser_parse_signal (self);
                                                                        _tmp78_ = _tmp77_;
                                                                        _tmp79_ = vala_gir_parser_add_symbol_info (self, (ValaSymbol*) _tmp78_);
                                                                        _tmp80_ = _tmp79_;
                                                                        _vala_gir_parser_symbol_info_unref0 (_tmp80_);
                                                                        _vala_code_node_unref0 (_tmp78_);
                                                                  } else {
                                                                        ValaSourceReference* _tmp81_ = NULL;
                                                                        ValaSourceReference* _tmp82_;
                                                                        const gchar* _tmp83_ = NULL;
                                                                        gchar* _tmp84_ = NULL;
                                                                        gchar* _tmp85_;
                                                                        _tmp81_ = vala_gir_parser_get_current_src (self);
                                                                        _tmp82_ = _tmp81_;
                                                                        _tmp83_ = vala_markup_reader_get_name (self->priv->reader);
                                                                        _tmp84_ = g_strdup_printf ("unknown child element `%s' in `class'", _tmp83_);
                                                                        _tmp85_ = _tmp84_;
                                                                        vala_report_error (_tmp82_, _tmp85_);
                                                                        _g_free0 (_tmp85_);
                                                                        _vala_source_reference_unref0 (_tmp82_);
                                                                        vala_gir_parser_skip_element (self);
                                                                  }
                                                            }
                                                      }
                                                }
                                          }
                                    }
                              }
                        }
                  }
            }
            vala_gir_parser_pop_metadata (self);
      }
      vala_gir_parser_merge_add_process (self, (ValaSymbol*) cl);
      _tmp86_ = _vala_map_ref0 (old_symbols_info);
      _vala_map_unref0 (self->priv->current_symbols_info);
      self->priv->current_symbols_info = _tmp86_;
      vala_gir_parser_handle_async_methods (self, (ValaObjectTypeSymbol*) cl);
      vala_gir_parser_end_element (self, "class");
      result = cl;
      _vala_map_unref0 (old_symbols_info);
      _g_free0 (parent);
      _g_free0 (cname);
      return result;
}


static ValaInterface* vala_gir_parser_parse_interface (ValaGirParser* self) {
      ValaInterface* result = NULL;
      gchar* _tmp0_ = NULL;
      gchar* _tmp1_;
      ValaSourceReference* _tmp2_ = NULL;
      ValaSourceReference* _tmp3_;
      ValaInterface* _tmp4_ = NULL;
      ValaInterface* _tmp5_;
      ValaInterface* iface;
      gchar* _tmp6_ = NULL;
      gchar* cname;
      ValaHashMap* _tmp7_;
      ValaHashMap* old_symbols_info;
      ValaHashMap* _tmp8_ = NULL;
      ValaHashMap* _tmp50_;
      g_return_val_if_fail (self != NULL, NULL);
      vala_gir_parser_start_element (self, "interface");
      _tmp0_ = vala_gir_parser_element_get_name (self, "name", VALA_GIR_PARSER_ARGUMENT_TYPE_NAME);
      _tmp1_ = _tmp0_;
      _tmp2_ = vala_gir_parser_get_current_src (self);
      _tmp3_ = _tmp2_;
      _tmp4_ = vala_interface_new (_tmp1_, _tmp3_, NULL);
      _tmp5_ = _tmp4_;
      _vala_source_reference_unref0 (_tmp3_);
      _g_free0 (_tmp1_);
      iface = _tmp5_;
      vala_symbol_set_access ((ValaSymbol*) iface, VALA_SYMBOL_ACCESSIBILITY_PUBLIC);
      vala_symbol_set_external ((ValaSymbol*) iface, TRUE);
      _tmp6_ = vala_markup_reader_get_attribute (self->priv->reader, "c:type");
      cname = _tmp6_;
      if (cname != NULL) {
            vala_interface_set_cname (iface, cname);
      }
      vala_gir_parser_next (self);
      _tmp7_ = _vala_map_ref0 (self->priv->current_symbols_info);
      old_symbols_info = _tmp7_;
      _tmp8_ = vala_hash_map_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, VALA_TYPE_ARRAY_LIST, (GBoxedCopyFunc) vala_iterable_ref, vala_iterable_unref, g_str_hash, g_str_equal, g_direct_equal);
      _vala_map_unref0 (self->priv->current_symbols_info);
      self->priv->current_symbols_info = _tmp8_;
      while (TRUE) {
            gboolean _tmp9_;
            const gchar* _tmp10_ = NULL;
            if (!(self->priv->current_token == VALA_MARKUP_TOKEN_TYPE_START_ELEMENT)) {
                  break;
            }
            _tmp9_ = vala_gir_parser_push_metadata (self);
            if (!_tmp9_) {
                  vala_gir_parser_skip_element (self);
                  continue;
            }
            _tmp10_ = vala_markup_reader_get_name (self->priv->reader);
            if (g_strcmp0 (_tmp10_, "prerequisite") == 0) {
                  gchar* _tmp11_ = NULL;
                  gchar* _tmp12_;
                  ValaDataType* _tmp13_ = NULL;
                  ValaDataType* _tmp14_;
                  vala_gir_parser_start_element (self, "prerequisite");
                  _tmp11_ = vala_markup_reader_get_attribute (self->priv->reader, "name");
                  _tmp12_ = _tmp11_;
                  _tmp13_ = vala_gir_parser_parse_type_from_gir_name (self, _tmp12_, NULL, NULL);
                  _tmp14_ = _tmp13_;
                  vala_interface_add_prerequisite (iface, _tmp14_);
                  _vala_code_node_unref0 (_tmp14_);
                  _g_free0 (_tmp12_);
                  vala_gir_parser_next (self);
                  vala_gir_parser_end_element (self, "prerequisite");
            } else {
                  const gchar* _tmp15_ = NULL;
                  _tmp15_ = vala_markup_reader_get_name (self->priv->reader);
                  if (g_strcmp0 (_tmp15_, "field") == 0) {
                        ValaField* _tmp16_ = NULL;
                        ValaField* _tmp17_;
                        ValaGirParserSymbolInfo* _tmp18_ = NULL;
                        ValaGirParserSymbolInfo* _tmp19_;
                        _tmp16_ = vala_gir_parser_parse_field (self);
                        _tmp17_ = _tmp16_;
                        _tmp18_ = vala_gir_parser_add_symbol_info (self, (ValaSymbol*) _tmp17_);
                        _tmp19_ = _tmp18_;
                        _vala_gir_parser_symbol_info_unref0 (_tmp19_);
                        _vala_code_node_unref0 (_tmp17_);
                  } else {
                        const gchar* _tmp20_ = NULL;
                        _tmp20_ = vala_markup_reader_get_name (self->priv->reader);
                        if (g_strcmp0 (_tmp20_, "property") == 0) {
                              ValaProperty* _tmp21_ = NULL;
                              ValaProperty* _tmp22_;
                              ValaGirParserSymbolInfo* _tmp23_ = NULL;
                              ValaGirParserSymbolInfo* _tmp24_;
                              _tmp21_ = vala_gir_parser_parse_property (self);
                              _tmp22_ = _tmp21_;
                              _tmp23_ = vala_gir_parser_add_symbol_info (self, (ValaSymbol*) _tmp22_);
                              _tmp24_ = _tmp23_;
                              _vala_gir_parser_symbol_info_unref0 (_tmp24_);
                              _vala_code_node_unref0 (_tmp22_);
                        } else {
                              const gchar* _tmp25_ = NULL;
                              _tmp25_ = vala_markup_reader_get_name (self->priv->reader);
                              if (g_strcmp0 (_tmp25_, "virtual-method") == 0) {
                                    ValaMethod* _tmp26_ = NULL;
                                    ValaMethod* _tmp27_;
                                    ValaGirParserSymbolInfo* _tmp28_ = NULL;
                                    ValaGirParserSymbolInfo* _tmp29_;
                                    _tmp26_ = vala_gir_parser_parse_method (self, "virtual-method");
                                    _tmp27_ = _tmp26_;
                                    _tmp28_ = vala_gir_parser_add_symbol_info (self, (ValaSymbol*) _tmp27_);
                                    _tmp29_ = _tmp28_;
                                    _vala_gir_parser_symbol_info_unref0 (_tmp29_);
                                    _vala_code_node_unref0 (_tmp27_);
                              } else {
                                    const gchar* _tmp30_ = NULL;
                                    _tmp30_ = vala_markup_reader_get_name (self->priv->reader);
                                    if (g_strcmp0 (_tmp30_, "function") == 0) {
                                          ValaMethod* _tmp31_ = NULL;
                                          ValaMethod* _tmp32_;
                                          ValaGirParserSymbolInfo* _tmp33_ = NULL;
                                          ValaGirParserSymbolInfo* _tmp34_;
                                          _tmp31_ = vala_gir_parser_parse_method (self, "function");
                                          _tmp32_ = _tmp31_;
                                          _tmp33_ = vala_gir_parser_add_symbol_info (self, (ValaSymbol*) _tmp32_);
                                          _tmp34_ = _tmp33_;
                                          _vala_gir_parser_symbol_info_unref0 (_tmp34_);
                                          _vala_code_node_unref0 (_tmp32_);
                                    } else {
                                          const gchar* _tmp35_ = NULL;
                                          _tmp35_ = vala_markup_reader_get_name (self->priv->reader);
                                          if (g_strcmp0 (_tmp35_, "method") == 0) {
                                                ValaMethod* _tmp36_ = NULL;
                                                ValaMethod* _tmp37_;
                                                ValaGirParserSymbolInfo* _tmp38_ = NULL;
                                                ValaGirParserSymbolInfo* _tmp39_;
                                                _tmp36_ = vala_gir_parser_parse_method (self, "method");
                                                _tmp37_ = _tmp36_;
                                                _tmp38_ = vala_gir_parser_add_symbol_info (self, (ValaSymbol*) _tmp37_);
                                                _tmp39_ = _tmp38_;
                                                _vala_gir_parser_symbol_info_unref0 (_tmp39_);
                                                _vala_code_node_unref0 (_tmp37_);
                                          } else {
                                                const gchar* _tmp40_ = NULL;
                                                _tmp40_ = vala_markup_reader_get_name (self->priv->reader);
                                                if (g_strcmp0 (_tmp40_, "glib:signal") == 0) {
                                                      ValaSignal* _tmp41_ = NULL;
                                                      ValaSignal* _tmp42_;
                                                      ValaGirParserSymbolInfo* _tmp43_ = NULL;
                                                      ValaGirParserSymbolInfo* _tmp44_;
                                                      _tmp41_ = vala_gir_parser_parse_signal (self);
                                                      _tmp42_ = _tmp41_;
                                                      _tmp43_ = vala_gir_parser_add_symbol_info (self, (ValaSymbol*) _tmp42_);
                                                      _tmp44_ = _tmp43_;
                                                      _vala_gir_parser_symbol_info_unref0 (_tmp44_);
                                                      _vala_code_node_unref0 (_tmp42_);
                                                } else {
                                                      ValaSourceReference* _tmp45_ = NULL;
                                                      ValaSourceReference* _tmp46_;
                                                      const gchar* _tmp47_ = NULL;
                                                      gchar* _tmp48_ = NULL;
                                                      gchar* _tmp49_;
                                                      _tmp45_ = vala_gir_parser_get_current_src (self);
                                                      _tmp46_ = _tmp45_;
                                                      _tmp47_ = vala_markup_reader_get_name (self->priv->reader);
                                                      _tmp48_ = g_strdup_printf ("unknown child element `%s' in `interface'", _tmp47_);
                                                      _tmp49_ = _tmp48_;
                                                      vala_report_error (_tmp46_, _tmp49_);
                                                      _g_free0 (_tmp49_);
                                                      _vala_source_reference_unref0 (_tmp46_);
                                                      vala_gir_parser_skip_element (self);
                                                }
                                          }
                                    }
                              }
                        }
                  }
            }
            vala_gir_parser_pop_metadata (self);
      }
      vala_gir_parser_merge_add_process (self, (ValaSymbol*) iface);
      _tmp50_ = _vala_map_ref0 (old_symbols_info);
      _vala_map_unref0 (self->priv->current_symbols_info);
      self->priv->current_symbols_info = _tmp50_;
      vala_gir_parser_handle_async_methods (self, (ValaObjectTypeSymbol*) iface);
      vala_gir_parser_end_element (self, "interface");
      result = iface;
      _vala_map_unref0 (old_symbols_info);
      _g_free0 (cname);
      return result;
}


static void vala_gir_parser_handle_async_methods (ValaGirParser* self, ValaObjectTypeSymbol* type_symbol) {
      ValaList* _tmp0_ = NULL;
      ValaList* methods;
      g_return_if_fail (self != NULL);
      g_return_if_fail (type_symbol != NULL);
      _tmp0_ = vala_object_type_symbol_get_methods (type_symbol);
      methods = _tmp0_;
      {
            gint method_n;
            method_n = 0;
            {
                  gboolean _tmp1_;
                  _tmp1_ = TRUE;
                  while (TRUE) {
                        gint _tmp2_;
                        gpointer _tmp3_ = NULL;
                        ValaMethod* m;
                        gboolean _tmp4_;
                        if (!_tmp1_) {
                              method_n++;
                        }
                        _tmp1_ = FALSE;
                        _tmp2_ = vala_collection_get_size ((ValaCollection*) methods);
                        if (!(method_n < _tmp2_)) {
                              break;
                        }
                        _tmp3_ = vala_list_get (methods, method_n);
                        m = (ValaMethod*) _tmp3_;
                        _tmp4_ = vala_method_get_coroutine (m);
                        if (_tmp4_) {
                              gchar* finish_method_base = NULL;
                              const gchar* _tmp5_ = NULL;
                              gboolean _tmp6_;
                              ValaScope* _tmp14_ = NULL;
                              gchar* _tmp15_;
                              gchar* _tmp16_;
                              ValaSymbol* _tmp17_ = NULL;
                              ValaSymbol* _tmp18_;
                              ValaMethod* _tmp19_;
                              ValaMethod* finish_method;
                              _tmp5_ = vala_symbol_get_name ((ValaSymbol*) m);
                              _tmp6_ = g_str_has_suffix (_tmp5_, "_async");
                              if (_tmp6_) {
                                    const gchar* _tmp7_ = NULL;
                                    const gchar* _tmp8_ = NULL;
                                    gint _tmp9_;
                                    gint _tmp10_;
                                    gchar* _tmp11_ = NULL;
                                    _tmp7_ = vala_symbol_get_name ((ValaSymbol*) m);
                                    _tmp8_ = vala_symbol_get_name ((ValaSymbol*) m);
                                    _tmp9_ = strlen (_tmp8_);
                                    _tmp10_ = strlen ("_async");
                                    _tmp11_ = string_substring (_tmp7_, (glong) 0, (glong) (_tmp9_ - _tmp10_));
                                    _g_free0 (finish_method_base);
                                    finish_method_base = _tmp11_;
                              } else {
                                    const gchar* _tmp12_ = NULL;
                                    gchar* _tmp13_;
                                    _tmp12_ = vala_symbol_get_name ((ValaSymbol*) m);
                                    _tmp13_ = g_strdup (_tmp12_);
                                    _g_free0 (finish_method_base);
                                    finish_method_base = _tmp13_;
                              }
                              _tmp14_ = vala_symbol_get_scope ((ValaSymbol*) type_symbol);
                              _tmp15_ = g_strconcat (finish_method_base, "_finish", NULL);
                              _tmp16_ = _tmp15_;
                              _tmp17_ = vala_scope_lookup (_tmp14_, _tmp16_);
                              _tmp18_ = _tmp17_;
                              _tmp19_ = VALA_IS_METHOD (_tmp18_) ? ((ValaMethod*) _tmp18_) : NULL;
                              _g_free0 (_tmp16_);
                              finish_method = _tmp19_;
                              if (finish_method == NULL) {
                                    gchar* _tmp20_ = NULL;
                                    gchar* method_cname;
                                    _tmp20_ = vala_method_get_finish_cname (m);
                                    method_cname = _tmp20_;
                                    {
                                          ValaList* _tmp21_ = NULL;
                                          ValaList* _method_list;
                                          gint _tmp22_;
                                          gint _method_size;
                                          gint _method_index;
                                          _tmp21_ = vala_object_type_symbol_get_methods (type_symbol);
                                          _method_list = _tmp21_;
                                          _tmp22_ = vala_collection_get_size ((ValaCollection*) _method_list);
                                          _method_size = _tmp22_;
                                          _method_index = -1;
                                          while (TRUE) {
                                                gpointer _tmp23_ = NULL;
                                                ValaMethod* method;
                                                gchar* _tmp24_ = NULL;
                                                gchar* _tmp25_;
                                                gboolean _tmp26_;
                                                _method_index = _method_index + 1;
                                                if (!(_method_index < _method_size)) {
                                                      break;
                                                }
                                                _tmp23_ = vala_list_get (_method_list, _method_index);
                                                method = (ValaMethod*) _tmp23_;
                                                _tmp24_ = vala_method_get_cname (method);
                                                _tmp25_ = _tmp24_;
                                                _tmp26_ = g_strcmp0 (_tmp25_, method_cname) == 0;
                                                _g_free0 (_tmp25_);
                                                if (_tmp26_) {
                                                      ValaMethod* _tmp27_;
                                                      _tmp27_ = _vala_code_node_ref0 (method);
                                                      _vala_code_node_unref0 (finish_method);
                                                      finish_method = _tmp27_;
                                                      _vala_code_node_unref0 (method);
                                                      break;
                                                }
                                                _vala_code_node_unref0 (method);
                                          }
                                          _vala_iterable_unref0 (_method_list);
                                    }
                                    _g_free0 (method_cname);
                              }
                              if (finish_method != NULL) {
                                    ValaDataType* _tmp28_ = NULL;
                                    ValaDataType* _tmp29_ = NULL;
                                    ValaDataType* _tmp30_;
                                    gboolean _tmp31_;
                                    gboolean _tmp32_;
                                    gint _tmp51_;
                                    ValaScope* _tmp52_ = NULL;
                                    const gchar* _tmp53_ = NULL;
                                    _tmp28_ = vala_method_get_return_type (finish_method);
                                    _tmp29_ = vala_data_type_copy (_tmp28_);
                                    _tmp30_ = _tmp29_;
                                    vala_method_set_return_type (m, _tmp30_);
                                    _vala_code_node_unref0 (_tmp30_);
                                    _tmp31_ = vala_method_get_no_array_length (finish_method);
                                    vala_method_set_no_array_length (m, _tmp31_);
                                    _tmp32_ = vala_method_get_array_null_terminated (finish_method);
                                    vala_method_set_array_null_terminated (m, _tmp32_);
                                    {
                                          ValaList* _tmp33_ = NULL;
                                          ValaList* _param_list;
                                          gint _tmp34_;
                                          gint _param_size;
                                          gint _param_index;
                                          _tmp33_ = vala_method_get_parameters (finish_method);
                                          _param_list = _tmp33_;
                                          _tmp34_ = vala_collection_get_size ((ValaCollection*) _param_list);
                                          _param_size = _tmp34_;
                                          _param_index = -1;
                                          while (TRUE) {
                                                gpointer _tmp35_ = NULL;
                                                ValaParameter* param;
                                                ValaParameterDirection _tmp36_;
                                                _param_index = _param_index + 1;
                                                if (!(_param_index < _param_size)) {
                                                      break;
                                                }
                                                _tmp35_ = vala_list_get (_param_list, _param_index);
                                                param = (ValaParameter*) _tmp35_;
                                                _tmp36_ = vala_parameter_get_direction (param);
                                                if (_tmp36_ == VALA_PARAMETER_DIRECTION_OUT) {
                                                      ValaParameter* _tmp37_ = NULL;
                                                      ValaParameter* async_param;
                                                      ValaScope* _tmp38_ = NULL;
                                                      const gchar* _tmp39_ = NULL;
                                                      ValaSymbol* _tmp40_ = NULL;
                                                      ValaSymbol* _tmp41_;
                                                      gboolean _tmp42_;
                                                      _tmp37_ = vala_parameter_copy (param);
                                                      async_param = _tmp37_;
                                                      _tmp38_ = vala_symbol_get_scope ((ValaSymbol*) m);
                                                      _tmp39_ = vala_symbol_get_name ((ValaSymbol*) param);
                                                      _tmp40_ = vala_scope_lookup (_tmp38_, _tmp39_);
                                                      _tmp41_ = _tmp40_;
                                                      _tmp42_ = _tmp41_ != NULL;
                                                      _vala_code_node_unref0 (_tmp41_);
                                                      if (_tmp42_) {
                                                            const gchar* _tmp43_ = NULL;
                                                            gchar* _tmp44_;
                                                            gchar* _tmp45_;
                                                            _tmp43_ = vala_symbol_get_name ((ValaSymbol*) async_param);
                                                            _tmp44_ = g_strconcat (_tmp43_, "_out", NULL);
                                                            _tmp45_ = _tmp44_;
                                                            vala_symbol_set_name ((ValaSymbol*) async_param, _tmp45_);
                                                            _g_free0 (_tmp45_);
                                                      }
                                                      vala_method_add_parameter (m, async_param);
                                                      _vala_code_node_unref0 (async_param);
                                                }
                                                _vala_code_node_unref0 (param);
                                          }
                                          _vala_iterable_unref0 (_param_list);
                                    }
                                    {
                                          ValaList* _tmp46_ = NULL;
                                          ValaList* _error_type_list;
                                          gint _tmp47_;
                                          gint _error_type_size;
                                          gint _error_type_index;
                                          _tmp46_ = vala_code_node_get_error_types ((ValaCodeNode*) finish_method);
                                          _error_type_list = _tmp46_;
                                          _tmp47_ = vala_collection_get_size ((ValaCollection*) _error_type_list);
                                          _error_type_size = _tmp47_;
                                          _error_type_index = -1;
                                          while (TRUE) {
                                                gpointer _tmp48_ = NULL;
                                                ValaDataType* error_type;
                                                ValaDataType* _tmp49_ = NULL;
                                                ValaDataType* _tmp50_;
                                                _error_type_index = _error_type_index + 1;
                                                if (!(_error_type_index < _error_type_size)) {
                                                      break;
                                                }
                                                _tmp48_ = vala_list_get (_error_type_list, _error_type_index);
                                                error_type = (ValaDataType*) _tmp48_;
                                                _tmp49_ = vala_data_type_copy (error_type);
                                                _tmp50_ = _tmp49_;
                                                vala_code_node_add_error_type ((ValaCodeNode*) m, _tmp50_);
                                                _vala_code_node_unref0 (_tmp50_);
                                                _vala_code_node_unref0 (error_type);
                                          }
                                          _vala_iterable_unref0 (_error_type_list);
                                    }
                                    _tmp51_ = vala_list_index_of (methods, finish_method);
                                    if (_tmp51_ < method_n) {
                                          method_n--;
                                    }
                                    _tmp52_ = vala_symbol_get_scope ((ValaSymbol*) type_symbol);
                                    _tmp53_ = vala_symbol_get_name ((ValaSymbol*) finish_method);
                                    vala_scope_remove (_tmp52_, _tmp53_);
                                    vala_collection_remove ((ValaCollection*) methods, finish_method);
                              }
                              _vala_code_node_unref0 (finish_method);
                              _g_free0 (finish_method_base);
                        }
                        _vala_code_node_unref0 (m);
                  }
            }
      }
      _vala_iterable_unref0 (methods);
}


static ValaField* vala_gir_parser_parse_field (ValaGirParser* self) {
      ValaField* result = NULL;
      gchar* _tmp0_ = NULL;
      gchar* name;
      gchar* _tmp1_ = NULL;
      gchar* allow_none;
      ValaDataType* _tmp2_ = NULL;
      ValaDataType* type;
      ValaDataType* _tmp3_ = NULL;
      gboolean _tmp4_ = FALSE;
      ValaSourceReference* _tmp11_ = NULL;
      ValaSourceReference* _tmp12_;
      ValaField* _tmp13_ = NULL;
      ValaField* _tmp14_;
      ValaField* field;
      g_return_val_if_fail (self != NULL, NULL);
      vala_gir_parser_start_element (self, "field");
      _tmp0_ = vala_markup_reader_get_attribute (self->priv->reader, "name");
      name = _tmp0_;
      _tmp1_ = vala_markup_reader_get_attribute (self->priv->reader, "allow-none");
      allow_none = _tmp1_;
      vala_gir_parser_next (self);
      _tmp2_ = vala_gir_parser_parse_type (self, NULL, NULL, FALSE, NULL, NULL);
      type = _tmp2_;
      _tmp3_ = vala_gir_parser_element_get_type (self, type, TRUE, NULL);
      _vala_code_node_unref0 (type);
      type = _tmp3_;
      if (VALA_IS_DELEGATE_TYPE (type)) {
            _tmp4_ = self->priv->current_gtype_struct_for != NULL;
      } else {
            _tmp4_ = FALSE;
      }
      if (_tmp4_) {
            ValaGirParserCallbackScope* _tmp5_ = NULL;
            ValaGirParserCallbackScope* callback_scope;
            ValaNamespace* _tmp6_;
            ValaUnresolvedSymbol* _tmp7_ = NULL;
            gpointer _tmp8_ = NULL;
            ValaArrayList* callbacks;
            ValaDelegate* _tmp10_ = NULL;
            _tmp5_ = vala_gir_parser_callback_scope_new ();
            callback_scope = _tmp5_;
            _tmp6_ = _vala_code_node_ref0 (self->priv->current_namespace);
            _vala_code_node_unref0 (callback_scope->parent_namespace);
            callback_scope->parent_namespace = _tmp6_;
            _tmp7_ = vala_gir_parser_parse_symbol_from_string (self, self->priv->current_gtype_struct_for, NULL);
            _vala_code_node_unref0 (callback_scope->gtype_struct_for);
            callback_scope->gtype_struct_for = _tmp7_;
            _tmp8_ = vala_map_get ((ValaMap*) self->priv->gtype_callbacks, callback_scope);
            callbacks = (ValaArrayList*) _tmp8_;
            if (callbacks == NULL) {
                  ValaArrayList* _tmp9_ = NULL;
                  _tmp9_ = vala_array_list_new (VALA_TYPE_DELEGATE, (GBoxedCopyFunc) vala_code_node_ref, vala_code_node_unref, g_direct_equal);
                  _vala_iterable_unref0 (callbacks);
                  callbacks = _tmp9_;
                  vala_map_set ((ValaMap*) self->priv->gtype_callbacks, callback_scope, callbacks);
            }
            _tmp10_ = vala_delegate_type_get_delegate_symbol (VALA_DELEGATE_TYPE (type));
            vala_collection_add ((ValaCollection*) callbacks, _tmp10_);
            _vala_iterable_unref0 (callbacks);
            _vala_gir_parser_callback_scope_unref0 (callback_scope);
      }
      _tmp11_ = vala_gir_parser_get_current_src (self);
      _tmp12_ = _tmp11_;
      _tmp13_ = vala_field_new (name, type, NULL, _tmp12_, NULL);
      _tmp14_ = _tmp13_;
      _vala_source_reference_unref0 (_tmp12_);
      field = _tmp14_;
      vala_symbol_set_access ((ValaSymbol*) field, VALA_SYMBOL_ACCESSIBILITY_PUBLIC);
      vala_variable_set_no_array_length ((ValaVariable*) field, TRUE);
      if (g_strcmp0 (allow_none, "1") == 0) {
            vala_data_type_set_nullable (type, TRUE);
      }
      vala_gir_parser_end_element (self, "field");
      result = field;
      _vala_code_node_unref0 (type);
      _g_free0 (allow_none);
      _g_free0 (name);
      return result;
}


static ValaProperty* vala_gir_parser_parse_property (ValaGirParser* self) {
      ValaProperty* result = NULL;
      gchar* _tmp0_ = NULL;
      gchar* _tmp1_;
      gchar* _tmp2_ = NULL;
      gchar* _tmp3_;
      gchar* name;
      gchar* _tmp4_ = NULL;
      gchar* readable;
      gchar* _tmp5_ = NULL;
      gchar* writable;
      gchar* _tmp6_ = NULL;
      gchar* construct_;
      gchar* _tmp7_ = NULL;
      gchar* construct_only;
      gboolean no_array_length = FALSE;
      gboolean array_null_terminated = FALSE;
      gboolean _tmp8_;
      gboolean _tmp9_;
      ValaDataType* _tmp10_ = NULL;
      ValaDataType* type;
      ValaSourceReference* _tmp11_ = NULL;
      ValaSourceReference* _tmp12_;
      ValaProperty* _tmp13_ = NULL;
      ValaProperty* _tmp14_;
      ValaProperty* prop;
      gboolean _tmp20_ = FALSE;
      g_return_val_if_fail (self != NULL, NULL);
      vala_gir_parser_start_element (self, "property");
      _tmp0_ = vala_markup_reader_get_attribute (self->priv->reader, "name");
      _tmp1_ = _tmp0_;
      _tmp2_ = string_replace (_tmp1_, "-", "_");
      _tmp3_ = _tmp2_;
      _g_free0 (_tmp1_);
      name = _tmp3_;
      _tmp4_ = vala_markup_reader_get_attribute (self->priv->reader, "readable");
      readable = _tmp4_;
      _tmp5_ = vala_markup_reader_get_attribute (self->priv->reader, "writable");
      writable = _tmp5_;
      _tmp6_ = vala_markup_reader_get_attribute (self->priv->reader, "construct");
      construct_ = _tmp6_;
      _tmp7_ = vala_markup_reader_get_attribute (self->priv->reader, "construct-only");
      construct_only = _tmp7_;
      vala_gir_parser_next (self);
      _tmp10_ = vala_gir_parser_parse_type (self, NULL, NULL, FALSE, &_tmp8_, &_tmp9_);
      no_array_length = _tmp8_;
      array_null_terminated = _tmp9_;
      type = _tmp10_;
      _tmp11_ = vala_gir_parser_get_current_src (self);
      _tmp12_ = _tmp11_;
      _tmp13_ = vala_property_new (name, type, NULL, NULL, _tmp12_, NULL);
      _tmp14_ = _tmp13_;
      _vala_source_reference_unref0 (_tmp12_);
      prop = _tmp14_;
      vala_symbol_set_access ((ValaSymbol*) prop, VALA_SYMBOL_ACCESSIBILITY_PUBLIC);
      vala_symbol_set_external ((ValaSymbol*) prop, TRUE);
      vala_property_set_no_accessor_method (prop, TRUE);
      vala_property_set_no_array_length (prop, no_array_length);
      vala_property_set_array_null_terminated (prop, array_null_terminated);
      if (g_strcmp0 (readable, "0") != 0) {
            ValaDataType* _tmp15_ = NULL;
            ValaDataType* _tmp16_ = NULL;
            ValaDataType* _tmp17_;
            ValaPropertyAccessor* _tmp18_ = NULL;
            ValaPropertyAccessor* _tmp19_;
            _tmp15_ = vala_property_get_property_type (prop);
            _tmp16_ = vala_data_type_copy (_tmp15_);
            _tmp17_ = _tmp16_;
            _tmp18_ = vala_property_accessor_new (TRUE, FALSE, FALSE, _tmp17_, NULL, NULL, NULL);
            _tmp19_ = _tmp18_;
            vala_property_set_get_accessor (prop, _tmp19_);
            _vala_code_node_unref0 (_tmp19_);
            _vala_code_node_unref0 (_tmp17_);
      }
      if (g_strcmp0 (writable, "1") == 0) {
            _tmp20_ = TRUE;
      } else {
            _tmp20_ = g_strcmp0 (construct_only, "1") == 0;
      }
      if (_tmp20_) {
            gboolean _tmp21_ = FALSE;
            gboolean _tmp22_ = FALSE;
            ValaDataType* _tmp23_ = NULL;
            ValaDataType* _tmp24_ = NULL;
            ValaDataType* _tmp25_;
            ValaPropertyAccessor* _tmp26_ = NULL;
            ValaPropertyAccessor* _tmp27_;
            if (g_strcmp0 (construct_only, "1") != 0) {
                  _tmp21_ = g_strcmp0 (writable, "1") == 0;
            } else {
                  _tmp21_ = FALSE;
            }
            if (g_strcmp0 (construct_only, "1") == 0) {
                  _tmp22_ = TRUE;
            } else {
                  _tmp22_ = g_strcmp0 (construct_, "1") == 0;
            }
            _tmp23_ = vala_property_get_property_type (prop);
            _tmp24_ = vala_data_type_copy (_tmp23_);
            _tmp25_ = _tmp24_;
            _tmp26_ = vala_property_accessor_new (FALSE, _tmp21_, _tmp22_, _tmp25_, NULL, NULL, NULL);
            _tmp27_ = _tmp26_;
            vala_property_set_set_accessor (prop, _tmp27_);
            _vala_code_node_unref0 (_tmp27_);
            _vala_code_node_unref0 (_tmp25_);
      }
      vala_gir_parser_end_element (self, "property");
      result = prop;
      _vala_code_node_unref0 (type);
      _g_free0 (construct_only);
      _g_free0 (construct_);
      _g_free0 (writable);
      _g_free0 (readable);
      _g_free0 (name);
      return result;
}


static ValaDelegate* vala_gir_parser_parse_callback (ValaGirParser* self) {
      ValaDelegate* result = NULL;
      ValaSymbol* _tmp0_ = NULL;
      ValaSymbol* _tmp1_;
      g_return_val_if_fail (self != NULL, NULL);
      _tmp0_ = vala_gir_parser_parse_function (self, "callback");
      _tmp1_ = _tmp0_;
      result = VALA_IS_DELEGATE (_tmp1_) ? ((ValaDelegate*) _tmp1_) : NULL;
      return result;
}


static ValaMethod* vala_gir_parser_parse_constructor (ValaGirParser* self, const gchar* parent_ctype) {
      ValaMethod* result = NULL;
      gchar* _tmp0_ = NULL;
      gchar* name;
      gchar* _tmp1_ = NULL;
      gchar* throws_string;
      gchar* _tmp2_ = NULL;
      gchar* cname;
      gchar* ctype = NULL;
      gchar* _tmp3_ = NULL;
      ValaDataType* _tmp4_ = NULL;
      ValaDataType* _tmp5_;
      ValaSourceReference* _tmp6_ = NULL;
      ValaSourceReference* _tmp7_;
      ValaCreationMethod* _tmp8_ = NULL;
      ValaCreationMethod* _tmp9_;
      ValaCreationMethod* m;
      gboolean _tmp10_ = FALSE;
      const gchar* _tmp14_ = NULL;
      gboolean _tmp21_ = FALSE;
      g_return_val_if_fail (self != NULL, NULL);
      vala_gir_parser_start_element (self, "constructor");
      _tmp0_ = vala_gir_parser_element_get_name (self, "name", VALA_GIR_PARSER_ARGUMENT_TYPE_NAME);
      name = _tmp0_;
      _tmp1_ = vala_markup_reader_get_attribute (self->priv->reader, "throws");
      throws_string = _tmp1_;
      _tmp2_ = vala_markup_reader_get_attribute (self->priv->reader, "c:identifier");
      cname = _tmp2_;
      vala_gir_parser_next (self);
      _tmp4_ = vala_gir_parser_parse_return_value (self, &_tmp3_);
      _g_free0 (ctype);
      ctype = _tmp3_;
      _tmp5_ = _tmp4_;
      _vala_code_node_unref0 (_tmp5_);
      _tmp6_ = vala_gir_parser_get_current_src (self);
      _tmp7_ = _tmp6_;
      _tmp8_ = vala_creation_method_new (NULL, name, _tmp7_, NULL);
      _tmp9_ = _tmp8_;
      _vala_source_reference_unref0 (_tmp7_);
      m = _tmp9_;
      vala_symbol_set_access ((ValaSymbol*) m, VALA_SYMBOL_ACCESSIBILITY_PUBLIC);
      vala_method_set_has_construct_function ((ValaMethod*) m, FALSE);
      if (ctype != NULL) {
            gboolean _tmp11_ = FALSE;
            if (parent_ctype == NULL) {
                  _tmp11_ = TRUE;
            } else {
                  gchar* _tmp12_;
                  gchar* _tmp13_;
                  _tmp12_ = g_strconcat (parent_ctype, "*", NULL);
                  _tmp13_ = _tmp12_;
                  _tmp11_ = g_strcmp0 (ctype, _tmp13_) != 0;
                  _g_free0 (_tmp13_);
            }
            _tmp10_ = _tmp11_;
      } else {
            _tmp10_ = FALSE;
      }
      if (_tmp10_) {
            vala_creation_method_set_custom_return_type_cname (m, ctype);
      }
      _tmp14_ = vala_symbol_get_name ((ValaSymbol*) m);
      if (g_strcmp0 (_tmp14_, "new") == 0) {
            vala_symbol_set_name ((ValaSymbol*) m, NULL);
      } else {
            const gchar* _tmp15_ = NULL;
            gboolean _tmp16_;
            _tmp15_ = vala_symbol_get_name ((ValaSymbol*) m);
            _tmp16_ = g_str_has_prefix (_tmp15_, "new_");
            if (_tmp16_) {
                  const gchar* _tmp17_ = NULL;
                  gint _tmp18_;
                  gchar* _tmp19_ = NULL;
                  gchar* _tmp20_;
                  _tmp17_ = vala_symbol_get_name ((ValaSymbol*) m);
                  _tmp18_ = strlen ("new_");
                  _tmp19_ = string_substring (_tmp17_, (glong) _tmp18_, (glong) (-1));
                  _tmp20_ = _tmp19_;
                  vala_symbol_set_name ((ValaSymbol*) m, _tmp20_);
                  _g_free0 (_tmp20_);
            }
      }
      if (cname != NULL) {
            vala_method_set_cname ((ValaMethod*) m, cname);
      }
      if (self->priv->current_token == VALA_MARKUP_TOKEN_TYPE_START_ELEMENT) {
            const gchar* _tmp22_ = NULL;
            _tmp22_ = vala_markup_reader_get_name (self->priv->reader);
            _tmp21_ = g_strcmp0 (_tmp22_, "parameters") == 0;
      } else {
            _tmp21_ = FALSE;
      }
      if (_tmp21_) {
            vala_gir_parser_start_element (self, "parameters");
            vala_gir_parser_next (self);
            while (TRUE) {
                  gboolean _tmp23_;
                  ValaParameter* _tmp24_ = NULL;
                  ValaParameter* _tmp25_;
                  if (!(self->priv->current_token == VALA_MARKUP_TOKEN_TYPE_START_ELEMENT)) {
                        break;
                  }
                  _tmp23_ = vala_gir_parser_push_metadata (self);
                  if (!_tmp23_) {
                        vala_gir_parser_skip_element (self);
                        continue;
                  }
                  _tmp24_ = vala_gir_parser_parse_parameter (self, NULL, NULL, NULL, NULL, NULL);
                  _tmp25_ = _tmp24_;
                  vala_method_add_parameter ((ValaMethod*) m, _tmp25_);
                  _vala_code_node_unref0 (_tmp25_);
                  vala_gir_parser_pop_metadata (self);
            }
            vala_gir_parser_end_element (self, "parameters");
      }
      if (g_strcmp0 (throws_string, "1") == 0) {
            ValaErrorType* _tmp26_ = NULL;
            ValaErrorType* _tmp27_;
            _tmp26_ = vala_error_type_new (NULL, NULL, NULL);
            _tmp27_ = _tmp26_;
            vala_code_node_add_error_type ((ValaCodeNode*) m, (ValaDataType*) _tmp27_);
            _vala_code_node_unref0 (_tmp27_);
      }
      vala_gir_parser_end_element (self, "constructor");
      result = (ValaMethod*) m;
      _g_free0 (ctype);
      _g_free0 (cname);
      _g_free0 (throws_string);
      _g_free0 (name);
      return result;
}


static ValaSymbol* vala_gir_parser_parse_function (ValaGirParser* self, const gchar* element_name) {
      ValaSymbol* result = NULL;
      gchar* _tmp0_ = NULL;
      gchar* name;
      gchar* _tmp1_ = NULL;
      gchar* cname;
      gchar* _tmp2_ = NULL;
      gchar* throws_string;
      gchar* _tmp3_ = NULL;
      gchar* invoker;
      ValaDataType* return_type = NULL;
      gboolean _tmp4_ = FALSE;
      ValaDataType* _tmp8_ = NULL;
      ValaSymbol* s = NULL;
      gboolean _tmp15_ = FALSE;
      ValaArrayList* _tmp27_ = NULL;
      ValaArrayList* parameters;
      ValaArrayList* _tmp28_ = NULL;
      ValaArrayList* array_length_parameters;
      ValaArrayList* _tmp29_ = NULL;
      ValaArrayList* closure_parameters;
      ValaArrayList* _tmp30_ = NULL;
      ValaArrayList* destroy_parameters;
      gboolean _tmp31_ = FALSE;
      gint i;
      gint j;
      gint last;
      g_return_val_if_fail (self != NULL, NULL);
      g_return_val_if_fail (element_name != NULL, NULL);
      vala_gir_parser_start_element (self, element_name);
      _tmp0_ = vala_gir_parser_element_get_name (self, "name", VALA_GIR_PARSER_ARGUMENT_TYPE_NAME);
      name = _tmp0_;
      _tmp1_ = vala_markup_reader_get_attribute (self->priv->reader, "c:identifier");
      cname = _tmp1_;
      _tmp2_ = vala_markup_reader_get_attribute (self->priv->reader, "throws");
      throws_string = _tmp2_;
      _tmp3_ = vala_markup_reader_get_attribute (self->priv->reader, "invoker");
      invoker = _tmp3_;
      vala_gir_parser_next (self);
      if (self->priv->current_token == VALA_MARKUP_TOKEN_TYPE_START_ELEMENT) {
            const gchar* _tmp5_ = NULL;
            _tmp5_ = vala_markup_reader_get_name (self->priv->reader);
            _tmp4_ = g_strcmp0 (_tmp5_, "return-value") == 0;
      } else {
            _tmp4_ = FALSE;
      }
      if (_tmp4_) {
            ValaDataType* _tmp6_ = NULL;
            _tmp6_ = vala_gir_parser_parse_return_value (self, NULL);
            _vala_code_node_unref0 (return_type);
            return_type = _tmp6_;
      } else {
            ValaVoidType* _tmp7_ = NULL;
            _tmp7_ = vala_void_type_new (NULL);
            _vala_code_node_unref0 (return_type);
            return_type = (ValaDataType*) _tmp7_;
      }
      _tmp8_ = vala_gir_parser_element_get_type (self, return_type, TRUE, NULL);
      _vala_code_node_unref0 (return_type);
      return_type = _tmp8_;
      if (g_strcmp0 (element_name, "callback") == 0) {
            ValaSourceReference* _tmp9_ = NULL;
            ValaSourceReference* _tmp10_;
            ValaDelegate* _tmp11_ = NULL;
            _tmp9_ = vala_gir_parser_get_current_src (self);
            _tmp10_ = _tmp9_;
            _tmp11_ = vala_delegate_new (name, return_type, _tmp10_, NULL);
            _vala_code_node_unref0 (s);
            s = (ValaSymbol*) _tmp11_;
            _vala_source_reference_unref0 (_tmp10_);
      } else {
            ValaSourceReference* _tmp12_ = NULL;
            ValaSourceReference* _tmp13_;
            ValaMethod* _tmp14_ = NULL;
            _tmp12_ = vala_gir_parser_get_current_src (self);
            _tmp13_ = _tmp12_;
            _tmp14_ = vala_method_new (name, return_type, _tmp13_, NULL);
            _vala_code_node_unref0 (s);
            s = (ValaSymbol*) _tmp14_;
            _vala_source_reference_unref0 (_tmp13_);
      }
      vala_symbol_set_access (s, VALA_SYMBOL_ACCESSIBILITY_PUBLIC);
      if (cname != NULL) {
            if (VALA_IS_METHOD (s)) {
                  vala_method_set_cname (VALA_METHOD (s), cname);
            } else {
                  vala_delegate_set_cname (VALA_DELEGATE (s), cname);
            }
      }
      vala_symbol_set_external (s, TRUE);
      if (g_strcmp0 (element_name, "virtual-method") == 0) {
            _tmp15_ = TRUE;
      } else {
            _tmp15_ = g_strcmp0 (element_name, "callback") == 0;
      }
      if (_tmp15_) {
            if (VALA_IS_METHOD (s)) {
                  gboolean _tmp16_ = FALSE;
                  vala_method_set_is_virtual (VALA_METHOD (s), TRUE);
                  if (invoker == NULL) {
                        gboolean _tmp17_;
                        _tmp17_ = vala_gir_parser_metadata_has_argument (self->priv->metadata, VALA_GIR_PARSER_ARGUMENT_TYPE_VFUNC_NAME);
                        _tmp16_ = !_tmp17_;
                  } else {
                        _tmp16_ = FALSE;
                  }
                  if (_tmp16_) {
                        ValaSourceReference* _tmp18_ = NULL;
                        ValaAttribute* _tmp19_ = NULL;
                        _tmp18_ = vala_code_node_get_source_reference ((ValaCodeNode*) s);
                        _tmp19_ = vala_attribute_new ("NoWrapper", _tmp18_);
                        ((ValaCodeNode*) s)->attributes = g_list_append (((ValaCodeNode*) s)->attributes, _tmp19_);
                  }
            }
            if (invoker != NULL) {
                  vala_symbol_set_name (s, invoker);
            }
      } else {
            if (g_strcmp0 (element_name, "function") == 0) {
                  vala_method_set_binding (VALA_METHOD (s), VALA_MEMBER_BINDING_STATIC);
            }
      }
      if (VALA_IS_METHOD (s)) {
            ValaMethod* _tmp20_;
            ValaMethod* method;
            gboolean _tmp21_;
            gchar* _tmp25_ = NULL;
            gchar* _tmp26_;
            _tmp20_ = _vala_code_node_ref0 (VALA_METHOD (s));
            method = _tmp20_;
            _tmp21_ = vala_gir_parser_metadata_has_argument (self->priv->metadata, VALA_GIR_PARSER_ARGUMENT_TYPE_VIRTUAL);
            if (_tmp21_) {
                  gboolean _tmp22_;
                  _tmp22_ = vala_gir_parser_metadata_get_bool (self->priv->metadata, VALA_GIR_PARSER_ARGUMENT_TYPE_VIRTUAL);
                  vala_method_set_is_virtual (method, _tmp22_);
                  vala_method_set_is_abstract (method, FALSE);
            } else {
                  gboolean _tmp23_;
                  _tmp23_ = vala_gir_parser_metadata_has_argument (self->priv->metadata, VALA_GIR_PARSER_ARGUMENT_TYPE_ABSTRACT);
                  if (_tmp23_) {
                        gboolean _tmp24_;
                        _tmp24_ = vala_gir_parser_metadata_get_bool (self->priv->metadata, VALA_GIR_PARSER_ARGUMENT_TYPE_ABSTRACT);
                        vala_method_set_is_abstract (method, _tmp24_);
                        vala_method_set_is_virtual (method, FALSE);
                  }
            }
            _tmp25_ = vala_gir_parser_metadata_get_string (self->priv->metadata, VALA_GIR_PARSER_ARGUMENT_TYPE_VFUNC_NAME);
            _tmp26_ = _tmp25_;
            vala_method_set_vfunc_name (method, _tmp26_);
            _g_free0 (_tmp26_);
            _vala_code_node_unref0 (method);
      }
      _tmp27_ = vala_array_list_new (VALA_GIR_PARSER_TYPE_METHOD_INFO, (GBoxedCopyFunc) vala_gir_parser_method_info_ref, vala_gir_parser_method_info_unref, g_direct_equal);
      parameters = _tmp27_;
      _tmp28_ = vala_array_list_new (G_TYPE_INT, NULL, NULL, g_direct_equal);
      array_length_parameters = _tmp28_;
      _tmp29_ = vala_array_list_new (G_TYPE_INT, NULL, NULL, g_direct_equal);
      closure_parameters = _tmp29_;
      _tmp30_ = vala_array_list_new (G_TYPE_INT, NULL, NULL, g_direct_equal);
      destroy_parameters = _tmp30_;
      if (self->priv->current_token == VALA_MARKUP_TOKEN_TYPE_START_ELEMENT) {
            const gchar* _tmp32_ = NULL;
            _tmp32_ = vala_markup_reader_get_name (self->priv->reader);
            _tmp31_ = g_strcmp0 (_tmp32_, "parameters") == 0;
      } else {
            _tmp31_ = FALSE;
      }
      if (_tmp31_) {
            vala_gir_parser_start_element (self, "parameters");
            vala_gir_parser_next (self);
            while (TRUE) {
                  gboolean _tmp33_;
                  gint array_length_idx = 0;
                  gint closure_idx = 0;
                  gint destroy_idx = 0;
                  gchar* scope = NULL;
                  gchar* default_param_name;
                  gint _tmp34_;
                  gchar* _tmp35_ = NULL;
                  gint _tmp36_;
                  gint _tmp37_;
                  gint _tmp38_;
                  gchar* _tmp39_ = NULL;
                  ValaParameter* _tmp40_ = NULL;
                  ValaParameter* param;
                  ValaGirParserMethodInfo* _tmp41_ = NULL;
                  ValaGirParserMethodInfo* info;
                  gboolean _tmp42_ = FALSE;
                  if (!(self->priv->current_token == VALA_MARKUP_TOKEN_TYPE_START_ELEMENT)) {
                        break;
                  }
                  _tmp33_ = vala_gir_parser_push_metadata (self);
                  if (!_tmp33_) {
                        vala_gir_parser_skip_element (self);
                        continue;
                  }
                  default_param_name = NULL;
                  _tmp34_ = vala_collection_get_size ((ValaCollection*) parameters);
                  _tmp35_ = g_strdup_printf ("arg%d", _tmp34_);
                  _g_free0 (default_param_name);
                  default_param_name = _tmp35_;
                  _tmp40_ = vala_gir_parser_parse_parameter (self, &_tmp36_, &_tmp37_, &_tmp38_, &_tmp39_, default_param_name);
                  array_length_idx = _tmp36_;
                  closure_idx = _tmp37_;
                  destroy_idx = _tmp38_;
                  _g_free0 (scope);
                  scope = _tmp39_;
                  param = _tmp40_;
                  if (array_length_idx != (-1)) {
                        vala_collection_add ((ValaCollection*) array_length_parameters, GINT_TO_POINTER (array_length_idx));
                  }
                  if (closure_idx != (-1)) {
                        vala_collection_add ((ValaCollection*) closure_parameters, GINT_TO_POINTER (closure_idx));
                  }
                  if (destroy_idx != (-1)) {
                        vala_collection_add ((ValaCollection*) destroy_parameters, GINT_TO_POINTER (destroy_idx));
                  }
                  _tmp41_ = vala_gir_parser_method_info_new (param, array_length_idx, closure_idx, destroy_idx);
                  info = _tmp41_;
                  if (VALA_IS_METHOD (s)) {
                        _tmp42_ = g_strcmp0 (scope, "async") == 0;
                  } else {
                        _tmp42_ = FALSE;
                  }
                  if (_tmp42_) {
                        ValaDataType* _tmp43_ = NULL;
                        ValaDataType* _tmp44_;
                        ValaUnresolvedType* _tmp45_;
                        ValaUnresolvedType* unresolved_type;
                        gboolean _tmp46_ = FALSE;
                        _tmp43_ = vala_variable_get_variable_type ((ValaVariable*) param);
                        _tmp44_ = _tmp43_;
                        _tmp45_ = _vala_code_node_ref0 (VALA_IS_UNRESOLVED_TYPE (_tmp44_) ? ((ValaUnresolvedType*) _tmp44_) : NULL);
                        unresolved_type = _tmp45_;
                        if (unresolved_type != NULL) {
                              ValaUnresolvedSymbol* _tmp47_ = NULL;
                              const gchar* _tmp48_ = NULL;
                              _tmp47_ = vala_unresolved_type_get_unresolved_symbol (unresolved_type);
                              _tmp48_ = vala_symbol_get_name ((ValaSymbol*) _tmp47_);
                              _tmp46_ = g_strcmp0 (_tmp48_, "AsyncReadyCallback") == 0;
                        } else {
                              _tmp46_ = FALSE;
                        }
                        if (_tmp46_) {
                              vala_method_set_coroutine (VALA_METHOD (s), TRUE);
                              info->keep = FALSE;
                        }
                        _vala_code_node_unref0 (unresolved_type);
                  }
                  vala_collection_add ((ValaCollection*) parameters, info);
                  vala_gir_parser_pop_metadata (self);
                  _vala_gir_parser_method_info_unref0 (info);
                  _vala_code_node_unref0 (param);
                  _g_free0 (default_param_name);
                  _g_free0 (scope);
            }
            vala_gir_parser_end_element (self, "parameters");
      }
      i = 0;
      j = 1;
      last = -1;
      {
            ValaArrayList* _tmp49_;
            ValaArrayList* _info_list;
            gint _tmp50_;
            gint _info_size;
            gint _info_index;
            _tmp49_ = _vala_iterable_ref0 (parameters);
            _info_list = _tmp49_;
            _tmp50_ = vala_collection_get_size ((ValaCollection*) _info_list);
            _info_size = _tmp50_;
            _info_index = -1;
            while (TRUE) {
                  gpointer _tmp51_ = NULL;
                  ValaGirParserMethodInfo* info;
                  gboolean _tmp52_ = FALSE;
                  _info_index = _info_index + 1;
                  if (!(_info_index < _info_size)) {
                        break;
                  }
                  _tmp51_ = vala_list_get ((ValaList*) _info_list, _info_index);
                  info = (ValaGirParserMethodInfo*) _tmp51_;
                  if (VALA_IS_DELEGATE (s)) {
                        _tmp52_ = info->closure_idx == i;
                  } else {
                        _tmp52_ = FALSE;
                  }
                  if (_tmp52_) {
                        ValaDelegate* _tmp53_;
                        ValaDelegate* d;
                        _tmp53_ = _vala_code_node_ref0 (VALA_DELEGATE (s));
                        d = _tmp53_;
                        vala_delegate_set_has_target (d, TRUE);
                        vala_delegate_set_cinstance_parameter_position (d, ((gfloat) j) - 0.1);
                        info->keep = FALSE;
                        _vala_code_node_unref0 (d);
                  } else {
                        gboolean _tmp54_ = FALSE;
                        gboolean _tmp55_ = FALSE;
                        gboolean _tmp56_ = FALSE;
                        if (info->keep) {
                              gboolean _tmp57_;
                              _tmp57_ = vala_collection_contains ((ValaCollection*) array_length_parameters, GINT_TO_POINTER (i));
                              _tmp56_ = !_tmp57_;
                        } else {
                              _tmp56_ = FALSE;
                        }
                        if (_tmp56_) {
                              gboolean _tmp58_;
                              _tmp58_ = vala_collection_contains ((ValaCollection*) closure_parameters, GINT_TO_POINTER (i));
                              _tmp55_ = !_tmp58_;
                        } else {
                              _tmp55_ = FALSE;
                        }
                        if (_tmp55_) {
                              gboolean _tmp59_;
                              _tmp59_ = vala_collection_contains ((ValaCollection*) destroy_parameters, GINT_TO_POINTER (i));
                              _tmp54_ = !_tmp59_;
                        } else {
                              _tmp54_ = FALSE;
                        }
                        if (_tmp54_) {
                              gfloat last_idx;
                              info->vala_idx = (gfloat) j;
                              info->keep = TRUE;
                              last_idx = 0.0F;
                              if (last != (-1)) {
                                    gpointer _tmp60_ = NULL;
                                    ValaGirParserMethodInfo* _tmp61_;
                                    _tmp60_ = vala_list_get ((ValaList*) parameters, last);
                                    _tmp61_ = (ValaGirParserMethodInfo*) _tmp60_;
                                    last_idx = _tmp61_->vala_idx;
                                    _vala_gir_parser_method_info_unref0 (_tmp61_);
                              }
                              {
                                    gint k;
                                    k = last + 1;
                                    {
                                          gboolean _tmp62_;
                                          _tmp62_ = TRUE;
                                          while (TRUE) {
                                                gpointer _tmp63_ = NULL;
                                                ValaGirParserMethodInfo* _tmp64_;
                                                if (!_tmp62_) {
                                                      k++;
                                                }
                                                _tmp62_ = FALSE;
                                                if (!(k < i)) {
                                                      break;
                                                }
                                                _tmp63_ = vala_list_get ((ValaList*) parameters, k);
                                                _tmp64_ = (ValaGirParserMethodInfo*) _tmp63_;
                                                _tmp64_->vala_idx = last_idx + (((j - last_idx) / (i - last)) * (k - last));
                                                _vala_gir_parser_method_info_unref0 (_tmp64_);
                                          }
                                    }
                              }
                              last = i;
                              j++;
                        } else {
                              info->keep = FALSE;
                              info->vala_idx = (j - 1) + ((i - last) * 0.1F);
                        }
                  }
                  i++;
                  _vala_gir_parser_method_info_unref0 (info);
            }
            _vala_iterable_unref0 (_info_list);
      }
      {
            ValaArrayList* _tmp65_;
            ValaArrayList* _info_list;
            gint _tmp66_;
            gint _info_size;
            gint _info_index;
            _tmp65_ = _vala_iterable_ref0 (parameters);
            _info_list = _tmp65_;
            _tmp66_ = vala_collection_get_size ((ValaCollection*) _info_list);
            _info_size = _tmp66_;
            _info_index = -1;
            while (TRUE) {
                  gpointer _tmp67_ = NULL;
                  ValaGirParserMethodInfo* info;
                  _info_index = _info_index + 1;
                  if (!(_info_index < _info_size)) {
                        break;
                  }
                  _tmp67_ = vala_list_get ((ValaList*) _info_list, _info_index);
                  info = (ValaGirParserMethodInfo*) _tmp67_;
                  if (info->keep) {
                        gboolean _tmp76_ = FALSE;
                        ValaDataType* _tmp77_ = NULL;
                        if (VALA_IS_METHOD (s)) {
                              vala_method_add_parameter (VALA_METHOD (s), info->param);
                        } else {
                              vala_delegate_add_parameter (VALA_DELEGATE (s), info->param);
                        }
                        if (info->array_length_idx != (-1)) {
                              gint _tmp68_;
                              gpointer _tmp71_ = NULL;
                              ValaGirParserMethodInfo* _tmp72_;
                              gpointer _tmp73_ = NULL;
                              ValaGirParserMethodInfo* _tmp74_;
                              const gchar* _tmp75_ = NULL;
                              _tmp68_ = vala_collection_get_size ((ValaCollection*) parameters);
                              if (info->array_length_idx >= _tmp68_) {
                                    ValaSourceReference* _tmp69_ = NULL;
                                    ValaSourceReference* _tmp70_;
                                    _tmp69_ = vala_gir_parser_get_current_src (self);
                                    _tmp70_ = _tmp69_;
                                    vala_report_error (_tmp70_, "invalid array_length index");
                                    _vala_source_reference_unref0 (_tmp70_);
                                    _vala_gir_parser_method_info_unref0 (info);
                                    continue;
                              }
                              _tmp71_ = vala_list_get ((ValaList*) parameters, info->array_length_idx);
                              _tmp72_ = (ValaGirParserMethodInfo*) _tmp71_;
                              vala_parameter_set_carray_length_parameter_position (info->param, (gdouble) _tmp72_->vala_idx);
                              _vala_gir_parser_method_info_unref0 (_tmp72_);
                              _tmp73_ = vala_list_get ((ValaList*) parameters, info->array_length_idx);
                              _tmp74_ = (ValaGirParserMethodInfo*) _tmp73_;
                              _tmp75_ = vala_symbol_get_name ((ValaSymbol*) _tmp74_->param);
                              vala_variable_set_array_length_cname ((ValaVariable*) info->param, _tmp75_);
                              _vala_gir_parser_method_info_unref0 (_tmp74_);
                        }
                        _tmp77_ = vala_variable_get_variable_type ((ValaVariable*) info->param);
                        if (VALA_IS_ARRAY_TYPE (_tmp77_)) {
                              _tmp76_ = info->array_length_idx == (-1);
                        } else {
                              _tmp76_ = FALSE;
                        }
                        if (_tmp76_) {
                              vala_variable_set_no_array_length ((ValaVariable*) info->param, TRUE);
                        }
                        if (info->closure_idx != (-1)) {
                              gint _tmp78_;
                              gpointer _tmp81_ = NULL;
                              ValaGirParserMethodInfo* _tmp82_;
                              _tmp78_ = vala_collection_get_size ((ValaCollection*) parameters);
                              if (info->closure_idx >= _tmp78_) {
                                    ValaSourceReference* _tmp79_ = NULL;
                                    ValaSourceReference* _tmp80_;
                                    _tmp79_ = vala_gir_parser_get_current_src (self);
                                    _tmp80_ = _tmp79_;
                                    vala_report_error (_tmp80_, "invalid closure index");
                                    _vala_source_reference_unref0 (_tmp80_);
                                    _vala_gir_parser_method_info_unref0 (info);
                                    continue;
                              }
                              _tmp81_ = vala_list_get ((ValaList*) parameters, info->closure_idx);
                              _tmp82_ = (ValaGirParserMethodInfo*) _tmp81_;
                              vala_parameter_set_cdelegate_target_parameter_position (info->param, (gdouble) _tmp82_->vala_idx);
                              _vala_gir_parser_method_info_unref0 (_tmp82_);
                        }
                        if (info->destroy_idx != (-1)) {
                              gint _tmp83_;
                              gpointer _tmp86_ = NULL;
                              ValaGirParserMethodInfo* _tmp87_;
                              _tmp83_ = vala_collection_get_size ((ValaCollection*) parameters);
                              if (info->destroy_idx >= _tmp83_) {
                                    ValaSourceReference* _tmp84_ = NULL;
                                    ValaSourceReference* _tmp85_;
                                    _tmp84_ = vala_gir_parser_get_current_src (self);
                                    _tmp85_ = _tmp84_;
                                    vala_report_error (_tmp85_, "invalid destroy index");
                                    _vala_source_reference_unref0 (_tmp85_);
                                    _vala_gir_parser_method_info_unref0 (info);
                                    continue;
                              }
                              _tmp86_ = vala_list_get ((ValaList*) parameters, info->destroy_idx);
                              _tmp87_ = (ValaGirParserMethodInfo*) _tmp86_;
                              vala_parameter_set_cdestroy_notify_parameter_position (info->param, (gdouble) _tmp87_->vala_idx);
                              _vala_gir_parser_method_info_unref0 (_tmp87_);
                        }
                  }
                  _vala_gir_parser_method_info_unref0 (info);
            }
            _vala_iterable_unref0 (_info_list);
      }
      if (g_strcmp0 (throws_string, "1") == 0) {
            ValaErrorType* _tmp88_ = NULL;
            ValaErrorType* _tmp89_;
            _tmp88_ = vala_error_type_new (NULL, NULL, NULL);
            _tmp89_ = _tmp88_;
            vala_code_node_add_error_type ((ValaCodeNode*) s, (ValaDataType*) _tmp89_);
            _vala_code_node_unref0 (_tmp89_);
      }
      vala_gir_parser_end_element (self, element_name);
      result = s;
      _vala_iterable_unref0 (destroy_parameters);
      _vala_iterable_unref0 (closure_parameters);
      _vala_iterable_unref0 (array_length_parameters);
      _vala_iterable_unref0 (parameters);
      _vala_code_node_unref0 (return_type);
      _g_free0 (invoker);
      _g_free0 (throws_string);
      _g_free0 (cname);
      _g_free0 (name);
      return result;
}


static ValaMethod* vala_gir_parser_parse_method (ValaGirParser* self, const gchar* element_name) {
      ValaMethod* result = NULL;
      ValaSymbol* _tmp0_ = NULL;
      ValaSymbol* _tmp1_;
      g_return_val_if_fail (self != NULL, NULL);
      g_return_val_if_fail (element_name != NULL, NULL);
      _tmp0_ = vala_gir_parser_parse_function (self, element_name);
      _tmp1_ = _tmp0_;
      result = VALA_IS_METHOD (_tmp1_) ? ((ValaMethod*) _tmp1_) : NULL;
      return result;
}


static ValaSignal* vala_gir_parser_parse_signal (ValaGirParser* self) {
      ValaSignal* result = NULL;
      gchar* _tmp0_ = NULL;
      gchar* _tmp1_;
      gchar* _tmp2_ = NULL;
      gchar* _tmp3_;
      gchar* name;
      ValaDataType* return_type = NULL;
      gboolean _tmp4_ = FALSE;
      ValaSourceReference* _tmp8_ = NULL;
      ValaSourceReference* _tmp9_;
      ValaSignal* _tmp10_ = NULL;
      ValaSignal* _tmp11_;
      ValaSignal* sig;
      gboolean _tmp12_ = FALSE;
      g_return_val_if_fail (self != NULL, NULL);
      vala_gir_parser_start_element (self, "glib:signal");
      _tmp0_ = vala_markup_reader_get_attribute (self->priv->reader, "name");
      _tmp1_ = _tmp0_;
      _tmp2_ = string_replace (_tmp1_, "-", "_");
      _tmp3_ = _tmp2_;
      _g_free0 (_tmp1_);
      name = _tmp3_;
      vala_gir_parser_next (self);
      if (self->priv->current_token == VALA_MARKUP_TOKEN_TYPE_START_ELEMENT) {
            const gchar* _tmp5_ = NULL;
            _tmp5_ = vala_markup_reader_get_name (self->priv->reader);
            _tmp4_ = g_strcmp0 (_tmp5_, "return-value") == 0;
      } else {
            _tmp4_ = FALSE;
      }
      if (_tmp4_) {
            ValaDataType* _tmp6_ = NULL;
            _tmp6_ = vala_gir_parser_parse_return_value (self, NULL);
            _vala_code_node_unref0 (return_type);
            return_type = _tmp6_;
      } else {
            ValaVoidType* _tmp7_ = NULL;
            _tmp7_ = vala_void_type_new (NULL);
            _vala_code_node_unref0 (return_type);
            return_type = (ValaDataType*) _tmp7_;
      }
      _tmp8_ = vala_gir_parser_get_current_src (self);
      _tmp9_ = _tmp8_;
      _tmp10_ = vala_signal_new (name, return_type, _tmp9_, NULL);
      _tmp11_ = _tmp10_;
      _vala_source_reference_unref0 (_tmp9_);
      sig = _tmp11_;
      vala_symbol_set_access ((ValaSymbol*) sig, VALA_SYMBOL_ACCESSIBILITY_PUBLIC);
      vala_symbol_set_external ((ValaSymbol*) sig, TRUE);
      if (self->priv->current_token == VALA_MARKUP_TOKEN_TYPE_START_ELEMENT) {
            const gchar* _tmp13_ = NULL;
            _tmp13_ = vala_markup_reader_get_name (self->priv->reader);
            _tmp12_ = g_strcmp0 (_tmp13_, "parameters") == 0;
      } else {
            _tmp12_ = FALSE;
      }
      if (_tmp12_) {
            vala_gir_parser_start_element (self, "parameters");
            vala_gir_parser_next (self);
            while (TRUE) {
                  gboolean _tmp14_;
                  ValaParameter* _tmp15_ = NULL;
                  ValaParameter* _tmp16_;
                  if (!(self->priv->current_token == VALA_MARKUP_TOKEN_TYPE_START_ELEMENT)) {
                        break;
                  }
                  _tmp14_ = vala_gir_parser_push_metadata (self);
                  if (!_tmp14_) {
                        vala_gir_parser_skip_element (self);
                        continue;
                  }
                  _tmp15_ = vala_gir_parser_parse_parameter (self, NULL, NULL, NULL, NULL, NULL);
                  _tmp16_ = _tmp15_;
                  vala_signal_add_parameter (sig, _tmp16_);
                  _vala_code_node_unref0 (_tmp16_);
                  vala_gir_parser_pop_metadata (self);
            }
            vala_gir_parser_end_element (self, "parameters");
      }
      vala_gir_parser_end_element (self, "glib:signal");
      result = sig;
      _vala_code_node_unref0 (return_type);
      _g_free0 (name);
      return result;
}


static ValaClass* vala_gir_parser_parse_boxed (ValaGirParser* self, const gchar* element_name) {
      ValaClass* result = NULL;
      gchar* _tmp0_ = NULL;
      gchar* name;
      ValaSourceReference* _tmp2_ = NULL;
      ValaSourceReference* _tmp3_;
      ValaClass* _tmp4_ = NULL;
      ValaClass* _tmp5_;
      ValaClass* cl;
      gchar* _tmp6_ = NULL;
      gchar* cname;
      gchar* _tmp7_ = NULL;
      gchar* _tmp8_;
      gchar* _tmp9_ = NULL;
      gchar* _tmp10_;
      g_return_val_if_fail (self != NULL, NULL);
      g_return_val_if_fail (element_name != NULL, NULL);
      vala_gir_parser_start_element (self, element_name);
      _tmp0_ = vala_markup_reader_get_attribute (self->priv->reader, "name");
      name = _tmp0_;
      if (name == NULL) {
            gchar* _tmp1_ = NULL;
            _tmp1_ = vala_markup_reader_get_attribute (self->priv->reader, "glib:name");
            _g_free0 (name);
            name = _tmp1_;
      }
      _tmp2_ = vala_gir_parser_get_current_src (self);
      _tmp3_ = _tmp2_;
      _tmp4_ = vala_class_new (name, _tmp3_, NULL);
      _tmp5_ = _tmp4_;
      _vala_source_reference_unref0 (_tmp3_);
      cl = _tmp5_;
      vala_symbol_set_access ((ValaSymbol*) cl, VALA_SYMBOL_ACCESSIBILITY_PUBLIC);
      vala_symbol_set_external ((ValaSymbol*) cl, TRUE);
      vala_class_set_is_compact (cl, TRUE);
      _tmp6_ = vala_markup_reader_get_attribute (self->priv->reader, "c:type");
      cname = _tmp6_;
      if (cname != NULL) {
            vala_class_set_cname (cl, cname);
      }
      _tmp7_ = vala_markup_reader_get_attribute (self->priv->reader, "glib:get-type");
      _tmp8_ = _tmp7_;
      _tmp9_ = g_strdup_printf ("%s ()", _tmp8_);
      _tmp10_ = _tmp9_;
      vala_class_set_type_id (cl, _tmp10_);
      _g_free0 (_tmp10_);
      _g_free0 (_tmp8_);
      vala_class_set_free_function (cl, "g_boxed_free");
      vala_class_set_dup_function (cl, "g_boxed_copy");
      vala_gir_parser_next (self);
      while (TRUE) {
            gboolean _tmp11_;
            const gchar* _tmp12_ = NULL;
            if (!(self->priv->current_token == VALA_MARKUP_TOKEN_TYPE_START_ELEMENT)) {
                  break;
            }
            _tmp11_ = vala_gir_parser_push_metadata (self);
            if (!_tmp11_) {
                  vala_gir_parser_skip_element (self);
                  continue;
            }
            _tmp12_ = vala_markup_reader_get_name (self->priv->reader);
            if (g_strcmp0 (_tmp12_, "field") == 0) {
                  ValaField* _tmp13_ = NULL;
                  ValaField* _tmp14_;
                  _tmp13_ = vala_gir_parser_parse_field (self);
                  _tmp14_ = _tmp13_;
                  vala_symbol_add_field ((ValaSymbol*) cl, _tmp14_);
                  _vala_code_node_unref0 (_tmp14_);
            } else {
                  const gchar* _tmp15_ = NULL;
                  _tmp15_ = vala_markup_reader_get_name (self->priv->reader);
                  if (g_strcmp0 (_tmp15_, "constructor") == 0) {
                        ValaMethod* _tmp16_ = NULL;
                        ValaMethod* _tmp17_;
                        _tmp16_ = vala_gir_parser_parse_constructor (self, NULL);
                        _tmp17_ = _tmp16_;
                        _vala_code_node_unref0 (_tmp17_);
                  } else {
                        const gchar* _tmp18_ = NULL;
                        _tmp18_ = vala_markup_reader_get_name (self->priv->reader);
                        if (g_strcmp0 (_tmp18_, "method") == 0) {
                              ValaMethod* _tmp19_ = NULL;
                              ValaMethod* _tmp20_;
                              _tmp19_ = vala_gir_parser_parse_method (self, "method");
                              _tmp20_ = _tmp19_;
                              vala_symbol_add_method ((ValaSymbol*) cl, _tmp20_);
                              _vala_code_node_unref0 (_tmp20_);
                        } else {
                              ValaSourceReference* _tmp21_ = NULL;
                              ValaSourceReference* _tmp22_;
                              const gchar* _tmp23_ = NULL;
                              gchar* _tmp24_ = NULL;
                              gchar* _tmp25_;
                              _tmp21_ = vala_gir_parser_get_current_src (self);
                              _tmp22_ = _tmp21_;
                              _tmp23_ = vala_markup_reader_get_name (self->priv->reader);
                              _tmp24_ = g_strdup_printf ("unknown child element `%s' in `class'", _tmp23_);
                              _tmp25_ = _tmp24_;
                              vala_report_error (_tmp22_, _tmp25_);
                              _g_free0 (_tmp25_);
                              _vala_source_reference_unref0 (_tmp22_);
                              vala_gir_parser_skip_element (self);
                        }
                  }
            }
            vala_gir_parser_pop_metadata (self);
      }
      vala_gir_parser_end_element (self, element_name);
      result = cl;
      _g_free0 (cname);
      _g_free0 (name);
      return result;
}


static ValaStruct* vala_gir_parser_parse_union (ValaGirParser* self) {
      ValaStruct* result = NULL;
      gchar* _tmp0_ = NULL;
      gchar* _tmp1_;
      ValaSourceReference* _tmp2_ = NULL;
      ValaSourceReference* _tmp3_;
      ValaStruct* _tmp4_ = NULL;
      ValaStruct* _tmp5_;
      ValaStruct* st;
      g_return_val_if_fail (self != NULL, NULL);
      vala_gir_parser_start_element (self, "union");
      _tmp0_ = vala_markup_reader_get_attribute (self->priv->reader, "name");
      _tmp1_ = _tmp0_;
      _tmp2_ = vala_gir_parser_get_current_src (self);
      _tmp3_ = _tmp2_;
      _tmp4_ = vala_struct_new (_tmp1_, _tmp3_, NULL);
      _tmp5_ = _tmp4_;
      _vala_source_reference_unref0 (_tmp3_);
      _g_free0 (_tmp1_);
      st = _tmp5_;
      vala_symbol_set_access ((ValaSymbol*) st, VALA_SYMBOL_ACCESSIBILITY_PUBLIC);
      vala_symbol_set_external ((ValaSymbol*) st, TRUE);
      vala_gir_parser_next (self);
      while (TRUE) {
            gboolean _tmp6_;
            const gchar* _tmp7_ = NULL;
            if (!(self->priv->current_token == VALA_MARKUP_TOKEN_TYPE_START_ELEMENT)) {
                  break;
            }
            _tmp6_ = vala_gir_parser_push_metadata (self);
            if (!_tmp6_) {
                  vala_gir_parser_skip_element (self);
                  continue;
            }
            _tmp7_ = vala_markup_reader_get_name (self->priv->reader);
            if (g_strcmp0 (_tmp7_, "field") == 0) {
                  ValaField* _tmp8_ = NULL;
                  ValaField* _tmp9_;
                  _tmp8_ = vala_gir_parser_parse_field (self);
                  _tmp9_ = _tmp8_;
                  vala_symbol_add_field ((ValaSymbol*) st, _tmp9_);
                  _vala_code_node_unref0 (_tmp9_);
            } else {
                  const gchar* _tmp10_ = NULL;
                  _tmp10_ = vala_markup_reader_get_name (self->priv->reader);
                  if (g_strcmp0 (_tmp10_, "constructor") == 0) {
                        ValaMethod* _tmp11_ = NULL;
                        ValaMethod* _tmp12_;
                        _tmp11_ = vala_gir_parser_parse_constructor (self, NULL);
                        _tmp12_ = _tmp11_;
                        _vala_code_node_unref0 (_tmp12_);
                  } else {
                        const gchar* _tmp13_ = NULL;
                        _tmp13_ = vala_markup_reader_get_name (self->priv->reader);
                        if (g_strcmp0 (_tmp13_, "method") == 0) {
                              ValaMethod* _tmp14_ = NULL;
                              ValaMethod* _tmp15_;
                              _tmp14_ = vala_gir_parser_parse_method (self, "method");
                              _tmp15_ = _tmp14_;
                              vala_symbol_add_method ((ValaSymbol*) st, _tmp15_);
                              _vala_code_node_unref0 (_tmp15_);
                        } else {
                              const gchar* _tmp16_ = NULL;
                              _tmp16_ = vala_markup_reader_get_name (self->priv->reader);
                              if (g_strcmp0 (_tmp16_, "record") == 0) {
                                    ValaStruct* _tmp17_ = NULL;
                                    ValaStruct* s;
                                    ValaList* _tmp18_ = NULL;
                                    ValaList* fs;
                                    _tmp17_ = vala_gir_parser_parse_record (self);
                                    s = _tmp17_;
                                    _tmp18_ = vala_struct_get_fields (s);
                                    fs = _tmp18_;
                                    {
                                          ValaList* _tmp19_;
                                          ValaList* _f_list;
                                          gint _tmp20_;
                                          gint _f_size;
                                          gint _f_index;
                                          _tmp19_ = _vala_iterable_ref0 (fs);
                                          _f_list = _tmp19_;
                                          _tmp20_ = vala_collection_get_size ((ValaCollection*) _f_list);
                                          _f_size = _tmp20_;
                                          _f_index = -1;
                                          while (TRUE) {
                                                gpointer _tmp21_ = NULL;
                                                ValaField* f;
                                                gchar* _tmp22_ = NULL;
                                                gchar* _tmp23_;
                                                gchar* _tmp24_;
                                                gchar* _tmp25_;
                                                gchar* _tmp26_ = NULL;
                                                gchar* _tmp27_;
                                                gchar* _tmp28_;
                                                gchar* _tmp29_;
                                                const gchar* _tmp30_ = NULL;
                                                gchar* _tmp31_;
                                                gchar* _tmp32_;
                                                const gchar* _tmp33_ = NULL;
                                                gchar* _tmp34_;
                                                gchar* _tmp35_;
                                                _f_index = _f_index + 1;
                                                if (!(_f_index < _f_size)) {
                                                      break;
                                                }
                                                _tmp21_ = vala_list_get (_f_list, _f_index);
                                                f = (ValaField*) _tmp21_;
                                                _tmp22_ = vala_typesymbol_get_cname ((ValaTypeSymbol*) s, FALSE);
                                                _tmp23_ = _tmp22_;
                                                _tmp24_ = g_strconcat (_tmp23_, ".", NULL);
                                                _tmp25_ = _tmp24_;
                                                _tmp26_ = vala_field_get_cname (f);
                                                _tmp27_ = _tmp26_;
                                                _tmp28_ = g_strconcat (_tmp25_, _tmp27_, NULL);
                                                _tmp29_ = _tmp28_;
                                                vala_field_set_cname (f, _tmp29_);
                                                _g_free0 (_tmp29_);
                                                _g_free0 (_tmp27_);
                                                _g_free0 (_tmp25_);
                                                _g_free0 (_tmp23_);
                                                _tmp30_ = vala_symbol_get_name ((ValaSymbol*) s);
                                                _tmp31_ = g_strconcat (_tmp30_, "_", NULL);
                                                _tmp32_ = _tmp31_;
                                                _tmp33_ = vala_symbol_get_name ((ValaSymbol*) f);
                                                _tmp34_ = g_strconcat (_tmp32_, _tmp33_, NULL);
                                                _tmp35_ = _tmp34_;
                                                vala_symbol_set_name ((ValaSymbol*) f, _tmp35_);
                                                _g_free0 (_tmp35_);
                                                _g_free0 (_tmp32_);
                                                vala_symbol_add_field ((ValaSymbol*) st, f);
                                                _vala_code_node_unref0 (f);
                                          }
                                          _vala_iterable_unref0 (_f_list);
                                    }
                                    _vala_iterable_unref0 (fs);
                                    _vala_code_node_unref0 (s);
                              } else {
                                    ValaSourceReference* _tmp36_ = NULL;
                                    ValaSourceReference* _tmp37_;
                                    const gchar* _tmp38_ = NULL;
                                    gchar* _tmp39_ = NULL;
                                    gchar* _tmp40_;
                                    _tmp36_ = vala_gir_parser_get_current_src (self);
                                    _tmp37_ = _tmp36_;
                                    _tmp38_ = vala_markup_reader_get_name (self->priv->reader);
                                    _tmp39_ = g_strdup_printf ("unknown child element `%s' in `union'", _tmp38_);
                                    _tmp40_ = _tmp39_;
                                    vala_report_error (_tmp37_, _tmp40_);
                                    _g_free0 (_tmp40_);
                                    _vala_source_reference_unref0 (_tmp37_);
                                    vala_gir_parser_skip_element (self);
                              }
                        }
                  }
            }
            vala_gir_parser_pop_metadata (self);
      }
      vala_gir_parser_end_element (self, "union");
      result = st;
      return result;
}


static ValaConstant* vala_gir_parser_parse_constant (ValaGirParser* self) {
      ValaConstant* result = NULL;
      gchar* _tmp0_ = NULL;
      gchar* name;
      ValaDataType* _tmp1_ = NULL;
      ValaDataType* type;
      ValaSourceReference* _tmp2_ = NULL;
      ValaSourceReference* _tmp3_;
      ValaConstant* _tmp4_ = NULL;
      ValaConstant* _tmp5_;
      ValaConstant* c;
      g_return_val_if_fail (self != NULL, NULL);
      vala_gir_parser_start_element (self, "constant");
      _tmp0_ = vala_gir_parser_element_get_name (self, "name", VALA_GIR_PARSER_ARGUMENT_TYPE_NAME);
      name = _tmp0_;
      vala_gir_parser_next (self);
      _tmp1_ = vala_gir_parser_parse_type (self, NULL, NULL, FALSE, NULL, NULL);
      type = _tmp1_;
      _tmp2_ = vala_gir_parser_get_current_src (self);
      _tmp3_ = _tmp2_;
      _tmp4_ = vala_constant_new (name, type, NULL, _tmp3_, NULL);
      _tmp5_ = _tmp4_;
      _vala_source_reference_unref0 (_tmp3_);
      c = _tmp5_;
      vala_symbol_set_access ((ValaSymbol*) c, VALA_SYMBOL_ACCESSIBILITY_PUBLIC);
      vala_symbol_set_external ((ValaSymbol*) c, TRUE);
      vala_gir_parser_end_element (self, "constant");
      result = c;
      _vala_code_node_unref0 (type);
      _g_free0 (name);
      return result;
}


static void vala_gir_parser_report_unused_metadata (ValaGirParser* self, ValaGirParserMetadata* metadata) {
      ValaGirParserMetadata* _tmp0_ = NULL;
      gboolean _tmp1_ = FALSE;
      gint _tmp2_;
      g_return_if_fail (self != NULL);
      g_return_if_fail (metadata != NULL);
      _tmp0_ = vala_gir_parser_metadata_get_empty ();
      if (metadata == _tmp0_) {
            return;
      }
      _tmp2_ = vala_map_get_size (metadata->args);
      if (_tmp2_ == 0) {
            gint _tmp3_;
            _tmp3_ = vala_collection_get_size ((ValaCollection*) metadata->children);
            _tmp1_ = _tmp3_ == 0;
      } else {
            _tmp1_ = FALSE;
      }
      if (_tmp1_) {
            vala_report_warning (metadata->source_reference, "empty metadata");
            return;
      }
      {
            ValaSet* _tmp4_ = NULL;
            ValaSet* _tmp5_;
            ValaIterator* _tmp6_ = NULL;
            ValaIterator* _tmp7_;
            ValaIterator* _arg_type_it;
            _tmp4_ = vala_map_get_keys (metadata->args);
            _tmp5_ = _tmp4_;
            _tmp6_ = vala_iterable_iterator ((ValaIterable*) _tmp5_);
            _tmp7_ = _tmp6_;
            _vala_iterable_unref0 (_tmp5_);
            _arg_type_it = _tmp7_;
            while (TRUE) {
                  gboolean _tmp8_;
                  gpointer _tmp9_ = NULL;
                  ValaGirParserArgumentType arg_type;
                  gpointer _tmp10_ = NULL;
                  ValaGirParserArgument* arg;
                  _tmp8_ = vala_iterator_next (_arg_type_it);
                  if (!_tmp8_) {
                        break;
                  }
                  _tmp9_ = vala_iterator_get (_arg_type_it);
                  arg_type = GPOINTER_TO_INT (_tmp9_);
                  _tmp10_ = vala_map_get (metadata->args, GINT_TO_POINTER (arg_type));
                  arg = (ValaGirParserArgument*) _tmp10_;
                  if (!arg->used) {
                        vala_report_warning (arg->source_reference, "argument never used");
                  }
                  _vala_gir_parser_argument_unref0 (arg);
            }
            _vala_iterator_unref0 (_arg_type_it);
      }
      {
            ValaArrayList* _tmp11_;
            ValaArrayList* _child_list;
            gint _tmp12_;
            gint _child_size;
            gint _child_index;
            _tmp11_ = _vala_iterable_ref0 (metadata->children);
            _child_list = _tmp11_;
            _tmp12_ = vala_collection_get_size ((ValaCollection*) _child_list);
            _child_size = _tmp12_;
            _child_index = -1;
            while (TRUE) {
                  gpointer _tmp13_ = NULL;
                  ValaGirParserMetadata* child;
                  _child_index = _child_index + 1;
                  if (!(_child_index < _child_size)) {
                        break;
                  }
                  _tmp13_ = vala_list_get ((ValaList*) _child_list, _child_index);
                  child = (ValaGirParserMetadata*) _tmp13_;
                  if (!child->used) {
                        vala_report_warning (child->source_reference, "metadata never used");
                  } else {
                        vala_gir_parser_report_unused_metadata (self, child);
                  }
                  _vala_gir_parser_metadata_unref0 (child);
            }
            _vala_iterable_unref0 (_child_list);
      }
}


static void vala_gir_parser_resolve_gir_symbols (ValaGirParser* self) {
      g_return_if_fail (self != NULL);
      {
            ValaSet* _tmp0_ = NULL;
            ValaSet* _tmp1_;
            ValaIterator* _tmp2_ = NULL;
            ValaIterator* _tmp3_;
            ValaIterator* _map_from_it;
            _tmp0_ = vala_map_get_keys ((ValaMap*) self->priv->concrete_symbols_map);
            _tmp1_ = _tmp0_;
            _tmp2_ = vala_iterable_iterator ((ValaIterable*) _tmp1_);
            _tmp3_ = _tmp2_;
            _vala_iterable_unref0 (_tmp1_);
            _map_from_it = _tmp3_;
            while (TRUE) {
                  gboolean _tmp4_;
                  gpointer _tmp5_ = NULL;
                  ValaSymbol* map_from;
                  ValaUnresolvedSymbol* _tmp6_ = NULL;
                  ValaUnresolvedSymbol* _tmp7_;
                  gpointer _tmp8_ = NULL;
                  ValaSymbol* _tmp9_;
                  _tmp4_ = vala_iterator_next (_map_from_it);
                  if (!_tmp4_) {
                        break;
                  }
                  _tmp5_ = vala_iterator_get (_map_from_it);
                  map_from = (ValaSymbol*) _tmp5_;
                  _tmp6_ = vala_gir_parser_get_unresolved_symbol (self, map_from);
                  _tmp7_ = _tmp6_;
                  _tmp8_ = vala_map_get ((ValaMap*) self->priv->concrete_symbols_map, map_from);
                  _tmp9_ = (ValaSymbol*) _tmp8_;
                  vala_map_set ((ValaMap*) self->priv->unresolved_symbols_map, _tmp7_, _tmp9_);
                  _vala_code_node_unref0 (_tmp9_);
                  _vala_code_node_unref0 (_tmp7_);
                  _vala_code_node_unref0 (map_from);
            }
            _vala_iterator_unref0 (_map_from_it);
      }
      {
            ValaArrayList* _tmp10_;
            ValaArrayList* _map_from_list;
            gint _tmp11_;
            gint _map_from_size;
            gint _map_from_index;
            _tmp10_ = _vala_iterable_ref0 (self->priv->unresolved_gir_symbols);
            _map_from_list = _tmp10_;
            _tmp11_ = vala_collection_get_size ((ValaCollection*) _map_from_list);
            _map_from_size = _tmp11_;
            _map_from_index = -1;
            while (TRUE) {
                  gpointer _tmp12_ = NULL;
                  ValaUnresolvedSymbol* map_from;
                  _map_from_index = _map_from_index + 1;
                  if (!(_map_from_index < _map_from_size)) {
                        break;
                  }
                  _tmp12_ = vala_list_get ((ValaList*) _map_from_list, _map_from_index);
                  map_from = (ValaUnresolvedSymbol*) _tmp12_;
                  while (TRUE) {
                        gpointer _tmp13_ = NULL;
                        ValaSymbol* map_to;
                        ValaUnresolvedSymbol* _tmp35_ = NULL;
                        ValaUnresolvedSymbol* _tmp36_;
                        if (!(map_from != NULL)) {
                              break;
                        }
                        _tmp13_ = vala_map_get ((ValaMap*) self->priv->unresolved_symbols_map, map_from);
                        map_to = (ValaSymbol*) _tmp13_;
                        if (map_to != NULL) {
                              const gchar* _tmp14_ = NULL;
                              vala_unresolved_symbol_set_inner (map_from, NULL);
                              _tmp14_ = vala_symbol_get_name (map_to);
                              vala_symbol_set_name ((ValaSymbol*) map_from, _tmp14_);
                              if (VALA_IS_UNRESOLVED_SYMBOL (map_to)) {
                                    ValaUnresolvedSymbol* _tmp15_;
                                    ValaUnresolvedSymbol* umap_to;
                                    _tmp15_ = _vala_code_node_ref0 (VALA_UNRESOLVED_SYMBOL (map_to));
                                    umap_to = _tmp15_;
                                    while (TRUE) {
                                          ValaUnresolvedSymbol* _tmp16_ = NULL;
                                          ValaUnresolvedSymbol* _tmp17_ = NULL;
                                          ValaUnresolvedSymbol* _tmp18_;
                                          const gchar* _tmp19_ = NULL;
                                          ValaUnresolvedSymbol* _tmp20_ = NULL;
                                          ValaUnresolvedSymbol* _tmp21_;
                                          ValaUnresolvedSymbol* _tmp22_ = NULL;
                                          ValaUnresolvedSymbol* _tmp23_;
                                          _tmp16_ = vala_unresolved_symbol_get_inner (umap_to);
                                          if (!(_tmp16_ != NULL)) {
                                                break;
                                          }
                                          _tmp17_ = vala_unresolved_symbol_get_inner (umap_to);
                                          _tmp18_ = _vala_code_node_ref0 (_tmp17_);
                                          _vala_code_node_unref0 (umap_to);
                                          umap_to = _tmp18_;
                                          _tmp19_ = vala_symbol_get_name ((ValaSymbol*) umap_to);
                                          _tmp20_ = vala_unresolved_symbol_new (NULL, _tmp19_, NULL);
                                          _tmp21_ = _tmp20_;
                                          vala_unresolved_symbol_set_inner (map_from, _tmp21_);
                                          _vala_code_node_unref0 (_tmp21_);
                                          _tmp22_ = vala_unresolved_symbol_get_inner (map_from);
                                          _tmp23_ = _vala_code_node_ref0 (_tmp22_);
                                          _vala_code_node_unref0 (map_from);
                                          map_from = _tmp23_;
                                    }
                                    _vala_code_node_unref0 (umap_to);
                              } else {
                                    while (TRUE) {
                                          gboolean _tmp24_ = FALSE;
                                          ValaSymbol* _tmp25_ = NULL;
                                          ValaSymbol* _tmp28_ = NULL;
                                          ValaSymbol* _tmp29_;
                                          const gchar* _tmp30_ = NULL;
                                          ValaUnresolvedSymbol* _tmp31_ = NULL;
                                          ValaUnresolvedSymbol* _tmp32_;
                                          ValaUnresolvedSymbol* _tmp33_ = NULL;
                                          ValaUnresolvedSymbol* _tmp34_;
                                          _tmp25_ = vala_symbol_get_parent_symbol (map_to);
                                          if (_tmp25_ != NULL) {
                                                ValaSymbol* _tmp26_ = NULL;
                                                ValaNamespace* _tmp27_ = NULL;
                                                _tmp26_ = vala_symbol_get_parent_symbol (map_to);
                                                _tmp27_ = vala_code_context_get_root (self->priv->context);
                                                _tmp24_ = _tmp26_ != VALA_SYMBOL (_tmp27_);
                                          } else {
                                                _tmp24_ = FALSE;
                                          }
                                          if (!_tmp24_) {
                                                break;
                                          }
                                          _tmp28_ = vala_symbol_get_parent_symbol (map_to);
                                          _tmp29_ = _vala_code_node_ref0 (_tmp28_);
                                          _vala_code_node_unref0 (map_to);
                                          map_to = _tmp29_;
                                          _tmp30_ = vala_symbol_get_name (map_to);
                                          _tmp31_ = vala_unresolved_symbol_new (NULL, _tmp30_, NULL);
                                          _tmp32_ = _tmp31_;
                                          vala_unresolved_symbol_set_inner (map_from, _tmp32_);
                                          _vala_code_node_unref0 (_tmp32_);
                                          _tmp33_ = vala_unresolved_symbol_get_inner (map_from);
                                          _tmp34_ = _vala_code_node_ref0 (_tmp33_);
                                          _vala_code_node_unref0 (map_from);
                                          map_from = _tmp34_;
                                    }
                              }
                              _vala_code_node_unref0 (map_to);
                              break;
                        }
                        _tmp35_ = vala_unresolved_symbol_get_inner (map_from);
                        _tmp36_ = _vala_code_node_ref0 (_tmp35_);
                        _vala_code_node_unref0 (map_from);
                        map_from = _tmp36_;
                        _vala_code_node_unref0 (map_to);
                  }
                  _vala_code_node_unref0 (map_from);
            }
            _vala_iterable_unref0 (_map_from_list);
      }
}


static gpointer _vala_scope_ref0 (gpointer self) {
      return self ? vala_scope_ref (self) : NULL;
}


static ValaSymbol* vala_gir_parser_resolve_symbol (ValaGirParser* self, ValaScope* parent_scope, ValaUnresolvedSymbol* unresolved_symbol) {
      ValaSymbol* result = NULL;
      ValaUnresolvedSymbol* _tmp0_ = NULL;
      g_return_val_if_fail (self != NULL, NULL);
      g_return_val_if_fail (parent_scope != NULL, NULL);
      g_return_val_if_fail (unresolved_symbol != NULL, NULL);
      _tmp0_ = vala_unresolved_symbol_get_inner (unresolved_symbol);
      if (_tmp0_ == NULL) {
            ValaScope* _tmp1_;
            ValaScope* scope;
            _tmp1_ = _vala_scope_ref0 (parent_scope);
            scope = _tmp1_;
            while (TRUE) {
                  const gchar* _tmp2_ = NULL;
                  ValaSymbol* _tmp3_ = NULL;
                  ValaSymbol* sym;
                  ValaScope* _tmp4_ = NULL;
                  ValaScope* _tmp5_;
                  if (!(scope != NULL)) {
                        break;
                  }
                  _tmp2_ = vala_symbol_get_name ((ValaSymbol*) unresolved_symbol);
                  _tmp3_ = vala_scope_lookup (scope, _tmp2_);
                  sym = _tmp3_;
                  if (sym != NULL) {
                        result = sym;
                        _vala_scope_unref0 (scope);
                        return result;
                  }
                  _tmp4_ = vala_scope_get_parent_scope (scope);
                  _tmp5_ = _vala_scope_ref0 (_tmp4_);
                  _vala_scope_unref0 (scope);
                  scope = _tmp5_;
                  _vala_code_node_unref0 (sym);
            }
            _vala_scope_unref0 (scope);
      } else {
            ValaUnresolvedSymbol* _tmp6_ = NULL;
            ValaSymbol* _tmp7_ = NULL;
            ValaSymbol* inner;
            _tmp6_ = vala_unresolved_symbol_get_inner (unresolved_symbol);
            _tmp7_ = vala_gir_parser_resolve_symbol (self, parent_scope, _tmp6_);
            inner = _tmp7_;
            if (inner != NULL) {
                  ValaScope* _tmp8_ = NULL;
                  const gchar* _tmp9_ = NULL;
                  ValaSymbol* _tmp10_ = NULL;
                  _tmp8_ = vala_symbol_get_scope (inner);
                  _tmp9_ = vala_symbol_get_name ((ValaSymbol*) unresolved_symbol);
                  _tmp10_ = vala_scope_lookup (_tmp8_, _tmp9_);
                  result = _tmp10_;
                  _vala_code_node_unref0 (inner);
                  return result;
            }
            _vala_code_node_unref0 (inner);
      }
      result = NULL;
      return result;
}


static void vala_gir_parser_postprocess_interfaces (ValaGirParser* self) {
      g_return_if_fail (self != NULL);
      {
            ValaArrayList* _tmp0_;
            ValaArrayList* _iface_list;
            gint _tmp1_;
            gint _iface_size;
            gint _iface_index;
            _tmp0_ = _vala_iterable_ref0 (self->priv->interfaces);
            _iface_list = _tmp0_;
            _tmp1_ = vala_collection_get_size ((ValaCollection*) _iface_list);
            _iface_size = _tmp1_;
            _iface_index = -1;
            while (TRUE) {
                  gpointer _tmp2_ = NULL;
                  ValaInterface* iface;
                  gboolean has_instantiable_prereq;
                  _iface_index = _iface_index + 1;
                  if (!(_iface_index < _iface_size)) {
                        break;
                  }
                  _tmp2_ = vala_list_get ((ValaList*) _iface_list, _iface_index);
                  iface = (ValaInterface*) _tmp2_;
                  has_instantiable_prereq = FALSE;
                  {
                        ValaList* _tmp3_ = NULL;
                        ValaList* _prereq_list;
                        gint _tmp4_;
                        gint _prereq_size;
                        gint _prereq_index;
                        _tmp3_ = vala_interface_get_prerequisites (iface);
                        _prereq_list = _tmp3_;
                        _tmp4_ = vala_collection_get_size ((ValaCollection*) _prereq_list);
                        _prereq_size = _tmp4_;
                        _prereq_index = -1;
                        while (TRUE) {
                              gpointer _tmp5_ = NULL;
                              ValaDataType* prereq;
                              ValaSymbol* sym;
                              _prereq_index = _prereq_index + 1;
                              if (!(_prereq_index < _prereq_size)) {
                                    break;
                              }
                              _tmp5_ = vala_list_get (_prereq_list, _prereq_index);
                              prereq = (ValaDataType*) _tmp5_;
                              sym = NULL;
                              if (VALA_IS_UNRESOLVED_TYPE (prereq)) {
                                    ValaUnresolvedSymbol* _tmp6_ = NULL;
                                    ValaUnresolvedSymbol* _tmp7_;
                                    ValaUnresolvedSymbol* unresolved_symbol;
                                    ValaSymbol* _tmp8_ = NULL;
                                    ValaScope* _tmp9_ = NULL;
                                    ValaSymbol* _tmp10_ = NULL;
                                    _tmp6_ = vala_unresolved_type_get_unresolved_symbol (VALA_UNRESOLVED_TYPE (prereq));
                                    _tmp7_ = _vala_code_node_ref0 (_tmp6_);
                                    unresolved_symbol = _tmp7_;
                                    _tmp8_ = vala_symbol_get_parent_symbol ((ValaSymbol*) iface);
                                    _tmp9_ = vala_symbol_get_scope (_tmp8_);
                                    _tmp10_ = vala_gir_parser_resolve_symbol (self, _tmp9_, unresolved_symbol);
                                    _vala_code_node_unref0 (sym);
                                    sym = _tmp10_;
                                    _vala_code_node_unref0 (unresolved_symbol);
                              } else {
                                    ValaTypeSymbol* _tmp11_ = NULL;
                                    ValaSymbol* _tmp12_;
                                    _tmp11_ = vala_data_type_get_data_type (prereq);
                                    _tmp12_ = _vala_code_node_ref0 ((ValaSymbol*) _tmp11_);
                                    _vala_code_node_unref0 (sym);
                                    sym = _tmp12_;
                              }
                              if (VALA_IS_CLASS (sym)) {
                                    has_instantiable_prereq = TRUE;
                                    _vala_code_node_unref0 (sym);
                                    _vala_code_node_unref0 (prereq);
                                    break;
                              }
                              _vala_code_node_unref0 (sym);
                              _vala_code_node_unref0 (prereq);
                        }
                        _vala_iterable_unref0 (_prereq_list);
                  }
                  if (!has_instantiable_prereq) {
                        ValaScope* _tmp13_ = NULL;
                        ValaSymbol* _tmp14_ = NULL;
                        ValaObjectTypeSymbol* _tmp15_;
                        ValaObjectType* _tmp16_ = NULL;
                        ValaObjectType* _tmp17_;
                        _tmp13_ = vala_symbol_get_scope ((ValaSymbol*) self->priv->glib_ns);
                        _tmp14_ = vala_scope_lookup (_tmp13_, "Object");
                        _tmp15_ = VALA_OBJECT_TYPE_SYMBOL (_tmp14_);
                        _tmp16_ = vala_object_type_new (_tmp15_);
                        _tmp17_ = _tmp16_;
                        vala_interface_add_prerequisite (iface, (ValaDataType*) _tmp17_);
                        _vala_code_node_unref0 (_tmp17_);
                        _vala_code_node_unref0 (_tmp15_);
                  }
                  _vala_code_node_unref0 (iface);
            }
            _vala_iterable_unref0 (_iface_list);
      }
}


static void vala_gir_parser_postprocess_reparenting (ValaGirParser* self) {
      g_return_if_fail (self != NULL);
      {
            ValaSet* _tmp0_ = NULL;
            ValaSet* _tmp1_;
            ValaIterator* _tmp2_ = NULL;
            ValaIterator* _tmp3_;
            ValaIterator* _target_unresolved_symbol_it;
            _tmp0_ = vala_map_get_keys ((ValaMap*) self->priv->symbol_reparent_map);
            _tmp1_ = _tmp0_;
            _tmp2_ = vala_iterable_iterator ((ValaIterable*) _tmp1_);
            _tmp3_ = _tmp2_;
            _vala_iterable_unref0 (_tmp1_);
            _target_unresolved_symbol_it = _tmp3_;
            while (TRUE) {
                  gboolean _tmp4_;
                  gpointer _tmp5_ = NULL;
                  ValaUnresolvedSymbol* target_unresolved_symbol;
                  ValaNamespace* _tmp6_ = NULL;
                  ValaScope* _tmp7_ = NULL;
                  ValaSymbol* _tmp8_ = NULL;
                  ValaSymbol* target_symbol;
                  gpointer _tmp46_ = NULL;
                  ValaArrayList* symbols;
                  _tmp4_ = vala_iterator_next (_target_unresolved_symbol_it);
                  if (!_tmp4_) {
                        break;
                  }
                  _tmp5_ = vala_iterator_get (_target_unresolved_symbol_it);
                  target_unresolved_symbol = (ValaUnresolvedSymbol*) _tmp5_;
                  _tmp6_ = vala_code_context_get_root (self->priv->context);
                  _tmp7_ = vala_symbol_get_scope ((ValaSymbol*) _tmp6_);
                  _tmp8_ = vala_gir_parser_resolve_symbol (self, _tmp7_, target_unresolved_symbol);
                  target_symbol = _tmp8_;
                  if (target_symbol == NULL) {
                        ValaUnresolvedSymbol* _tmp9_;
                        ValaUnresolvedSymbol* sym;
                        const gchar* _tmp10_ = NULL;
                        ValaSourceReference* _tmp11_ = NULL;
                        ValaNamespace* _tmp12_ = NULL;
                        ValaNamespace* ns;
                        ValaNamespace* _tmp13_;
                        ValaNamespace* _result_;
                        ValaUnresolvedSymbol* _tmp14_ = NULL;
                        ValaUnresolvedSymbol* _tmp15_;
                        gboolean _tmp33_ = FALSE;
                        gboolean _tmp34_ = FALSE;
                        ValaSymbol* _tmp41_;
                        _tmp9_ = _vala_code_node_ref0 (target_unresolved_symbol);
                        sym = _tmp9_;
                        _tmp10_ = vala_symbol_get_name ((ValaSymbol*) sym);
                        _tmp11_ = vala_code_node_get_source_reference ((ValaCodeNode*) sym);
                        _tmp12_ = vala_namespace_new (_tmp10_, _tmp11_);
                        ns = _tmp12_;
                        _tmp13_ = _vala_code_node_ref0 (ns);
                        _result_ = _tmp13_;
                        _tmp14_ = vala_unresolved_symbol_get_inner (sym);
                        _tmp15_ = _vala_code_node_ref0 (_tmp14_);
                        _vala_code_node_unref0 (sym);
                        sym = _tmp15_;
                        while (TRUE) {
                              ValaNamespace* _tmp16_ = NULL;
                              ValaScope* _tmp17_ = NULL;
                              ValaSymbol* _tmp18_ = NULL;
                              ValaSymbol* res;
                              gboolean _tmp19_ = FALSE;
                              ValaSymbol* _tmp20_;
                              ValaNamespace* _tmp21_;
                              ValaNamespace* parent;
                              ValaScope* _tmp25_ = NULL;
                              const gchar* _tmp26_ = NULL;
                              ValaSymbol* _tmp27_ = NULL;
                              ValaSymbol* _tmp28_;
                              gboolean _tmp29_;
                              ValaNamespace* _tmp30_;
                              ValaUnresolvedSymbol* _tmp31_ = NULL;
                              ValaUnresolvedSymbol* _tmp32_;
                              if (!(sym != NULL)) {
                                    break;
                              }
                              _tmp16_ = vala_code_context_get_root (self->priv->context);
                              _tmp17_ = vala_symbol_get_scope ((ValaSymbol*) _tmp16_);
                              _tmp18_ = vala_gir_parser_resolve_symbol (self, _tmp17_, sym);
                              res = _tmp18_;
                              if (res != NULL) {
                                    _tmp19_ = !VALA_IS_NAMESPACE (res);
                              } else {
                                    _tmp19_ = FALSE;
                              }
                              if (_tmp19_) {
                                    _vala_code_node_unref0 (_result_);
                                    _result_ = NULL;
                                    _vala_code_node_unref0 (res);
                                    break;
                              }
                              _tmp20_ = res;
                              _tmp21_ = _vala_code_node_ref0 (VALA_IS_NAMESPACE (_tmp20_) ? ((ValaNamespace*) _tmp20_) : NULL);
                              parent = _tmp21_;
                              if (res == NULL) {
                                    const gchar* _tmp22_ = NULL;
                                    ValaSourceReference* _tmp23_ = NULL;
                                    ValaNamespace* _tmp24_ = NULL;
                                    _tmp22_ = vala_symbol_get_name ((ValaSymbol*) sym);
                                    _tmp23_ = vala_code_node_get_source_reference ((ValaCodeNode*) sym);
                                    _tmp24_ = vala_namespace_new (_tmp22_, _tmp23_);
                                    _vala_code_node_unref0 (parent);
                                    parent = _tmp24_;
                              }
                              _tmp25_ = vala_symbol_get_scope ((ValaSymbol*) parent);
                              _tmp26_ = vala_symbol_get_name ((ValaSymbol*) ns);
                              _tmp27_ = vala_scope_lookup (_tmp25_, _tmp26_);
                              _tmp28_ = _tmp27_;
                              _tmp29_ = _tmp28_ == NULL;
                              _vala_code_node_unref0 (_tmp28_);
                              if (_tmp29_) {
                                    vala_symbol_add_namespace ((ValaSymbol*) parent, ns);
                              }
                              _tmp30_ = _vala_code_node_ref0 (parent);
                              _vala_code_node_unref0 (ns);
                              ns = _tmp30_;
                              _tmp31_ = vala_unresolved_symbol_get_inner (sym);
                              _tmp32_ = _vala_code_node_ref0 (_tmp31_);
                              _vala_code_node_unref0 (sym);
                              sym = _tmp32_;
                              _vala_code_node_unref0 (parent);
                              _vala_code_node_unref0 (res);
                        }
                        if (_result_ != NULL) {
                              _tmp34_ = sym == NULL;
                        } else {
                              _tmp34_ = FALSE;
                        }
                        if (_tmp34_) {
                              ValaNamespace* _tmp35_ = NULL;
                              ValaScope* _tmp36_ = NULL;
                              const gchar* _tmp37_ = NULL;
                              ValaSymbol* _tmp38_ = NULL;
                              ValaSymbol* _tmp39_;
                              _tmp35_ = vala_code_context_get_root (self->priv->context);
                              _tmp36_ = vala_symbol_get_scope ((ValaSymbol*) _tmp35_);
                              _tmp37_ = vala_symbol_get_name ((ValaSymbol*) ns);
                              _tmp38_ = vala_scope_lookup (_tmp36_, _tmp37_);
                              _tmp39_ = _tmp38_;
                              _tmp33_ = _tmp39_ == NULL;
                              _vala_code_node_unref0 (_tmp39_);
                        } else {
                              _tmp33_ = FALSE;
                        }
                        if (_tmp33_) {
                              ValaNamespace* _tmp40_ = NULL;
                              _tmp40_ = vala_code_context_get_root (self->priv->context);
                              vala_symbol_add_namespace ((ValaSymbol*) _tmp40_, ns);
                        }
                        _tmp41_ = _vala_code_node_ref0 ((ValaSymbol*) _result_);
                        _vala_code_node_unref0 (target_symbol);
                        target_symbol = _tmp41_;
                        _vala_code_node_unref0 (_result_);
                        _vala_code_node_unref0 (ns);
                        _vala_code_node_unref0 (sym);
                  }
                  if (target_symbol == NULL) {
                        gchar* _tmp42_ = NULL;
                        gchar* _tmp43_;
                        gchar* _tmp44_ = NULL;
                        gchar* _tmp45_;
                        _tmp42_ = vala_code_node_to_string ((ValaCodeNode*) target_unresolved_symbol);
                        _tmp43_ = _tmp42_;
                        _tmp44_ = g_strdup_printf ("unable to reparent into `%s'", _tmp43_);
                        _tmp45_ = _tmp44_;
                        vala_report_error (NULL, _tmp45_);
                        _g_free0 (_tmp45_);
                        _g_free0 (_tmp43_);
                        _vala_code_node_unref0 (target_symbol);
                        _vala_code_node_unref0 (target_unresolved_symbol);
                        continue;
                  }
                  _tmp46_ = vala_map_get ((ValaMap*) self->priv->symbol_reparent_map, target_unresolved_symbol);
                  symbols = (ValaArrayList*) _tmp46_;
                  {
                        ValaArrayList* _tmp47_;
                        ValaArrayList* _symbol_list;
                        gint _tmp48_;
                        gint _symbol_size;
                        gint _symbol_index;
                        _tmp47_ = _vala_iterable_ref0 (symbols);
                        _symbol_list = _tmp47_;
                        _tmp48_ = vala_collection_get_size ((ValaCollection*) _symbol_list);
                        _symbol_size = _tmp48_;
                        _symbol_index = -1;
                        while (TRUE) {
                              gpointer _tmp49_ = NULL;
                              ValaSymbol* symbol;
                              _symbol_index = _symbol_index + 1;
                              if (!(_symbol_index < _symbol_size)) {
                                    break;
                              }
                              _tmp49_ = vala_list_get ((ValaList*) _symbol_list, _symbol_index);
                              symbol = (ValaSymbol*) _tmp49_;
                              vala_gir_parser_add_symbol_to_container (self, target_symbol, symbol);
                              _vala_code_node_unref0 (symbol);
                        }
                        _vala_iterable_unref0 (_symbol_list);
                  }
                  _vala_iterable_unref0 (symbols);
                  _vala_code_node_unref0 (target_symbol);
                  _vala_code_node_unref0 (target_unresolved_symbol);
            }
            _vala_iterator_unref0 (_target_unresolved_symbol_it);
      }
}


static void vala_gir_parser_postprocess_gtype_callbacks (ValaGirParser* self) {
      g_return_if_fail (self != NULL);
      {
            ValaSet* _tmp0_ = NULL;
            ValaSet* _tmp1_;
            ValaIterator* _tmp2_ = NULL;
            ValaIterator* _tmp3_;
            ValaIterator* _callback_scope_it;
            _tmp0_ = vala_map_get_keys ((ValaMap*) self->priv->gtype_callbacks);
            _tmp1_ = _tmp0_;
            _tmp2_ = vala_iterable_iterator ((ValaIterable*) _tmp1_);
            _tmp3_ = _tmp2_;
            _vala_iterable_unref0 (_tmp1_);
            _callback_scope_it = _tmp3_;
            while (TRUE) {
                  gboolean _tmp4_;
                  gpointer _tmp5_ = NULL;
                  ValaGirParserCallbackScope* callback_scope;
                  ValaScope* _tmp6_ = NULL;
                  ValaSymbol* _tmp7_ = NULL;
                  ValaSymbol* _tmp8_;
                  ValaObjectTypeSymbol* gtype;
                  gpointer _tmp13_ = NULL;
                  ValaArrayList* callbacks;
                  _tmp4_ = vala_iterator_next (_callback_scope_it);
                  if (!_tmp4_) {
                        break;
                  }
                  _tmp5_ = vala_iterator_get (_callback_scope_it);
                  callback_scope = (ValaGirParserCallbackScope*) _tmp5_;
                  _tmp6_ = vala_symbol_get_scope ((ValaSymbol*) callback_scope->parent_namespace);
                  _tmp7_ = vala_gir_parser_resolve_symbol (self, _tmp6_, callback_scope->gtype_struct_for);
                  _tmp8_ = _tmp7_;
                  gtype = VALA_IS_OBJECT_TYPE_SYMBOL (_tmp8_) ? ((ValaObjectTypeSymbol*) _tmp8_) : NULL;
                  if (gtype == NULL) {
                        gchar* _tmp9_ = NULL;
                        gchar* _tmp10_;
                        gchar* _tmp11_ = NULL;
                        gchar* _tmp12_;
                        _tmp9_ = vala_code_node_to_string ((ValaCodeNode*) callback_scope->gtype_struct_for);
                        _tmp10_ = _tmp9_;
                        _tmp11_ = g_strdup_printf ("unknown symbol `%s'", _tmp10_);
                        _tmp12_ = _tmp11_;
                        vala_report_error (NULL, _tmp12_);
                        _g_free0 (_tmp12_);
                        _g_free0 (_tmp10_);
                        _vala_code_node_unref0 (gtype);
                        _vala_gir_parser_callback_scope_unref0 (callback_scope);
                        continue;
                  }
                  _tmp13_ = vala_map_get ((ValaMap*) self->priv->gtype_callbacks, callback_scope);
                  callbacks = (ValaArrayList*) _tmp13_;
                  {
                        ValaArrayList* _tmp14_;
                        ValaArrayList* _d_list;
                        gint _tmp15_;
                        gint _d_size;
                        gint _d_index;
                        _tmp14_ = _vala_iterable_ref0 (callbacks);
                        _d_list = _tmp14_;
                        _tmp15_ = vala_collection_get_size ((ValaCollection*) _d_list);
                        _d_size = _tmp15_;
                        _d_index = -1;
                        while (TRUE) {
                              gpointer _tmp16_ = NULL;
                              ValaDelegate* d;
                              ValaScope* _tmp17_ = NULL;
                              const gchar* _tmp18_ = NULL;
                              ValaSymbol* _tmp19_ = NULL;
                              ValaSymbol* symbol;
                              _d_index = _d_index + 1;
                              if (!(_d_index < _d_size)) {
                                    break;
                              }
                              _tmp16_ = vala_list_get ((ValaList*) _d_list, _d_index);
                              d = (ValaDelegate*) _tmp16_;
                              _tmp17_ = vala_symbol_get_scope ((ValaSymbol*) gtype);
                              _tmp18_ = vala_symbol_get_name ((ValaSymbol*) d);
                              _tmp19_ = vala_scope_lookup (_tmp17_, _tmp18_);
                              symbol = _tmp19_;
                              if (symbol == NULL) {
                                    _vala_code_node_unref0 (symbol);
                                    _vala_code_node_unref0 (d);
                                    continue;
                              } else {
                                    if (VALA_IS_METHOD (symbol)) {
                                          ValaMethod* _tmp20_;
                                          ValaMethod* meth;
                                          _tmp20_ = _vala_code_node_ref0 (VALA_METHOD (symbol));
                                          meth = _tmp20_;
                                          if (VALA_IS_CLASS (gtype)) {
                                                vala_method_set_is_virtual (meth, TRUE);
                                          } else {
                                                if (VALA_IS_INTERFACE (gtype)) {
                                                      vala_method_set_is_abstract (meth, TRUE);
                                                }
                                          }
                                          _vala_code_node_unref0 (meth);
                                    } else {
                                          if (VALA_IS_SIGNAL (symbol)) {
                                                ValaSignal* _tmp21_;
                                                ValaSignal* sig;
                                                _tmp21_ = _vala_code_node_ref0 (VALA_SIGNAL (symbol));
                                                sig = _tmp21_;
                                                vala_signal_set_is_virtual (sig, TRUE);
                                                vala_gir_parser_assume_parameter_names (self, sig, (ValaSymbol*) d);
                                                _vala_code_node_unref0 (sig);
                                          } else {
                                                if (VALA_IS_PROPERTY (symbol)) {
                                                      ValaProperty* _tmp22_;
                                                      ValaProperty* prop;
                                                      _tmp22_ = _vala_code_node_ref0 (VALA_PROPERTY (symbol));
                                                      prop = _tmp22_;
                                                      vala_property_set_is_virtual (prop, TRUE);
                                                      _vala_code_node_unref0 (prop);
                                                } else {
                                                      ValaSourceReference* _tmp23_ = NULL;
                                                      ValaSourceReference* _tmp24_;
                                                      const gchar* _tmp25_ = NULL;
                                                      const gchar* _tmp26_ = NULL;
                                                      gchar* _tmp27_ = NULL;
                                                      gchar* _tmp28_;
                                                      _tmp23_ = vala_gir_parser_get_current_src (self);
                                                      _tmp24_ = _tmp23_;
                                                      _tmp25_ = vala_symbol_get_name ((ValaSymbol*) d);
                                                      _tmp26_ = vala_symbol_get_name ((ValaSymbol*) gtype);
                                                      _tmp27_ = g_strdup_printf ("unknown member type `%s' in `%s'", _tmp25_, _tmp26_);
                                                      _tmp28_ = _tmp27_;
                                                      vala_report_error (_tmp24_, _tmp28_);
                                                      _g_free0 (_tmp28_);
                                                      _vala_source_reference_unref0 (_tmp24_);
                                                }
                                          }
                                    }
                              }
                              _vala_code_node_unref0 (symbol);
                              _vala_code_node_unref0 (d);
                        }
                        _vala_iterable_unref0 (_d_list);
                  }
                  _vala_iterable_unref0 (callbacks);
                  _vala_code_node_unref0 (gtype);
                  _vala_gir_parser_callback_scope_unref0 (callback_scope);
            }
            _vala_iterator_unref0 (_callback_scope_it);
      }
}


static void vala_gir_parser_postprocess_aliases (ValaGirParser* self) {
      g_return_if_fail (self != NULL);
      {
            ValaArrayList* _tmp0_;
            ValaArrayList* _alias_list;
            gint _tmp1_;
            gint _alias_size;
            gint _alias_index;
            _tmp0_ = _vala_iterable_ref0 (self->priv->aliases);
            _alias_list = _tmp0_;
            _tmp1_ = vala_collection_get_size ((ValaCollection*) _alias_list);
            _alias_size = _tmp1_;
            _alias_index = -1;
            while (TRUE) {
                  gpointer _tmp2_ = NULL;
                  ValaGirParserAlias* alias;
                  ValaDataType* base_type;
                  ValaSymbol* type_sym;
                  gboolean _tmp10_ = FALSE;
                  gboolean _tmp11_ = FALSE;
                  _alias_index = _alias_index + 1;
                  if (!(_alias_index < _alias_size)) {
                        break;
                  }
                  _tmp2_ = vala_list_get ((ValaList*) _alias_list, _alias_index);
                  alias = (ValaGirParserAlias*) _tmp2_;
                  base_type = NULL;
                  type_sym = NULL;
                  if (VALA_IS_UNRESOLVED_TYPE (alias->base_type)) {
                        ValaDataType* _tmp3_;
                        ValaScope* _tmp4_ = NULL;
                        ValaUnresolvedSymbol* _tmp5_ = NULL;
                        ValaSymbol* _tmp6_ = NULL;
                        _tmp3_ = _vala_code_node_ref0 (alias->base_type);
                        _vala_code_node_unref0 (base_type);
                        base_type = _tmp3_;
                        _tmp4_ = vala_symbol_get_scope ((ValaSymbol*) alias->parent_namespace);
                        _tmp5_ = vala_unresolved_type_get_unresolved_symbol (VALA_UNRESOLVED_TYPE (base_type));
                        _tmp6_ = vala_gir_parser_resolve_symbol (self, _tmp4_, _tmp5_);
                        _vala_code_node_unref0 (type_sym);
                        type_sym = _tmp6_;
                  } else {
                        if (!VALA_IS_VOID_TYPE (alias->base_type)) {
                              ValaDataType* _tmp7_;
                              ValaTypeSymbol* _tmp8_ = NULL;
                              ValaSymbol* _tmp9_;
                              _tmp7_ = _vala_code_node_ref0 (alias->base_type);
                              _vala_code_node_unref0 (base_type);
                              base_type = _tmp7_;
                              _tmp8_ = vala_data_type_get_data_type (base_type);
                              _tmp9_ = _vala_code_node_ref0 ((ValaSymbol*) _tmp8_);
                              _vala_code_node_unref0 (type_sym);
                              type_sym = _tmp9_;
                        }
                  }
                  if (base_type == NULL) {
                        _tmp11_ = TRUE;
                  } else {
                        _tmp11_ = type_sym == NULL;
                  }
                  if (_tmp11_) {
                        _tmp10_ = TRUE;
                  } else {
                        _tmp10_ = VALA_IS_STRUCT (type_sym);
                  }
                  if (_tmp10_) {
                        ValaStruct* _tmp12_ = NULL;
                        ValaStruct* st;
                        _tmp12_ = vala_struct_new (alias->name, alias->source_reference, NULL);
                        st = _tmp12_;
                        vala_symbol_set_access ((ValaSymbol*) st, VALA_SYMBOL_ACCESSIBILITY_PUBLIC);
                        if (base_type != NULL) {
                              vala_struct_set_base_type (st, base_type);
                        }
                        vala_symbol_set_external ((ValaSymbol*) st, TRUE);
                        vala_symbol_add_struct ((ValaSymbol*) alias->parent_namespace, st);
                        _vala_code_node_unref0 (st);
                  } else {
                        if (VALA_IS_CLASS (type_sym)) {
                              ValaClass* _tmp13_ = NULL;
                              ValaClass* cl;
                              _tmp13_ = vala_class_new (alias->name, alias->source_reference, NULL);
                              cl = _tmp13_;
                              vala_symbol_set_access ((ValaSymbol*) cl, VALA_SYMBOL_ACCESSIBILITY_PUBLIC);
                              if (base_type != NULL) {
                                    vala_class_add_base_type (cl, base_type);
                              }
                              vala_symbol_set_external ((ValaSymbol*) cl, TRUE);
                              vala_symbol_add_class ((ValaSymbol*) alias->parent_namespace, cl);
                              _vala_code_node_unref0 (cl);
                        }
                  }
                  _vala_code_node_unref0 (type_sym);
                  _vala_code_node_unref0 (base_type);
                  _vala_gir_parser_alias_unref0 (alias);
            }
            _vala_iterable_unref0 (_alias_list);
      }
}


static void vala_gir_parser_find_static_method_parent (ValaGirParser* self, const gchar* cname, ValaSymbol* current, ValaSymbol** best, gdouble* match, gdouble match_char) {
      ValaSymbol* _tmp0_;
      ValaSymbol* old_best;
      ValaScope* _tmp1_ = NULL;
      ValaMap* _tmp2_ = NULL;
      ValaMap* _tmp3_;
      gboolean _tmp4_;
      gchar* _tmp16_ = NULL;
      gchar* current_cprefix;
      gboolean _tmp17_;
      g_return_if_fail (self != NULL);
      g_return_if_fail (cname != NULL);
      g_return_if_fail (current != NULL);
      g_return_if_fail (best != NULL);
      _tmp0_ = _vala_code_node_ref0 (*best);
      old_best = _tmp0_;
      _tmp1_ = vala_symbol_get_scope (current);
      _tmp2_ = vala_scope_get_symbol_table (_tmp1_);
      _tmp3_ = _tmp2_;
      _tmp4_ = _tmp3_ != NULL;
      _vala_map_unref0 (_tmp3_);
      if (_tmp4_) {
            {
                  ValaScope* _tmp5_ = NULL;
                  ValaMap* _tmp6_ = NULL;
                  ValaMap* _tmp7_;
                  ValaCollection* _tmp8_ = NULL;
                  ValaCollection* _tmp9_;
                  ValaIterator* _tmp10_ = NULL;
                  ValaIterator* _tmp11_;
                  ValaIterator* _child_it;
                  _tmp5_ = vala_symbol_get_scope (current);
                  _tmp6_ = vala_scope_get_symbol_table (_tmp5_);
                  _tmp7_ = _tmp6_;
                  _tmp8_ = vala_map_get_values (_tmp7_);
                  _tmp9_ = _tmp8_;
                  _tmp10_ = vala_iterable_iterator ((ValaIterable*) _tmp9_);
                  _tmp11_ = _tmp10_;
                  _vala_iterable_unref0 (_tmp9_);
                  _vala_map_unref0 (_tmp7_);
                  _child_it = _tmp11_;
                  while (TRUE) {
                        gboolean _tmp12_;
                        gpointer _tmp13_ = NULL;
                        ValaSymbol* child;
                        gboolean _tmp14_ = FALSE;
                        gboolean _tmp15_ = FALSE;
                        _tmp12_ = vala_iterator_next (_child_it);
                        if (!_tmp12_) {
                              break;
                        }
                        _tmp13_ = vala_iterator_get (_child_it);
                        child = (ValaSymbol*) _tmp13_;
                        if (VALA_IS_STRUCT (child)) {
                              _tmp15_ = TRUE;
                        } else {
                              _tmp15_ = VALA_IS_OBJECT_TYPE_SYMBOL (child);
                        }
                        if (_tmp15_) {
                              _tmp14_ = TRUE;
                        } else {
                              _tmp14_ = VALA_IS_NAMESPACE (child);
                        }
                        if (_tmp14_) {
                              vala_gir_parser_find_static_method_parent (self, cname, child, best, match, match_char);
                        }
                        _vala_code_node_unref0 (child);
                  }
                  _vala_iterator_unref0 (_child_it);
            }
      }
      if ((*best) != old_best) {
            _vala_code_node_unref0 (old_best);
            return;
      }
      _tmp16_ = vala_symbol_get_lower_case_cprefix (current);
      current_cprefix = _tmp16_;
      _tmp17_ = g_str_has_prefix (cname, current_cprefix);
      if (_tmp17_) {
            gint _tmp18_;
            gdouble current_match;
            _tmp18_ = strlen (current_cprefix);
            current_match = match_char * _tmp18_;
            if (current_match > (*match)) {
                  ValaSymbol* _tmp19_;
                  *match = current_match;
                  _tmp19_ = _vala_code_node_ref0 (current);
                  _vala_code_node_unref0 (*best);
                  *best = _tmp19_;
            }
      }
      _g_free0 (current_cprefix);
      _vala_code_node_unref0 (old_best);
}


static void vala_gir_parser_postprocess_namespace_methods (ValaGirParser* self) {
      g_return_if_fail (self != NULL);
      {
            ValaSet* _tmp0_ = NULL;
            ValaSet* _tmp1_;
            ValaIterator* _tmp2_ = NULL;
            ValaIterator* _tmp3_;
            ValaIterator* _ns_it;
            _tmp0_ = vala_map_get_keys ((ValaMap*) self->priv->namespace_methods);
            _tmp1_ = _tmp0_;
            _tmp2_ = vala_iterable_iterator ((ValaIterable*) _tmp1_);
            _tmp3_ = _tmp2_;
            _vala_iterable_unref0 (_tmp1_);
            _ns_it = _tmp3_;
            while (TRUE) {
                  gboolean _tmp4_;
                  gpointer _tmp5_ = NULL;
                  ValaNamespace* ns;
                  gchar* _tmp6_ = NULL;
                  gchar* ns_cprefix;
                  gpointer _tmp7_ = NULL;
                  ValaArrayList* methods;
                  _tmp4_ = vala_iterator_next (_ns_it);
                  if (!_tmp4_) {
                        break;
                  }
                  _tmp5_ = vala_iterator_get (_ns_it);
                  ns = (ValaNamespace*) _tmp5_;
                  _tmp6_ = vala_symbol_get_lower_case_cprefix ((ValaSymbol*) ns);
                  ns_cprefix = _tmp6_;
                  _tmp7_ = vala_map_get ((ValaMap*) self->priv->namespace_methods, ns);
                  methods = (ValaArrayList*) _tmp7_;
                  {
                        ValaArrayList* _tmp8_;
                        ValaArrayList* _method_list;
                        gint _tmp9_;
                        gint _method_size;
                        gint _method_index;
                        _tmp8_ = _vala_iterable_ref0 (methods);
                        _method_list = _tmp8_;
                        _tmp9_ = vala_collection_get_size ((ValaCollection*) _method_list);
                        _method_size = _tmp9_;
                        _method_index = -1;
                        while (TRUE) {
                              gpointer _tmp10_ = NULL;
                              ValaMethod* method;
                              ValaCodeNode* _tmp11_ = NULL;
                              gchar* _tmp12_ = NULL;
                              gchar* cname;
                              ValaParameter* first_param;
                              ValaList* _tmp13_ = NULL;
                              ValaList* _tmp14_;
                              gint _tmp15_;
                              gboolean _tmp16_;
                              gboolean _tmp20_ = FALSE;
                              gdouble match;
                              ValaSymbol* _tmp46_;
                              ValaSymbol* parent;
                              gint _tmp47_;
                              const gchar* _tmp48_ = NULL;
                              gchar* _tmp49_ = NULL;
                              gchar* _tmp50_;
                              gint _tmp51_;
                              gint _tmp52_;
                              gchar* _tmp53_ = NULL;
                              gchar* _tmp54_;
                              gchar* new_name;
                              ValaScope* _tmp55_ = NULL;
                              ValaSymbol* _tmp56_ = NULL;
                              ValaSymbol* _tmp57_;
                              gboolean _tmp58_;
                              _method_index = _method_index + 1;
                              if (!(_method_index < _method_size)) {
                                    break;
                              }
                              _tmp10_ = vala_list_get ((ValaList*) _method_list, _method_index);
                              method = (ValaMethod*) _tmp10_;
                              _tmp11_ = vala_code_node_get_parent_node ((ValaCodeNode*) method);
                              if (_tmp11_ != NULL) {
                                    _vala_code_node_unref0 (method);
                                    continue;
                              }
                              _tmp12_ = vala_method_get_cname (method);
                              cname = _tmp12_;
                              first_param = NULL;
                              _tmp13_ = vala_method_get_parameters (method);
                              _tmp14_ = _tmp13_;
                              _tmp15_ = vala_collection_get_size ((ValaCollection*) _tmp14_);
                              _tmp16_ = _tmp15_ > 0;
                              _vala_iterable_unref0 (_tmp14_);
                              if (_tmp16_) {
                                    ValaList* _tmp17_ = NULL;
                                    ValaList* _tmp18_;
                                    gpointer _tmp19_ = NULL;
                                    _tmp17_ = vala_method_get_parameters (method);
                                    _tmp18_ = _tmp17_;
                                    _tmp19_ = vala_list_get (_tmp18_, 0);
                                    _vala_code_node_unref0 (first_param);
                                    first_param = (ValaParameter*) _tmp19_;
                                    _vala_iterable_unref0 (_tmp18_);
                              }
                              if (first_param != NULL) {
                                    ValaDataType* _tmp21_ = NULL;
                                    _tmp21_ = vala_variable_get_variable_type ((ValaVariable*) first_param);
                                    _tmp20_ = VALA_IS_UNRESOLVED_TYPE (_tmp21_);
                              } else {
                                    _tmp20_ = FALSE;
                              }
                              if (_tmp20_) {
                                    ValaScope* _tmp22_ = NULL;
                                    ValaDataType* _tmp23_ = NULL;
                                    ValaUnresolvedSymbol* _tmp24_ = NULL;
                                    ValaSymbol* _tmp25_ = NULL;
                                    ValaSymbol* parent;
                                    gboolean _tmp26_ = FALSE;
                                    gboolean _tmp27_ = FALSE;
                                    _tmp22_ = vala_symbol_get_scope ((ValaSymbol*) ns);
                                    _tmp23_ = vala_variable_get_variable_type ((ValaVariable*) first_param);
                                    _tmp24_ = vala_unresolved_type_get_unresolved_symbol (VALA_UNRESOLVED_TYPE (_tmp23_));
                                    _tmp25_ = vala_gir_parser_resolve_symbol (self, _tmp22_, _tmp24_);
                                    parent = _tmp25_;
                                    if (parent != NULL) {
                                          gboolean _tmp28_ = FALSE;
                                          gboolean _tmp29_ = FALSE;
                                          if (VALA_IS_STRUCT (parent)) {
                                                _tmp29_ = TRUE;
                                          } else {
                                                _tmp29_ = VALA_IS_OBJECT_TYPE_SYMBOL (parent);
                                          }
                                          if (_tmp29_) {
                                                _tmp28_ = TRUE;
                                          } else {
                                                _tmp28_ = VALA_IS_NAMESPACE (parent);
                                          }
                                          _tmp27_ = _tmp28_;
                                    } else {
                                          _tmp27_ = FALSE;
                                    }
                                    if (_tmp27_) {
                                          gchar* _tmp30_ = NULL;
                                          gchar* _tmp31_;
                                          gboolean _tmp32_;
                                          _tmp30_ = vala_symbol_get_lower_case_cprefix (parent);
                                          _tmp31_ = _tmp30_;
                                          _tmp32_ = g_str_has_prefix (cname, _tmp31_);
                                          _tmp26_ = _tmp32_;
                                          _g_free0 (_tmp31_);
                                    } else {
                                          _tmp26_ = FALSE;
                                    }
                                    if (_tmp26_) {
                                          const gchar* _tmp33_ = NULL;
                                          gchar* _tmp34_ = NULL;
                                          gchar* _tmp35_;
                                          gint _tmp36_;
                                          gint _tmp37_;
                                          gchar* _tmp38_ = NULL;
                                          gchar* _tmp39_;
                                          gchar* new_name;
                                          ValaScope* _tmp40_ = NULL;
                                          ValaSymbol* _tmp41_ = NULL;
                                          ValaSymbol* _tmp42_;
                                          gboolean _tmp43_;
                                          _tmp33_ = vala_symbol_get_name ((ValaSymbol*) method);
                                          _tmp34_ = vala_symbol_get_lower_case_cprefix (parent);
                                          _tmp35_ = _tmp34_;
                                          _tmp36_ = strlen (_tmp35_);
                                          _tmp37_ = strlen (ns_cprefix);
                                          _tmp38_ = string_substring (_tmp33_, (glong) (_tmp36_ - _tmp37_), (glong) (-1));
                                          _tmp39_ = _tmp38_;
                                          _g_free0 (_tmp35_);
                                          new_name = _tmp39_;
                                          _tmp40_ = vala_symbol_get_scope (parent);
                                          _tmp41_ = vala_scope_lookup (_tmp40_, new_name);
                                          _tmp42_ = _tmp41_;
                                          _tmp43_ = _tmp42_ == NULL;
                                          _vala_code_node_unref0 (_tmp42_);
                                          if (_tmp43_) {
                                                ValaList* _tmp44_ = NULL;
                                                ValaList* _tmp45_;
                                                vala_symbol_set_name ((ValaSymbol*) method, new_name);
                                                _tmp44_ = vala_method_get_parameters (method);
                                                _tmp45_ = _tmp44_;
                                                vala_list_remove_at (_tmp45_, 0);
                                                _vala_iterable_unref0 (_tmp45_);
                                                vala_method_set_binding (method, VALA_MEMBER_BINDING_INSTANCE);
                                                vala_gir_parser_add_symbol_to_container (self, parent, (ValaSymbol*) method);
                                          } else {
                                                vala_symbol_add_method ((ValaSymbol*) ns, method);
                                          }
                                          _g_free0 (new_name);
                                          _vala_code_node_unref0 (parent);
                                          _vala_code_node_unref0 (first_param);
                                          _g_free0 (cname);
                                          _vala_code_node_unref0 (method);
                                          continue;
                                    }
                                    _vala_code_node_unref0 (parent);
                              }
                              match = (gdouble) 0;
                              _tmp46_ = _vala_code_node_ref0 ((ValaSymbol*) ns);
                              parent = _tmp46_;
                              _tmp47_ = strlen (cname);
                              vala_gir_parser_find_static_method_parent (self, cname, (ValaSymbol*) ns, &parent, &match, 1.0 / _tmp47_);
                              _tmp48_ = vala_symbol_get_name ((ValaSymbol*) method);
                              _tmp49_ = vala_symbol_get_lower_case_cprefix (parent);
                              _tmp50_ = _tmp49_;
                              _tmp51_ = strlen (_tmp50_);
                              _tmp52_ = strlen (ns_cprefix);
                              _tmp53_ = string_substring (_tmp48_, (glong) (_tmp51_ - _tmp52_), (glong) (-1));
                              _tmp54_ = _tmp53_;
                              _g_free0 (_tmp50_);
                              new_name = _tmp54_;
                              _tmp55_ = vala_symbol_get_scope (parent);
                              _tmp56_ = vala_scope_lookup (_tmp55_, new_name);
                              _tmp57_ = _tmp56_;
                              _tmp58_ = _tmp57_ == NULL;
                              _vala_code_node_unref0 (_tmp57_);
                              if (_tmp58_) {
                                    vala_symbol_set_name ((ValaSymbol*) method, new_name);
                                    vala_gir_parser_add_symbol_to_container (self, parent, (ValaSymbol*) method);
                              } else {
                                    vala_symbol_add_method ((ValaSymbol*) ns, method);
                              }
                              _g_free0 (new_name);
                              _vala_code_node_unref0 (parent);
                              _vala_code_node_unref0 (first_param);
                              _g_free0 (cname);
                              _vala_code_node_unref0 (method);
                        }
                        _vala_iterable_unref0 (_method_list);
                  }
                  _vala_iterable_unref0 (methods);
                  _g_free0 (ns_cprefix);
                  _vala_code_node_unref0 (ns);
            }
            _vala_iterator_unref0 (_ns_it);
      }
}


static guint vala_gir_parser_unresolved_symbol_hash (void* ptr) {
      guint result = 0U;
      ValaUnresolvedSymbol* _tmp0_;
      ValaUnresolvedSymbol* sym;
      GString* _tmp1_ = NULL;
      GString* builder;
      guint _tmp5_;
      _tmp0_ = _vala_code_node_ref0 (VALA_UNRESOLVED_SYMBOL (ptr));
      sym = _tmp0_;
      _tmp1_ = g_string_new ("");
      builder = _tmp1_;
      while (TRUE) {
            const gchar* _tmp2_ = NULL;
            ValaUnresolvedSymbol* _tmp3_ = NULL;
            ValaUnresolvedSymbol* _tmp4_;
            if (!(sym != NULL)) {
                  break;
            }
            _tmp2_ = vala_symbol_get_name ((ValaSymbol*) sym);
            g_string_append (builder, _tmp2_);
            _tmp3_ = vala_unresolved_symbol_get_inner (sym);
            _tmp4_ = _vala_code_node_ref0 (_tmp3_);
            _vala_code_node_unref0 (sym);
            sym = _tmp4_;
      }
      _tmp5_ = g_str_hash (builder->str);
      result = _tmp5_;
      _g_string_free0 (builder);
      _vala_code_node_unref0 (sym);
      return result;
}


static gboolean vala_gir_parser_unresolved_symbol_equal (void* ptr1, void* ptr2) {
      gboolean result = FALSE;
      ValaUnresolvedSymbol* _tmp0_;
      ValaUnresolvedSymbol* sym1;
      ValaUnresolvedSymbol* _tmp1_;
      ValaUnresolvedSymbol* sym2;
      _tmp0_ = _vala_code_node_ref0 (VALA_UNRESOLVED_SYMBOL (ptr1));
      sym1 = _tmp0_;
      _tmp1_ = _vala_code_node_ref0 (VALA_UNRESOLVED_SYMBOL (ptr2));
      sym2 = _tmp1_;
      while (TRUE) {
            gboolean _tmp2_ = FALSE;
            const gchar* _tmp3_ = NULL;
            const gchar* _tmp4_ = NULL;
            ValaUnresolvedSymbol* _tmp5_ = NULL;
            ValaUnresolvedSymbol* _tmp6_;
            ValaUnresolvedSymbol* _tmp7_ = NULL;
            ValaUnresolvedSymbol* _tmp8_;
            if (!(sym1 != sym2)) {
                  break;
            }
            if (sym1 == NULL) {
                  _tmp2_ = TRUE;
            } else {
                  _tmp2_ = sym2 == NULL;
            }
            if (_tmp2_) {
                  result = FALSE;
                  _vala_code_node_unref0 (sym2);
                  _vala_code_node_unref0 (sym1);
                  return result;
            }
            _tmp3_ = vala_symbol_get_name ((ValaSymbol*) sym1);
            _tmp4_ = vala_symbol_get_name ((ValaSymbol*) sym2);
            if (g_strcmp0 (_tmp3_, _tmp4_) != 0) {
                  result = FALSE;
                  _vala_code_node_unref0 (sym2);
                  _vala_code_node_unref0 (sym1);
                  return result;
            }
            _tmp5_ = vala_unresolved_symbol_get_inner (sym1);
            _tmp6_ = _vala_code_node_ref0 (_tmp5_);
            _vala_code_node_unref0 (sym1);
            sym1 = _tmp6_;
            _tmp7_ = vala_unresolved_symbol_get_inner (sym2);
            _tmp8_ = _vala_code_node_ref0 (_tmp7_);
            _vala_code_node_unref0 (sym2);
            sym2 = _tmp8_;
      }
      result = TRUE;
      _vala_code_node_unref0 (sym2);
      _vala_code_node_unref0 (sym1);
      return result;
}


static gpointer _vala_gir_parser_callback_scope_ref0 (gpointer self) {
      return self ? vala_gir_parser_callback_scope_ref (self) : NULL;
}


static guint vala_gir_parser_callback_scope_hash (void* ptr) {
      guint result = 0U;
      ValaGirParserCallbackScope* _tmp0_;
      ValaGirParserCallbackScope* cs;
      guint _tmp1_;
      _tmp0_ = _vala_gir_parser_callback_scope_ref0 (VALA_GIR_PARSER_CALLBACK_SCOPE (ptr));
      cs = _tmp0_;
      _tmp1_ = vala_gir_parser_unresolved_symbol_hash (cs->gtype_struct_for);
      result = _tmp1_;
      _vala_gir_parser_callback_scope_unref0 (cs);
      return result;
}


static gboolean vala_gir_parser_callback_scope_equal (void* ptr1, void* ptr2) {
      gboolean result = FALSE;
      ValaGirParserCallbackScope* _tmp0_;
      ValaGirParserCallbackScope* cs1;
      ValaGirParserCallbackScope* _tmp1_;
      ValaGirParserCallbackScope* cs2;
      gboolean _tmp2_ = FALSE;
      _tmp0_ = _vala_gir_parser_callback_scope_ref0 (VALA_GIR_PARSER_CALLBACK_SCOPE (ptr1));
      cs1 = _tmp0_;
      _tmp1_ = _vala_gir_parser_callback_scope_ref0 (VALA_GIR_PARSER_CALLBACK_SCOPE (ptr2));
      cs2 = _tmp1_;
      if (cs1->parent_namespace == cs2->parent_namespace) {
            gboolean _tmp3_;
            _tmp3_ = vala_gir_parser_unresolved_symbol_equal (cs1->gtype_struct_for, cs2->gtype_struct_for);
            _tmp2_ = _tmp3_;
      } else {
            _tmp2_ = FALSE;
      }
      result = _tmp2_;
      _vala_gir_parser_callback_scope_unref0 (cs2);
      _vala_gir_parser_callback_scope_unref0 (cs1);
      return result;
}


ValaGirParser* vala_gir_parser_construct (GType object_type) {
      ValaGirParser* self = NULL;
      self = (ValaGirParser*) vala_code_visitor_construct (object_type);
      return self;
}


ValaGirParser* vala_gir_parser_new (void) {
      return vala_gir_parser_construct (VALA_TYPE_GIR_PARSER);
}


static gpointer _vala_source_reference_ref0 (gpointer self) {
      return self ? vala_source_reference_ref (self) : NULL;
}


static ValaGirParserArgument* vala_gir_parser_argument_construct (GType object_type, ValaExpression* expression, ValaSourceReference* source_reference) {
      ValaGirParserArgument* self = NULL;
      ValaExpression* _tmp0_;
      ValaSourceReference* _tmp1_;
      g_return_val_if_fail (expression != NULL, NULL);
      self = (ValaGirParserArgument*) g_type_create_instance (object_type);
      _tmp0_ = _vala_code_node_ref0 (expression);
      _vala_code_node_unref0 (self->expression);
      self->expression = _tmp0_;
      _tmp1_ = _vala_source_reference_ref0 (source_reference);
      _vala_source_reference_unref0 (self->source_reference);
      self->source_reference = _tmp1_;
      return self;
}


static ValaGirParserArgument* vala_gir_parser_argument_new (ValaExpression* expression, ValaSourceReference* source_reference) {
      return vala_gir_parser_argument_construct (VALA_GIR_PARSER_TYPE_ARGUMENT, expression, source_reference);
}


static void vala_gir_parser_value_argument_init (GValue* value) {
      value->data[0].v_pointer = NULL;
}


static void vala_gir_parser_value_argument_free_value (GValue* value) {
      if (value->data[0].v_pointer) {
            vala_gir_parser_argument_unref (value->data[0].v_pointer);
      }
}


static void vala_gir_parser_value_argument_copy_value (const GValue* src_value, GValue* dest_value) {
      if (src_value->data[0].v_pointer) {
            dest_value->data[0].v_pointer = vala_gir_parser_argument_ref (src_value->data[0].v_pointer);
      } else {
            dest_value->data[0].v_pointer = NULL;
      }
}


static gpointer vala_gir_parser_value_argument_peek_pointer (const GValue* value) {
      return value->data[0].v_pointer;
}


static gchar* vala_gir_parser_value_argument_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
      if (collect_values[0].v_pointer) {
            ValaGirParserArgument* object;
            object = collect_values[0].v_pointer;
            if (object->parent_instance.g_class == NULL) {
                  return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
            } else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) {
                  return g_strconcat ("invalid object type `", g_type_name (G_TYPE_FROM_INSTANCE (object)), "' for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
            }
            value->data[0].v_pointer = vala_gir_parser_argument_ref (object);
      } else {
            value->data[0].v_pointer = NULL;
      }
      return NULL;
}


static gchar* vala_gir_parser_value_argument_lcopy_value (const GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
      ValaGirParserArgument** object_p;
      object_p = collect_values[0].v_pointer;
      if (!object_p) {
            return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value));
      }
      if (!value->data[0].v_pointer) {
            *object_p = NULL;
      } else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) {
            *object_p = value->data[0].v_pointer;
      } else {
            *object_p = vala_gir_parser_argument_ref (value->data[0].v_pointer);
      }
      return NULL;
}


static GParamSpec* vala_gir_parser_param_spec_argument (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) {
      ValaGirParserParamSpecArgument* spec;
      g_return_val_if_fail (g_type_is_a (object_type, VALA_GIR_PARSER_TYPE_ARGUMENT), NULL);
      spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags);
      G_PARAM_SPEC (spec)->value_type = object_type;
      return G_PARAM_SPEC (spec);
}


static gpointer vala_gir_parser_value_get_argument (const GValue* value) {
      g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, VALA_GIR_PARSER_TYPE_ARGUMENT), NULL);
      return value->data[0].v_pointer;
}


static void vala_gir_parser_value_set_argument (GValue* value, gpointer v_object) {
      ValaGirParserArgument* old;
      g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, VALA_GIR_PARSER_TYPE_ARGUMENT));
      old = value->data[0].v_pointer;
      if (v_object) {
            g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, VALA_GIR_PARSER_TYPE_ARGUMENT));
            g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
            value->data[0].v_pointer = v_object;
            vala_gir_parser_argument_ref (value->data[0].v_pointer);
      } else {
            value->data[0].v_pointer = NULL;
      }
      if (old) {
            vala_gir_parser_argument_unref (old);
      }
}


static void vala_gir_parser_value_take_argument (GValue* value, gpointer v_object) {
      ValaGirParserArgument* old;
      g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, VALA_GIR_PARSER_TYPE_ARGUMENT));
      old = value->data[0].v_pointer;
      if (v_object) {
            g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, VALA_GIR_PARSER_TYPE_ARGUMENT));
            g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
            value->data[0].v_pointer = v_object;
      } else {
            value->data[0].v_pointer = NULL;
      }
      if (old) {
            vala_gir_parser_argument_unref (old);
      }
}


static void vala_gir_parser_argument_class_init (ValaGirParserArgumentClass * klass) {
      vala_gir_parser_argument_parent_class = g_type_class_peek_parent (klass);
      VALA_GIR_PARSER_ARGUMENT_CLASS (klass)->finalize = vala_gir_parser_argument_finalize;
}


static void vala_gir_parser_argument_instance_init (ValaGirParserArgument * self) {
      self->used = FALSE;
      self->ref_count = 1;
}


static void vala_gir_parser_argument_finalize (ValaGirParserArgument* obj) {
      ValaGirParserArgument * self;
      self = VALA_GIR_PARSER_ARGUMENT (obj);
      _vala_code_node_unref0 (self->expression);
      _vala_source_reference_unref0 (self->source_reference);
}


static GType vala_gir_parser_argument_get_type (void) {
      static volatile gsize vala_gir_parser_argument_type_id__volatile = 0;
      if (g_once_init_enter (&vala_gir_parser_argument_type_id__volatile)) {
            static const GTypeValueTable g_define_type_value_table = { vala_gir_parser_value_argument_init, vala_gir_parser_value_argument_free_value, vala_gir_parser_value_argument_copy_value, vala_gir_parser_value_argument_peek_pointer, "p", vala_gir_parser_value_argument_collect_value, "p", vala_gir_parser_value_argument_lcopy_value };
            static const GTypeInfo g_define_type_info = { sizeof (ValaGirParserArgumentClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) vala_gir_parser_argument_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ValaGirParserArgument), 0, (GInstanceInitFunc) vala_gir_parser_argument_instance_init, &g_define_type_value_table };
            static const GTypeFundamentalInfo g_define_type_fundamental_info = { (G_TYPE_FLAG_CLASSED | G_TYPE_FLAG_INSTANTIATABLE | G_TYPE_FLAG_DERIVABLE | G_TYPE_FLAG_DEEP_DERIVABLE) };
            GType vala_gir_parser_argument_type_id;
            vala_gir_parser_argument_type_id = g_type_register_fundamental (g_type_fundamental_next (), "ValaGirParserArgument", &g_define_type_info, &g_define_type_fundamental_info, 0);
            g_once_init_leave (&vala_gir_parser_argument_type_id__volatile, vala_gir_parser_argument_type_id);
      }
      return vala_gir_parser_argument_type_id__volatile;
}


static gpointer vala_gir_parser_argument_ref (gpointer instance) {
      ValaGirParserArgument* self;
      self = instance;
      g_atomic_int_inc (&self->ref_count);
      return instance;
}


static void vala_gir_parser_argument_unref (gpointer instance) {
      ValaGirParserArgument* self;
      self = instance;
      if (g_atomic_int_dec_and_test (&self->ref_count)) {
            VALA_GIR_PARSER_ARGUMENT_GET_CLASS (self)->finalize (self);
            g_type_free_instance ((GTypeInstance *) self);
      }
}


static ValaGirParserMetadataSet* vala_gir_parser_metadata_set_construct (GType object_type, ValaGirParserMetadataType type) {
      ValaGirParserMetadataSet* self = NULL;
      self = (ValaGirParserMetadataSet*) vala_gir_parser_metadata_construct (object_type, "", type, NULL);
      return self;
}


static ValaGirParserMetadataSet* vala_gir_parser_metadata_set_new (ValaGirParserMetadataType type) {
      return vala_gir_parser_metadata_set_construct (VALA_GIR_PARSER_TYPE_METADATA_SET, type);
}


static void vala_gir_parser_metadata_set_add_sibling (ValaGirParserMetadataSet* self, ValaGirParserMetadata* metadata) {
      g_return_if_fail (self != NULL);
      g_return_if_fail (metadata != NULL);
      {
            ValaArrayList* _tmp0_;
            ValaArrayList* _child_list;
            gint _tmp1_;
            gint _child_size;
            gint _child_index;
            _tmp0_ = _vala_iterable_ref0 (metadata->children);
            _child_list = _tmp0_;
            _tmp1_ = vala_collection_get_size ((ValaCollection*) _child_list);
            _child_size = _tmp1_;
            _child_index = -1;
            while (TRUE) {
                  gpointer _tmp2_ = NULL;
                  ValaGirParserMetadata* child;
                  _child_index = _child_index + 1;
                  if (!(_child_index < _child_size)) {
                        break;
                  }
                  _tmp2_ = vala_list_get ((ValaList*) _child_list, _child_index);
                  child = (ValaGirParserMetadata*) _tmp2_;
                  vala_gir_parser_metadata_add_child ((ValaGirParserMetadata*) self, child);
                  _vala_gir_parser_metadata_unref0 (child);
            }
            _vala_iterable_unref0 (_child_list);
      }
      {
            ValaSet* _tmp3_ = NULL;
            ValaSet* _tmp4_;
            ValaIterator* _tmp5_ = NULL;
            ValaIterator* _tmp6_;
            ValaIterator* _key_it;
            _tmp3_ = vala_map_get_keys (metadata->args);
            _tmp4_ = _tmp3_;
            _tmp5_ = vala_iterable_iterator ((ValaIterable*) _tmp4_);
            _tmp6_ = _tmp5_;
            _vala_iterable_unref0 (_tmp4_);
            _key_it = _tmp6_;
            while (TRUE) {
                  gboolean _tmp7_;
                  gpointer _tmp8_ = NULL;
                  ValaGirParserArgumentType key;
                  gpointer _tmp9_ = NULL;
                  ValaGirParserArgument* _tmp10_;
                  _tmp7_ = vala_iterator_next (_key_it);
                  if (!_tmp7_) {
                        break;
                  }
                  _tmp8_ = vala_iterator_get (_key_it);
                  key = GPOINTER_TO_INT (_tmp8_);
                  _tmp9_ = vala_map_get (metadata->args, GINT_TO_POINTER (key));
                  _tmp10_ = (ValaGirParserArgument*) _tmp9_;
                  vala_map_set (((ValaGirParserMetadata*) self)->args, GINT_TO_POINTER (key), _tmp10_);
                  _vala_gir_parser_argument_unref0 (_tmp10_);
            }
            _vala_iterator_unref0 (_key_it);
      }
}


static void vala_gir_parser_metadata_set_class_init (ValaGirParserMetadataSetClass * klass) {
      vala_gir_parser_metadata_set_parent_class = g_type_class_peek_parent (klass);
}


static void vala_gir_parser_metadata_set_instance_init (ValaGirParserMetadataSet * self) {
}


static GType vala_gir_parser_metadata_set_get_type (void) {
      static volatile gsize vala_gir_parser_metadata_set_type_id__volatile = 0;
      if (g_once_init_enter (&vala_gir_parser_metadata_set_type_id__volatile)) {
            static const GTypeInfo g_define_type_info = { sizeof (ValaGirParserMetadataSetClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) vala_gir_parser_metadata_set_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ValaGirParserMetadataSet), 0, (GInstanceInitFunc) vala_gir_parser_metadata_set_instance_init, NULL };
            GType vala_gir_parser_metadata_set_type_id;
            vala_gir_parser_metadata_set_type_id = g_type_register_static (VALA_GIR_PARSER_TYPE_METADATA, "ValaGirParserMetadataSet", &g_define_type_info, 0);
            g_once_init_leave (&vala_gir_parser_metadata_set_type_id__volatile, vala_gir_parser_metadata_set_type_id);
      }
      return vala_gir_parser_metadata_set_type_id__volatile;
}


static ValaGirParserMetadata* vala_gir_parser_metadata_construct (GType object_type, const gchar* pattern, ValaGirParserMetadataType type, ValaSourceReference* source_reference) {
      ValaGirParserMetadata* self = NULL;
      gchar* _tmp0_;
      GPatternSpec* _tmp1_ = NULL;
      ValaSourceReference* _tmp2_;
      g_return_val_if_fail (pattern != NULL, NULL);
      self = (ValaGirParserMetadata*) g_type_create_instance (object_type);
      _tmp0_ = g_strdup (pattern);
      _g_free0 (self->pattern);
      self->pattern = _tmp0_;
      _tmp1_ = g_pattern_spec_new (pattern);
      _g_pattern_spec_free0 (self->pattern_spec);
      self->pattern_spec = _tmp1_;
      self->type = type;
      _tmp2_ = _vala_source_reference_ref0 (source_reference);
      _vala_source_reference_unref0 (self->source_reference);
      self->source_reference = _tmp2_;
      return self;
}


static ValaGirParserMetadata* vala_gir_parser_metadata_new (const gchar* pattern, ValaGirParserMetadataType type, ValaSourceReference* source_reference) {
      return vala_gir_parser_metadata_construct (VALA_GIR_PARSER_TYPE_METADATA, pattern, type, source_reference);
}


static void vala_gir_parser_metadata_add_child (ValaGirParserMetadata* self, ValaGirParserMetadata* metadata) {
      g_return_if_fail (self != NULL);
      g_return_if_fail (metadata != NULL);
      vala_collection_add ((ValaCollection*) self->children, metadata);
}


static ValaGirParserMetadata* vala_gir_parser_metadata_get_child (ValaGirParserMetadata* self, const gchar* pattern, ValaGirParserMetadataType type) {
      ValaGirParserMetadata* result = NULL;
      g_return_val_if_fail (self != NULL, NULL);
      g_return_val_if_fail (pattern != NULL, NULL);
      {
            ValaArrayList* _tmp0_;
            ValaArrayList* _metadata_list;
            gint _tmp1_;
            gint _metadata_size;
            gint _metadata_index;
            _tmp0_ = _vala_iterable_ref0 (self->children);
            _metadata_list = _tmp0_;
            _tmp1_ = vala_collection_get_size ((ValaCollection*) _metadata_list);
            _metadata_size = _tmp1_;
            _metadata_index = -1;
            while (TRUE) {
                  gpointer _tmp2_ = NULL;
                  ValaGirParserMetadata* metadata;
                  gboolean _tmp3_ = FALSE;
                  _metadata_index = _metadata_index + 1;
                  if (!(_metadata_index < _metadata_size)) {
                        break;
                  }
                  _tmp2_ = vala_list_get ((ValaList*) _metadata_list, _metadata_index);
                  metadata = (ValaGirParserMetadata*) _tmp2_;
                  if (metadata->type == type) {
                        _tmp3_ = g_strcmp0 (metadata->pattern, pattern) == 0;
                  } else {
                        _tmp3_ = FALSE;
                  }
                  if (_tmp3_) {
                        result = metadata;
                        _vala_iterable_unref0 (_metadata_list);
                        return result;
                  }
                  _vala_gir_parser_metadata_unref0 (metadata);
            }
            _vala_iterable_unref0 (_metadata_list);
      }
      result = NULL;
      return result;
}


static ValaGirParserMetadata* vala_gir_parser_metadata_match_child (ValaGirParserMetadata* self, const gchar* name, ValaGirParserMetadataType type) {
      ValaGirParserMetadata* result = NULL;
      ValaGirParserMetadata* _tmp0_ = NULL;
      ValaGirParserMetadata* _tmp1_;
      ValaGirParserMetadata* _result_;
      g_return_val_if_fail (self != NULL, NULL);
      g_return_val_if_fail (name != NULL, NULL);
      _tmp0_ = vala_gir_parser_metadata_get_empty ();
      _tmp1_ = _vala_gir_parser_metadata_ref0 (_tmp0_);
      _result_ = _tmp1_;
      {
            ValaArrayList* _tmp2_;
            ValaArrayList* _metadata_list;
            gint _tmp3_;
            gint _metadata_size;
            gint _metadata_index;
            _tmp2_ = _vala_iterable_ref0 (self->children);
            _metadata_list = _tmp2_;
            _tmp3_ = vala_collection_get_size ((ValaCollection*) _metadata_list);
            _metadata_size = _tmp3_;
            _metadata_index = -1;
            while (TRUE) {
                  gpointer _tmp4_ = NULL;
                  ValaGirParserMetadata* metadata;
                  gboolean _tmp5_ = FALSE;
                  _metadata_index = _metadata_index + 1;
                  if (!(_metadata_index < _metadata_size)) {
                        break;
                  }
                  _tmp4_ = vala_list_get ((ValaList*) _metadata_list, _metadata_index);
                  metadata = (ValaGirParserMetadata*) _tmp4_;
                  if (metadata->type == type) {
                        gboolean _tmp6_;
                        _tmp6_ = g_pattern_match_string (metadata->pattern_spec, name);
                        _tmp5_ = _tmp6_;
                  } else {
                        _tmp5_ = FALSE;
                  }
                  if (_tmp5_) {
                        ValaGirParserMetadata* _tmp7_ = NULL;
                        metadata->used = TRUE;
                        _tmp7_ = vala_gir_parser_metadata_get_empty ();
                        if (_result_ == _tmp7_) {
                              ValaGirParserMetadata* _tmp8_;
                              _tmp8_ = _vala_gir_parser_metadata_ref0 (metadata);
                              _vala_gir_parser_metadata_unref0 (_result_);
                              _result_ = _tmp8_;
                        } else {
                              ValaGirParserMetadata* _tmp9_;
                              ValaGirParserMetadataSet* _tmp10_;
                              ValaGirParserMetadataSet* ms;
                              ValaGirParserMetadata* _tmp12_;
                              _tmp9_ = _result_;
                              _tmp10_ = _vala_gir_parser_metadata_ref0 (VALA_GIR_PARSER_IS_METADATA_SET (_tmp9_) ? ((ValaGirParserMetadataSet*) _tmp9_) : NULL);
                              ms = _tmp10_;
                              if (ms == NULL) {
                                    ValaGirParserMetadataSet* _tmp11_ = NULL;
                                    _tmp11_ = vala_gir_parser_metadata_set_new (type);
                                    _vala_gir_parser_metadata_unref0 (ms);
                                    ms = _tmp11_;
                                    vala_gir_parser_metadata_set_add_sibling (ms, _result_);
                              }
                              vala_gir_parser_metadata_set_add_sibling (ms, metadata);
                              _tmp12_ = _vala_gir_parser_metadata_ref0 ((ValaGirParserMetadata*) ms);
                              _vala_gir_parser_metadata_unref0 (_result_);
                              _result_ = _tmp12_;
                              _vala_gir_parser_metadata_unref0 (ms);
                        }
                  }
                  _vala_gir_parser_metadata_unref0 (metadata);
            }
            _vala_iterable_unref0 (_metadata_list);
      }
      result = _result_;
      return result;
}


static void vala_gir_parser_metadata_add_argument (ValaGirParserMetadata* self, ValaGirParserArgumentType key, ValaGirParserArgument* value) {
      g_return_if_fail (self != NULL);
      g_return_if_fail (value != NULL);
      vala_map_set (self->args, GINT_TO_POINTER (key), value);
}


static gboolean vala_gir_parser_metadata_has_argument (ValaGirParserMetadata* self, ValaGirParserArgumentType key) {
      gboolean result = FALSE;
      gboolean _tmp0_;
      g_return_val_if_fail (self != NULL, FALSE);
      _tmp0_ = vala_map_contains (self->args, GINT_TO_POINTER (key));
      result = _tmp0_;
      return result;
}


static ValaExpression* vala_gir_parser_metadata_get_expression (ValaGirParserMetadata* self, ValaGirParserArgumentType arg) {
      ValaExpression* result = NULL;
      gpointer _tmp0_ = NULL;
      ValaGirParserArgument* val;
      g_return_val_if_fail (self != NULL, NULL);
      _tmp0_ = vala_map_get (self->args, GINT_TO_POINTER (arg));
      val = (ValaGirParserArgument*) _tmp0_;
      if (val != NULL) {
            ValaExpression* _tmp1_;
            val->used = TRUE;
            _tmp1_ = _vala_code_node_ref0 (val->expression);
            result = _tmp1_;
            _vala_gir_parser_argument_unref0 (val);
            return result;
      }
      result = NULL;
      _vala_gir_parser_argument_unref0 (val);
      return result;
}


static gchar* vala_gir_parser_metadata_get_string (ValaGirParserMetadata* self, ValaGirParserArgumentType arg) {
      gchar* result = NULL;
      ValaExpression* _tmp0_ = NULL;
      ValaExpression* _tmp1_;
      ValaStringLiteral* lit;
      g_return_val_if_fail (self != NULL, NULL);
      _tmp0_ = vala_gir_parser_metadata_get_expression (self, arg);
      _tmp1_ = _tmp0_;
      lit = VALA_IS_STRING_LITERAL (_tmp1_) ? ((ValaStringLiteral*) _tmp1_) : NULL;
      if (lit != NULL) {
            gchar* _tmp2_ = NULL;
            _tmp2_ = vala_string_literal_eval (lit);
            result = _tmp2_;
            _vala_code_node_unref0 (lit);
            return result;
      }
      result = NULL;
      _vala_code_node_unref0 (lit);
      return result;
}


static gint vala_gir_parser_metadata_get_integer (ValaGirParserMetadata* self, ValaGirParserArgumentType arg) {
      gint result = 0;
      ValaExpression* _tmp0_ = NULL;
      ValaExpression* _tmp1_;
      ValaIntegerLiteral* lit;
      g_return_val_if_fail (self != NULL, 0);
      _tmp0_ = vala_gir_parser_metadata_get_expression (self, arg);
      _tmp1_ = _tmp0_;
      lit = VALA_IS_INTEGER_LITERAL (_tmp1_) ? ((ValaIntegerLiteral*) _tmp1_) : NULL;
      if (lit != NULL) {
            const gchar* _tmp2_ = NULL;
            gint _tmp3_;
            _tmp2_ = vala_integer_literal_get_value (lit);
            _tmp3_ = atoi (_tmp2_);
            result = _tmp3_;
            _vala_code_node_unref0 (lit);
            return result;
      }
      result = 0;
      _vala_code_node_unref0 (lit);
      return result;
}


static gboolean vala_gir_parser_metadata_get_bool (ValaGirParserMetadata* self, ValaGirParserArgumentType arg) {
      gboolean result = FALSE;
      ValaExpression* _tmp0_ = NULL;
      ValaExpression* _tmp1_;
      ValaBooleanLiteral* lit;
      g_return_val_if_fail (self != NULL, FALSE);
      _tmp0_ = vala_gir_parser_metadata_get_expression (self, arg);
      _tmp1_ = _tmp0_;
      lit = VALA_IS_BOOLEAN_LITERAL (_tmp1_) ? ((ValaBooleanLiteral*) _tmp1_) : NULL;
      if (lit != NULL) {
            gboolean _tmp2_;
            _tmp2_ = vala_boolean_literal_get_value (lit);
            result = _tmp2_;
            _vala_code_node_unref0 (lit);
            return result;
      }
      result = FALSE;
      _vala_code_node_unref0 (lit);
      return result;
}


static ValaSourceReference* vala_gir_parser_metadata_get_source_reference (ValaGirParserMetadata* self, ValaGirParserArgumentType arg) {
      ValaSourceReference* result = NULL;
      gpointer _tmp0_ = NULL;
      ValaGirParserArgument* val;
      g_return_val_if_fail (self != NULL, NULL);
      _tmp0_ = vala_map_get (self->args, GINT_TO_POINTER (arg));
      val = (ValaGirParserArgument*) _tmp0_;
      if (val != NULL) {
            ValaSourceReference* _tmp1_;
            _tmp1_ = _vala_source_reference_ref0 (val->source_reference);
            result = _tmp1_;
            _vala_gir_parser_argument_unref0 (val);
            return result;
      }
      result = NULL;
      _vala_gir_parser_argument_unref0 (val);
      return result;
}


static ValaGirParserMetadata* vala_gir_parser_metadata_get_empty (void) {
      ValaGirParserMetadata* result;
      if (vala_gir_parser_metadata__empty == NULL) {
            ValaGirParserMetadata* _tmp0_ = NULL;
            _tmp0_ = vala_gir_parser_metadata_new ("", VALA_GIR_PARSER_METADATA_TYPE_GENERIC, NULL);
            _vala_gir_parser_metadata_unref0 (vala_gir_parser_metadata__empty);
            vala_gir_parser_metadata__empty = _tmp0_;
      }
      result = vala_gir_parser_metadata__empty;
      return result;
}


static void vala_gir_parser_value_metadata_init (GValue* value) {
      value->data[0].v_pointer = NULL;
}


static void vala_gir_parser_value_metadata_free_value (GValue* value) {
      if (value->data[0].v_pointer) {
            vala_gir_parser_metadata_unref (value->data[0].v_pointer);
      }
}


static void vala_gir_parser_value_metadata_copy_value (const GValue* src_value, GValue* dest_value) {
      if (src_value->data[0].v_pointer) {
            dest_value->data[0].v_pointer = vala_gir_parser_metadata_ref (src_value->data[0].v_pointer);
      } else {
            dest_value->data[0].v_pointer = NULL;
      }
}


static gpointer vala_gir_parser_value_metadata_peek_pointer (const GValue* value) {
      return value->data[0].v_pointer;
}


static gchar* vala_gir_parser_value_metadata_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
      if (collect_values[0].v_pointer) {
            ValaGirParserMetadata* object;
            object = collect_values[0].v_pointer;
            if (object->parent_instance.g_class == NULL) {
                  return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
            } else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) {
                  return g_strconcat ("invalid object type `", g_type_name (G_TYPE_FROM_INSTANCE (object)), "' for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
            }
            value->data[0].v_pointer = vala_gir_parser_metadata_ref (object);
      } else {
            value->data[0].v_pointer = NULL;
      }
      return NULL;
}


static gchar* vala_gir_parser_value_metadata_lcopy_value (const GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
      ValaGirParserMetadata** object_p;
      object_p = collect_values[0].v_pointer;
      if (!object_p) {
            return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value));
      }
      if (!value->data[0].v_pointer) {
            *object_p = NULL;
      } else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) {
            *object_p = value->data[0].v_pointer;
      } else {
            *object_p = vala_gir_parser_metadata_ref (value->data[0].v_pointer);
      }
      return NULL;
}


static GParamSpec* vala_gir_parser_param_spec_metadata (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) {
      ValaGirParserParamSpecMetadata* spec;
      g_return_val_if_fail (g_type_is_a (object_type, VALA_GIR_PARSER_TYPE_METADATA), NULL);
      spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags);
      G_PARAM_SPEC (spec)->value_type = object_type;
      return G_PARAM_SPEC (spec);
}


static gpointer vala_gir_parser_value_get_metadata (const GValue* value) {
      g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, VALA_GIR_PARSER_TYPE_METADATA), NULL);
      return value->data[0].v_pointer;
}


static void vala_gir_parser_value_set_metadata (GValue* value, gpointer v_object) {
      ValaGirParserMetadata* old;
      g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, VALA_GIR_PARSER_TYPE_METADATA));
      old = value->data[0].v_pointer;
      if (v_object) {
            g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, VALA_GIR_PARSER_TYPE_METADATA));
            g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
            value->data[0].v_pointer = v_object;
            vala_gir_parser_metadata_ref (value->data[0].v_pointer);
      } else {
            value->data[0].v_pointer = NULL;
      }
      if (old) {
            vala_gir_parser_metadata_unref (old);
      }
}


static void vala_gir_parser_value_take_metadata (GValue* value, gpointer v_object) {
      ValaGirParserMetadata* old;
      g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, VALA_GIR_PARSER_TYPE_METADATA));
      old = value->data[0].v_pointer;
      if (v_object) {
            g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, VALA_GIR_PARSER_TYPE_METADATA));
            g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
            value->data[0].v_pointer = v_object;
      } else {
            value->data[0].v_pointer = NULL;
      }
      if (old) {
            vala_gir_parser_metadata_unref (old);
      }
}


static void vala_gir_parser_metadata_class_init (ValaGirParserMetadataClass * klass) {
      vala_gir_parser_metadata_parent_class = g_type_class_peek_parent (klass);
      VALA_GIR_PARSER_METADATA_CLASS (klass)->finalize = vala_gir_parser_metadata_finalize;
}


static void vala_gir_parser_metadata_instance_init (ValaGirParserMetadata * self) {
      ValaHashMap* _tmp0_ = NULL;
      ValaArrayList* _tmp1_ = NULL;
      self->used = FALSE;
      _tmp0_ = vala_hash_map_new (VALA_GIR_PARSER_TYPE_ARGUMENT_TYPE, NULL, NULL, VALA_GIR_PARSER_TYPE_ARGUMENT, (GBoxedCopyFunc) vala_gir_parser_argument_ref, vala_gir_parser_argument_unref, g_direct_hash, g_direct_equal, g_direct_equal);
      self->args = (ValaMap*) _tmp0_;
      _tmp1_ = vala_array_list_new (VALA_GIR_PARSER_TYPE_METADATA, (GBoxedCopyFunc) vala_gir_parser_metadata_ref, vala_gir_parser_metadata_unref, g_direct_equal);
      self->children = _tmp1_;
      self->ref_count = 1;
}


static void vala_gir_parser_metadata_finalize (ValaGirParserMetadata* obj) {
      ValaGirParserMetadata * self;
      self = VALA_GIR_PARSER_METADATA (obj);
      _g_free0 (self->pattern);
      _g_pattern_spec_free0 (self->pattern_spec);
      _vala_source_reference_unref0 (self->source_reference);
      _vala_map_unref0 (self->args);
      _vala_iterable_unref0 (self->children);
}


static GType vala_gir_parser_metadata_get_type (void) {
      static volatile gsize vala_gir_parser_metadata_type_id__volatile = 0;
      if (g_once_init_enter (&vala_gir_parser_metadata_type_id__volatile)) {
            static const GTypeValueTable g_define_type_value_table = { vala_gir_parser_value_metadata_init, vala_gir_parser_value_metadata_free_value, vala_gir_parser_value_metadata_copy_value, vala_gir_parser_value_metadata_peek_pointer, "p", vala_gir_parser_value_metadata_collect_value, "p", vala_gir_parser_value_metadata_lcopy_value };
            static const GTypeInfo g_define_type_info = { sizeof (ValaGirParserMetadataClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) vala_gir_parser_metadata_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ValaGirParserMetadata), 0, (GInstanceInitFunc) vala_gir_parser_metadata_instance_init, &g_define_type_value_table };
            static const GTypeFundamentalInfo g_define_type_fundamental_info = { (G_TYPE_FLAG_CLASSED | G_TYPE_FLAG_INSTANTIATABLE | G_TYPE_FLAG_DERIVABLE | G_TYPE_FLAG_DEEP_DERIVABLE) };
            GType vala_gir_parser_metadata_type_id;
            vala_gir_parser_metadata_type_id = g_type_register_fundamental (g_type_fundamental_next (), "ValaGirParserMetadata", &g_define_type_info, &g_define_type_fundamental_info, 0);
            g_once_init_leave (&vala_gir_parser_metadata_type_id__volatile, vala_gir_parser_metadata_type_id);
      }
      return vala_gir_parser_metadata_type_id__volatile;
}


static gpointer vala_gir_parser_metadata_ref (gpointer instance) {
      ValaGirParserMetadata* self;
      self = instance;
      g_atomic_int_inc (&self->ref_count);
      return instance;
}


static void vala_gir_parser_metadata_unref (gpointer instance) {
      ValaGirParserMetadata* self;
      self = instance;
      if (g_atomic_int_dec_and_test (&self->ref_count)) {
            VALA_GIR_PARSER_METADATA_GET_CLASS (self)->finalize (self);
            g_type_free_instance ((GTypeInstance *) self);
      }
}


static ValaGirParserMetadataParser* vala_gir_parser_metadata_parser_construct (GType object_type) {
      ValaGirParserMetadataParser* self = NULL;
      self = (ValaGirParserMetadataParser*) g_type_create_instance (object_type);
      self->priv->tree->used = TRUE;
      return self;
}


static ValaGirParserMetadataParser* vala_gir_parser_metadata_parser_new (void) {
      return vala_gir_parser_metadata_parser_construct (VALA_GIR_PARSER_TYPE_METADATA_PARSER);
}


static ValaSourceReference* vala_gir_parser_metadata_parser_get_current_src (ValaGirParserMetadataParser* self) {
      ValaSourceReference* result = NULL;
      ValaSourceFile* _tmp0_ = NULL;
      ValaSourceReference* _tmp1_ = NULL;
      g_return_val_if_fail (self != NULL, NULL);
      _tmp0_ = vala_scanner_get_source_file (self->priv->scanner);
      _tmp1_ = vala_source_reference_new (_tmp0_, self->priv->begin.line, self->priv->begin.column, self->priv->end.line, self->priv->end.column);
      result = _tmp1_;
      return result;
}


static ValaSourceReference* vala_gir_parser_metadata_parser_get_src (ValaGirParserMetadataParser* self, ValaSourceLocation* begin) {
      ValaSourceReference* result = NULL;
      ValaSourceFile* _tmp0_ = NULL;
      ValaSourceReference* _tmp1_ = NULL;
      g_return_val_if_fail (self != NULL, NULL);
      _tmp0_ = vala_scanner_get_source_file (self->priv->scanner);
      _tmp1_ = vala_source_reference_new (_tmp0_, (*begin).line, (*begin).column, self->priv->end.line, self->priv->end.column);
      result = _tmp1_;
      return result;
}


static ValaGirParserMetadata* vala_gir_parser_metadata_parser_parse_metadata (ValaGirParserMetadataParser* self, ValaSourceFile* metadata_file) {
      ValaGirParserMetadata* result = NULL;
      ValaScanner* _tmp0_ = NULL;
      ValaGirParserMetadata* _tmp4_;
      g_return_val_if_fail (self != NULL, NULL);
      g_return_val_if_fail (metadata_file != NULL, NULL);
      _tmp0_ = vala_scanner_new (metadata_file);
      _vala_scanner_unref0 (self->priv->scanner);
      self->priv->scanner = _tmp0_;
      vala_gir_parser_metadata_parser_next (self);
      while (TRUE) {
            gboolean _tmp1_;
            if (!(self->priv->current != VALA_TOKEN_TYPE_EOF)) {
                  break;
            }
            _tmp1_ = vala_gir_parser_metadata_parser_parse_rule (self);
            if (!_tmp1_) {
                  ValaGirParserMetadata* _tmp2_ = NULL;
                  ValaGirParserMetadata* _tmp3_;
                  _tmp2_ = vala_gir_parser_metadata_get_empty ();
                  _tmp3_ = _vala_gir_parser_metadata_ref0 (_tmp2_);
                  result = _tmp3_;
                  return result;
            }
      }
      _tmp4_ = _vala_gir_parser_metadata_ref0 (self->priv->tree);
      result = _tmp4_;
      return result;
}


static ValaTokenType vala_gir_parser_metadata_parser_next (ValaGirParserMetadataParser* self) {
      ValaTokenType result = 0;
      ValaSourceLocation _tmp0_ = {0};
      ValaSourceLocation _tmp1_ = {0};
      ValaTokenType _tmp2_;
      g_return_val_if_fail (self != NULL, 0);
      self->priv->old_end = self->priv->end;
      _tmp2_ = vala_scanner_read_token (self->priv->scanner, &_tmp0_, &_tmp1_);
      self->priv->begin = _tmp0_;
      self->priv->end = _tmp1_;
      self->priv->current = _tmp2_;
      result = self->priv->current;
      return result;
}


static gboolean vala_gir_parser_metadata_parser_has_space (ValaGirParserMetadataParser* self) {
      gboolean result = FALSE;
      g_return_val_if_fail (self != NULL, FALSE);
      result = self->priv->old_end.pos != self->priv->begin.pos;
      return result;
}


static gboolean vala_gir_parser_metadata_parser_has_newline (ValaGirParserMetadataParser* self) {
      gboolean result = FALSE;
      g_return_val_if_fail (self != NULL, FALSE);
      result = self->priv->old_end.line != self->priv->begin.line;
      return result;
}


static gchar* vala_gir_parser_metadata_parser_get_string (ValaGirParserMetadataParser* self) {
      gchar* result = NULL;
      gchar* _tmp0_ = NULL;
      g_return_val_if_fail (self != NULL, NULL);
      _tmp0_ = string_substring ((const gchar*) self->priv->begin.pos, (glong) 0, (glong) ((gint) (self->priv->end.pos - self->priv->begin.pos)));
      result = _tmp0_;
      return result;
}


static ValaGirParserMetadataType* _vala_gir_parser_metadata_type_dup (ValaGirParserMetadataType* self) {
      ValaGirParserMetadataType* dup;
      dup = g_new0 (ValaGirParserMetadataType, 1);
      memcpy (dup, self, sizeof (ValaGirParserMetadataType));
      return dup;
}


static gpointer __vala_gir_parser_metadata_type_dup0 (gpointer self) {
      return self ? _vala_gir_parser_metadata_type_dup (self) : NULL;
}


static ValaGirParserMetadataType* vala_gir_parser_metadata_parser_parse_metadata_access (ValaGirParserMetadataParser* self) {
      ValaGirParserMetadataType* result = NULL;
      g_return_val_if_fail (self != NULL, NULL);
      switch (self->priv->current) {
            case VALA_TOKEN_TYPE_DOT:
            {
                  ValaGirParserMetadataType _tmp0_;
                  ValaGirParserMetadataType* _tmp1_;
                  vala_gir_parser_metadata_parser_next (self);
                  _tmp0_ = VALA_GIR_PARSER_METADATA_TYPE_GENERIC;
                  _tmp1_ = __vala_gir_parser_metadata_type_dup0 (&_tmp0_);
                  result = _tmp1_;
                  return result;
            }
            case VALA_TOKEN_TYPE_COLON:
            {
                  ValaTokenType _tmp2_;
                  ValaGirParserMetadataType _tmp5_;
                  ValaGirParserMetadataType* _tmp6_;
                  _tmp2_ = vala_gir_parser_metadata_parser_next (self);
                  if (_tmp2_ == VALA_TOKEN_TYPE_COLON) {
                        ValaGirParserMetadataType _tmp3_;
                        ValaGirParserMetadataType* _tmp4_;
                        vala_gir_parser_metadata_parser_next (self);
                        _tmp3_ = VALA_GIR_PARSER_METADATA_TYPE_SIGNAL;
                        _tmp4_ = __vala_gir_parser_metadata_type_dup0 (&_tmp3_);
                        result = _tmp4_;
                        return result;
                  }
                  _tmp5_ = VALA_GIR_PARSER_METADATA_TYPE_PROPERTY;
                  _tmp6_ = __vala_gir_parser_metadata_type_dup0 (&_tmp5_);
                  result = _tmp6_;
                  return result;
            }
            default:
            {
                  result = NULL;
                  return result;
            }
      }
}


static gchar* vala_gir_parser_metadata_parser_parse_identifier (ValaGirParserMetadataParser* self, ValaSourceReference** source_reference, gboolean is_glob) {
      ValaSourceReference* _source_reference = NULL;
      gchar* result = NULL;
      ValaSourceLocation begin;
      GString* _tmp0_ = NULL;
      GString* builder;
      gchar* _tmp10_;
      g_return_val_if_fail (self != NULL, NULL);
      begin = self->priv->begin;
      _tmp0_ = g_string_new ("");
      builder = _tmp0_;
      {
            gboolean _tmp1_;
            _tmp1_ = TRUE;
            while (TRUE) {
                  gboolean _tmp3_ = FALSE;
                  ValaSourceReference* _tmp5_ = NULL;
                  if (!_tmp1_) {
                        gboolean _tmp2_;
                        _tmp2_ = vala_gir_parser_metadata_parser_has_space (self);
                        if (!(!_tmp2_)) {
                              break;
                        }
                  }
                  _tmp1_ = FALSE;
                  if (is_glob) {
                        _tmp3_ = self->priv->current == VALA_TOKEN_TYPE_STAR;
                  } else {
                        _tmp3_ = FALSE;
                  }
                  if (_tmp3_) {
                        g_string_append_c (builder, '*');
                  } else {
                        gchar* str;
                        str = NULL;
                        switch (self->priv->current) {
                              case VALA_TOKEN_TYPE_IDENTIFIER:
                              case VALA_TOKEN_TYPE_UNOWNED:
                              case VALA_TOKEN_TYPE_OWNED:
                              case VALA_TOKEN_TYPE_GET:
                              case VALA_TOKEN_TYPE_NEW:
                              case VALA_TOKEN_TYPE_DEFAULT:
                              case VALA_TOKEN_TYPE_OUT:
                              case VALA_TOKEN_TYPE_REF:
                              case VALA_TOKEN_TYPE_VIRTUAL:
                              case VALA_TOKEN_TYPE_ABSTRACT:
                              {
                                    gchar* _tmp4_ = NULL;
                                    _tmp4_ = vala_gir_parser_metadata_parser_get_string (self);
                                    _g_free0 (str);
                                    str = _tmp4_;
                                    break;
                              }
                              default:
                              break;
                        }
                        if (str == NULL) {
                              _g_free0 (str);
                              break;
                        }
                        g_string_append (builder, str);
                        _g_free0 (str);
                  }
                  _tmp5_ = vala_gir_parser_metadata_parser_get_src (self, &begin);
                  _vala_source_reference_unref0 (_source_reference);
                  _source_reference = _tmp5_;
                  vala_gir_parser_metadata_parser_next (self);
            }
      }
      if (g_strcmp0 (builder->str, "") == 0) {
            if (is_glob) {
                  ValaSourceReference* _tmp6_ = NULL;
                  ValaSourceReference* _tmp7_;
                  _tmp6_ = vala_gir_parser_metadata_parser_get_src (self, &begin);
                  _tmp7_ = _tmp6_;
                  vala_report_error (_tmp7_, "expected pattern");
                  _vala_source_reference_unref0 (_tmp7_);
            } else {
                  ValaSourceReference* _tmp8_ = NULL;
                  ValaSourceReference* _tmp9_;
                  _tmp8_ = vala_gir_parser_metadata_parser_get_src (self, &begin);
                  _tmp9_ = _tmp8_;
                  vala_report_error (_tmp9_, "expected identifier");
                  _vala_source_reference_unref0 (_tmp9_);
            }
            result = NULL;
            _g_string_free0 (builder);
            if (source_reference) {
                  *source_reference = _source_reference;
            } else {
                  _vala_source_reference_unref0 (_source_reference);
            }
            return result;
      }
      _tmp10_ = g_strdup (builder->str);
      result = _tmp10_;
      _g_string_free0 (builder);
      if (source_reference) {
            *source_reference = _source_reference;
      } else {
            _vala_source_reference_unref0 (_source_reference);
      }
      return result;
}


static ValaGirParserMetadata* vala_gir_parser_metadata_parser_parse_pattern (ValaGirParserMetadataParser* self) {
      ValaGirParserMetadata* result = NULL;
      ValaGirParserMetadata* metadata = NULL;
      gboolean is_relative;
      ValaGirParserMetadataType _tmp0_;
      ValaGirParserMetadataType* _tmp1_;
      ValaGirParserMetadataType* type;
      gboolean _tmp2_ = FALSE;
      ValaSourceReference* src = NULL;
      ValaSourceReference* _tmp9_ = NULL;
      gchar* _tmp10_ = NULL;
      gchar* pattern;
      ValaGirParserMetadata* _tmp11_ = NULL;
      g_return_val_if_fail (self != NULL, NULL);
      is_relative = FALSE;
      _tmp0_ = VALA_GIR_PARSER_METADATA_TYPE_GENERIC;
      _tmp1_ = __vala_gir_parser_metadata_type_dup0 (&_tmp0_);
      type = _tmp1_;
      if (self->priv->current == VALA_TOKEN_TYPE_IDENTIFIER) {
            _tmp2_ = TRUE;
      } else {
            _tmp2_ = self->priv->current == VALA_TOKEN_TYPE_STAR;
      }
      if (_tmp2_) {
            ValaGirParserMetadata* _tmp3_;
            _tmp3_ = _vala_gir_parser_metadata_ref0 (self->priv->tree);
            _vala_gir_parser_metadata_unref0 (self->priv->parent_metadata);
            self->priv->parent_metadata = _tmp3_;
      } else {
            ValaGirParserMetadataType* _tmp4_ = NULL;
            _tmp4_ = vala_gir_parser_metadata_parser_parse_metadata_access (self);
            _g_free0 (type);
            type = _tmp4_;
            is_relative = TRUE;
      }
      if (type == NULL) {
            ValaSourceReference* _tmp5_ = NULL;
            ValaSourceReference* _tmp6_;
            _tmp5_ = vala_gir_parser_metadata_parser_get_current_src (self);
            _tmp6_ = _tmp5_;
            vala_report_error (_tmp6_, "expected pattern, `.', `:' or `::'");
            _vala_source_reference_unref0 (_tmp6_);
            result = NULL;
            _g_free0 (type);
            _vala_gir_parser_metadata_unref0 (metadata);
            return result;
      }
      if (self->priv->parent_metadata == NULL) {
            ValaSourceReference* _tmp7_ = NULL;
            ValaSourceReference* _tmp8_;
            _tmp7_ = vala_gir_parser_metadata_parser_get_current_src (self);
            _tmp8_ = _tmp7_;
            vala_report_error (_tmp8_, "cannot determinate parent metadata");
            _vala_source_reference_unref0 (_tmp8_);
            result = NULL;
            _g_free0 (type);
            _vala_gir_parser_metadata_unref0 (metadata);
            return result;
      }
      _tmp10_ = vala_gir_parser_metadata_parser_parse_identifier (self, &_tmp9_, TRUE);
      _vala_source_reference_unref0 (src);
      src = _tmp9_;
      pattern = _tmp10_;
      if (pattern == NULL) {
            result = NULL;
            _g_free0 (pattern);
            _vala_source_reference_unref0 (src);
            _g_free0 (type);
            _vala_gir_parser_metadata_unref0 (metadata);
            return result;
      }
      _tmp11_ = vala_gir_parser_metadata_get_child (self->priv->parent_metadata, pattern, *type);
      _vala_gir_parser_metadata_unref0 (metadata);
      metadata = _tmp11_;
      if (metadata == NULL) {
            ValaGirParserMetadata* _tmp12_ = NULL;
            _tmp12_ = vala_gir_parser_metadata_new (pattern, *type, src);
            _vala_gir_parser_metadata_unref0 (metadata);
            metadata = _tmp12_;
            vala_gir_parser_metadata_add_child (self->priv->parent_metadata, metadata);
      }
      while (TRUE) {
            gboolean _tmp13_ = FALSE;
            ValaGirParserMetadataType* _tmp15_ = NULL;
            ValaSourceReference* _tmp18_ = NULL;
            gchar* _tmp19_ = NULL;
            ValaGirParserMetadata* _tmp20_ = NULL;
            ValaGirParserMetadata* child;
            ValaGirParserMetadata* _tmp22_;
            if (self->priv->current != VALA_TOKEN_TYPE_EOF) {
                  gboolean _tmp14_;
                  _tmp14_ = vala_gir_parser_metadata_parser_has_space (self);
                  _tmp13_ = !_tmp14_;
            } else {
                  _tmp13_ = FALSE;
            }
            if (!_tmp13_) {
                  break;
            }
            _tmp15_ = vala_gir_parser_metadata_parser_parse_metadata_access (self);
            _g_free0 (type);
            type = _tmp15_;
            if (type == NULL) {
                  ValaSourceReference* _tmp16_ = NULL;
                  ValaSourceReference* _tmp17_;
                  _tmp16_ = vala_gir_parser_metadata_parser_get_current_src (self);
                  _tmp17_ = _tmp16_;
                  vala_report_error (_tmp17_, "expected `.', `:' or `::'");
                  _vala_source_reference_unref0 (_tmp17_);
                  result = NULL;
                  _g_free0 (pattern);
                  _vala_source_reference_unref0 (src);
                  _g_free0 (type);
                  _vala_gir_parser_metadata_unref0 (metadata);
                  return result;
            }
            _tmp19_ = vala_gir_parser_metadata_parser_parse_identifier (self, &_tmp18_, TRUE);
            _vala_source_reference_unref0 (src);
            src = _tmp18_;
            _g_free0 (pattern);
            pattern = _tmp19_;
            if (pattern == NULL) {
                  result = NULL;
                  _g_free0 (pattern);
                  _vala_source_reference_unref0 (src);
                  _g_free0 (type);
                  _vala_gir_parser_metadata_unref0 (metadata);
                  return result;
            }
            _tmp20_ = vala_gir_parser_metadata_get_child (metadata, pattern, *type);
            child = _tmp20_;
            if (child == NULL) {
                  ValaGirParserMetadata* _tmp21_ = NULL;
                  _tmp21_ = vala_gir_parser_metadata_new (pattern, *type, src);
                  _vala_gir_parser_metadata_unref0 (child);
                  child = _tmp21_;
                  vala_gir_parser_metadata_add_child (metadata, child);
            }
            _tmp22_ = _vala_gir_parser_metadata_ref0 (child);
            _vala_gir_parser_metadata_unref0 (metadata);
            metadata = _tmp22_;
            _vala_gir_parser_metadata_unref0 (child);
      }
      if (!is_relative) {
            ValaGirParserMetadata* _tmp23_;
            _tmp23_ = _vala_gir_parser_metadata_ref0 (metadata);
            _vala_gir_parser_metadata_unref0 (self->priv->parent_metadata);
            self->priv->parent_metadata = _tmp23_;
      }
      result = metadata;
      _g_free0 (pattern);
      _vala_source_reference_unref0 (src);
      _g_free0 (type);
      return result;
}


static ValaExpression* vala_gir_parser_metadata_parser_parse_literal (ValaGirParserMetadataParser* self) {
      ValaExpression* result = NULL;
      ValaSourceReference* _tmp0_ = NULL;
      ValaSourceReference* src;
      ValaExpression* expr;
      g_return_val_if_fail (self != NULL, NULL);
      _tmp0_ = vala_gir_parser_metadata_parser_get_current_src (self);
      src = _tmp0_;
      expr = NULL;
      switch (self->priv->current) {
            case VALA_TOKEN_TYPE_TRUE:
            {
                  ValaBooleanLiteral* _tmp1_ = NULL;
                  _tmp1_ = vala_boolean_literal_new (TRUE, src);
                  _vala_code_node_unref0 (expr);
                  expr = (ValaExpression*) _tmp1_;
                  break;
            }
            case VALA_TOKEN_TYPE_FALSE:
            {
                  ValaBooleanLiteral* _tmp2_ = NULL;
                  _tmp2_ = vala_boolean_literal_new (FALSE, src);
                  _vala_code_node_unref0 (expr);
                  expr = (ValaExpression*) _tmp2_;
                  break;
            }
            case VALA_TOKEN_TYPE_INTEGER_LITERAL:
            {
                  gchar* _tmp3_ = NULL;
                  gchar* _tmp4_;
                  ValaIntegerLiteral* _tmp5_ = NULL;
                  _tmp3_ = vala_gir_parser_metadata_parser_get_string (self);
                  _tmp4_ = _tmp3_;
                  _tmp5_ = vala_integer_literal_new (_tmp4_, src);
                  _vala_code_node_unref0 (expr);
                  expr = (ValaExpression*) _tmp5_;
                  _g_free0 (_tmp4_);
                  break;
            }
            case VALA_TOKEN_TYPE_REAL_LITERAL:
            {
                  gchar* _tmp6_ = NULL;
                  gchar* _tmp7_;
                  ValaRealLiteral* _tmp8_ = NULL;
                  _tmp6_ = vala_gir_parser_metadata_parser_get_string (self);
                  _tmp7_ = _tmp6_;
                  _tmp8_ = vala_real_literal_new (_tmp7_, src);
                  _vala_code_node_unref0 (expr);
                  expr = (ValaExpression*) _tmp8_;
                  _g_free0 (_tmp7_);
                  break;
            }
            case VALA_TOKEN_TYPE_STRING_LITERAL:
            {
                  gchar* _tmp9_ = NULL;
                  gchar* _tmp10_;
                  ValaStringLiteral* _tmp11_ = NULL;
                  _tmp9_ = vala_gir_parser_metadata_parser_get_string (self);
                  _tmp10_ = _tmp9_;
                  _tmp11_ = vala_string_literal_new (_tmp10_, src);
                  _vala_code_node_unref0 (expr);
                  expr = (ValaExpression*) _tmp11_;
                  _g_free0 (_tmp10_);
                  break;
            }
            default:
            {
                  vala_report_error (src, "expected literal");
                  break;
            }
      }
      vala_gir_parser_metadata_parser_next (self);
      result = expr;
      _vala_source_reference_unref0 (src);
      return result;
}


static gboolean vala_gir_parser_metadata_parser_parse_args (ValaGirParserMetadataParser* self, ValaGirParserMetadata* metadata) {
      gboolean result = FALSE;
      g_return_val_if_fail (self != NULL, FALSE);
      g_return_val_if_fail (metadata != NULL, FALSE);
      while (TRUE) {
            gboolean _tmp0_ = FALSE;
            gboolean _tmp1_ = FALSE;
            ValaSourceReference* src = NULL;
            ValaSourceReference* _tmp4_ = NULL;
            gchar* _tmp5_ = NULL;
            gchar* id;
            ValaGirParserArgumentType* _tmp6_ = NULL;
            ValaGirParserArgumentType* arg_type;
            ValaExpression* _tmp11_ = NULL;
            ValaExpression* expr;
            ValaGirParserArgument* _tmp12_ = NULL;
            ValaGirParserArgument* _tmp13_;
            if (self->priv->current != VALA_TOKEN_TYPE_EOF) {
                  gboolean _tmp2_;
                  _tmp2_ = vala_gir_parser_metadata_parser_has_space (self);
                  _tmp1_ = _tmp2_;
            } else {
                  _tmp1_ = FALSE;
            }
            if (_tmp1_) {
                  gboolean _tmp3_;
                  _tmp3_ = vala_gir_parser_metadata_parser_has_newline (self);
                  _tmp0_ = !_tmp3_;
            } else {
                  _tmp0_ = FALSE;
            }
            if (!_tmp0_) {
                  break;
            }
            _tmp5_ = vala_gir_parser_metadata_parser_parse_identifier (self, &_tmp4_, FALSE);
            _vala_source_reference_unref0 (src);
            src = _tmp4_;
            id = _tmp5_;
            if (id == NULL) {
                  result = FALSE;
                  _g_free0 (id);
                  _vala_source_reference_unref0 (src);
                  return result;
            }
            _tmp6_ = vala_gir_parser_argument_type_from_string (id);
            arg_type = _tmp6_;
            if (arg_type == NULL) {
                  vala_report_error (src, "unknown argument");
                  result = FALSE;
                  _g_free0 (arg_type);
                  _g_free0 (id);
                  _vala_source_reference_unref0 (src);
                  return result;
            }
            if (self->priv->current != VALA_TOKEN_TYPE_ASSIGN) {
                  ValaBooleanLiteral* _tmp7_ = NULL;
                  ValaBooleanLiteral* _tmp8_;
                  ValaGirParserArgument* _tmp9_ = NULL;
                  ValaGirParserArgument* _tmp10_;
                  _tmp7_ = vala_boolean_literal_new (TRUE, src);
                  _tmp8_ = _tmp7_;
                  _tmp9_ = vala_gir_parser_argument_new ((ValaExpression*) _tmp8_, src);
                  _tmp10_ = _tmp9_;
                  vala_gir_parser_metadata_add_argument (metadata, *arg_type, _tmp10_);
                  _vala_gir_parser_argument_unref0 (_tmp10_);
                  _vala_code_node_unref0 (_tmp8_);
                  _g_free0 (arg_type);
                  _g_free0 (id);
                  _vala_source_reference_unref0 (src);
                  continue;
            }
            vala_gir_parser_metadata_parser_next (self);
            _tmp11_ = vala_gir_parser_metadata_parser_parse_literal (self);
            expr = _tmp11_;
            if (expr == NULL) {
                  result = FALSE;
                  _vala_code_node_unref0 (expr);
                  _g_free0 (arg_type);
                  _g_free0 (id);
                  _vala_source_reference_unref0 (src);
                  return result;
            }
            _tmp12_ = vala_gir_parser_argument_new (expr, src);
            _tmp13_ = _tmp12_;
            vala_gir_parser_metadata_add_argument (metadata, *arg_type, _tmp13_);
            _vala_gir_parser_argument_unref0 (_tmp13_);
            _vala_code_node_unref0 (expr);
            _g_free0 (arg_type);
            _g_free0 (id);
            _vala_source_reference_unref0 (src);
      }
      result = TRUE;
      return result;
}


static gboolean vala_gir_parser_metadata_parser_parse_rule (ValaGirParserMetadataParser* self) {
      gboolean result = FALSE;
      ValaSourceLocation old_end;
      ValaGirParserMetadata* _tmp0_ = NULL;
      ValaGirParserMetadata* metadata;
      gboolean _tmp1_ = FALSE;
      gboolean _tmp2_;
      g_return_val_if_fail (self != NULL, FALSE);
      old_end = self->priv->end;
      _tmp0_ = vala_gir_parser_metadata_parser_parse_pattern (self);
      metadata = _tmp0_;
      if (metadata == NULL) {
            result = FALSE;
            _vala_gir_parser_metadata_unref0 (metadata);
            return result;
      }
      if (self->priv->current == VALA_TOKEN_TYPE_EOF) {
            _tmp1_ = TRUE;
      } else {
            _tmp1_ = old_end.line != self->priv->end.line;
      }
      if (_tmp1_) {
            result = TRUE;
            _vala_gir_parser_metadata_unref0 (metadata);
            return result;
      }
      _tmp2_ = vala_gir_parser_metadata_parser_parse_args (self, metadata);
      result = _tmp2_;
      _vala_gir_parser_metadata_unref0 (metadata);
      return result;
}


static void vala_gir_parser_value_metadata_parser_init (GValue* value) {
      value->data[0].v_pointer = NULL;
}


static void vala_gir_parser_value_metadata_parser_free_value (GValue* value) {
      if (value->data[0].v_pointer) {
            vala_gir_parser_metadata_parser_unref (value->data[0].v_pointer);
      }
}


static void vala_gir_parser_value_metadata_parser_copy_value (const GValue* src_value, GValue* dest_value) {
      if (src_value->data[0].v_pointer) {
            dest_value->data[0].v_pointer = vala_gir_parser_metadata_parser_ref (src_value->data[0].v_pointer);
      } else {
            dest_value->data[0].v_pointer = NULL;
      }
}


static gpointer vala_gir_parser_value_metadata_parser_peek_pointer (const GValue* value) {
      return value->data[0].v_pointer;
}


static gchar* vala_gir_parser_value_metadata_parser_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
      if (collect_values[0].v_pointer) {
            ValaGirParserMetadataParser* object;
            object = collect_values[0].v_pointer;
            if (object->parent_instance.g_class == NULL) {
                  return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
            } else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) {
                  return g_strconcat ("invalid object type `", g_type_name (G_TYPE_FROM_INSTANCE (object)), "' for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
            }
            value->data[0].v_pointer = vala_gir_parser_metadata_parser_ref (object);
      } else {
            value->data[0].v_pointer = NULL;
      }
      return NULL;
}


static gchar* vala_gir_parser_value_metadata_parser_lcopy_value (const GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
      ValaGirParserMetadataParser** object_p;
      object_p = collect_values[0].v_pointer;
      if (!object_p) {
            return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value));
      }
      if (!value->data[0].v_pointer) {
            *object_p = NULL;
      } else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) {
            *object_p = value->data[0].v_pointer;
      } else {
            *object_p = vala_gir_parser_metadata_parser_ref (value->data[0].v_pointer);
      }
      return NULL;
}


static GParamSpec* vala_gir_parser_param_spec_metadata_parser (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) {
      ValaGirParserParamSpecMetadataParser* spec;
      g_return_val_if_fail (g_type_is_a (object_type, VALA_GIR_PARSER_TYPE_METADATA_PARSER), NULL);
      spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags);
      G_PARAM_SPEC (spec)->value_type = object_type;
      return G_PARAM_SPEC (spec);
}


static gpointer vala_gir_parser_value_get_metadata_parser (const GValue* value) {
      g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, VALA_GIR_PARSER_TYPE_METADATA_PARSER), NULL);
      return value->data[0].v_pointer;
}


static void vala_gir_parser_value_set_metadata_parser (GValue* value, gpointer v_object) {
      ValaGirParserMetadataParser* old;
      g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, VALA_GIR_PARSER_TYPE_METADATA_PARSER));
      old = value->data[0].v_pointer;
      if (v_object) {
            g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, VALA_GIR_PARSER_TYPE_METADATA_PARSER));
            g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
            value->data[0].v_pointer = v_object;
            vala_gir_parser_metadata_parser_ref (value->data[0].v_pointer);
      } else {
            value->data[0].v_pointer = NULL;
      }
      if (old) {
            vala_gir_parser_metadata_parser_unref (old);
      }
}


static void vala_gir_parser_value_take_metadata_parser (GValue* value, gpointer v_object) {
      ValaGirParserMetadataParser* old;
      g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, VALA_GIR_PARSER_TYPE_METADATA_PARSER));
      old = value->data[0].v_pointer;
      if (v_object) {
            g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, VALA_GIR_PARSER_TYPE_METADATA_PARSER));
            g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
            value->data[0].v_pointer = v_object;
      } else {
            value->data[0].v_pointer = NULL;
      }
      if (old) {
            vala_gir_parser_metadata_parser_unref (old);
      }
}


static void vala_gir_parser_metadata_parser_class_init (ValaGirParserMetadataParserClass * klass) {
      vala_gir_parser_metadata_parser_parent_class = g_type_class_peek_parent (klass);
      VALA_GIR_PARSER_METADATA_PARSER_CLASS (klass)->finalize = vala_gir_parser_metadata_parser_finalize;
      g_type_class_add_private (klass, sizeof (ValaGirParserMetadataParserPrivate));
}


static void vala_gir_parser_metadata_parser_instance_init (ValaGirParserMetadataParser * self) {
      ValaGirParserMetadata* _tmp0_ = NULL;
      self->priv = VALA_GIR_PARSER_METADATA_PARSER_GET_PRIVATE (self);
      _tmp0_ = vala_gir_parser_metadata_new ("", VALA_GIR_PARSER_METADATA_TYPE_GENERIC, NULL);
      self->priv->tree = _tmp0_;
      self->ref_count = 1;
}


static void vala_gir_parser_metadata_parser_finalize (ValaGirParserMetadataParser* obj) {
      ValaGirParserMetadataParser * self;
      self = VALA_GIR_PARSER_METADATA_PARSER (obj);
      _vala_gir_parser_metadata_unref0 (self->priv->tree);
      _vala_scanner_unref0 (self->priv->scanner);
      _vala_gir_parser_metadata_unref0 (self->priv->parent_metadata);
}


static GType vala_gir_parser_metadata_parser_get_type (void) {
      static volatile gsize vala_gir_parser_metadata_parser_type_id__volatile = 0;
      if (g_once_init_enter (&vala_gir_parser_metadata_parser_type_id__volatile)) {
            static const GTypeValueTable g_define_type_value_table = { vala_gir_parser_value_metadata_parser_init, vala_gir_parser_value_metadata_parser_free_value, vala_gir_parser_value_metadata_parser_copy_value, vala_gir_parser_value_metadata_parser_peek_pointer, "p", vala_gir_parser_value_metadata_parser_collect_value, "p", vala_gir_parser_value_metadata_parser_lcopy_value };
            static const GTypeInfo g_define_type_info = { sizeof (ValaGirParserMetadataParserClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) vala_gir_parser_metadata_parser_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ValaGirParserMetadataParser), 0, (GInstanceInitFunc) vala_gir_parser_metadata_parser_instance_init, &g_define_type_value_table };
            static const GTypeFundamentalInfo g_define_type_fundamental_info = { (G_TYPE_FLAG_CLASSED | G_TYPE_FLAG_INSTANTIATABLE | G_TYPE_FLAG_DERIVABLE | G_TYPE_FLAG_DEEP_DERIVABLE) };
            GType vala_gir_parser_metadata_parser_type_id;
            vala_gir_parser_metadata_parser_type_id = g_type_register_fundamental (g_type_fundamental_next (), "ValaGirParserMetadataParser", &g_define_type_info, &g_define_type_fundamental_info, 0);
            g_once_init_leave (&vala_gir_parser_metadata_parser_type_id__volatile, vala_gir_parser_metadata_parser_type_id);
      }
      return vala_gir_parser_metadata_parser_type_id__volatile;
}


static gpointer vala_gir_parser_metadata_parser_ref (gpointer instance) {
      ValaGirParserMetadataParser* self;
      self = instance;
      g_atomic_int_inc (&self->ref_count);
      return instance;
}


static void vala_gir_parser_metadata_parser_unref (gpointer instance) {
      ValaGirParserMetadataParser* self;
      self = instance;
      if (g_atomic_int_dec_and_test (&self->ref_count)) {
            VALA_GIR_PARSER_METADATA_PARSER_GET_CLASS (self)->finalize (self);
            g_type_free_instance ((GTypeInstance *) self);
      }
}


static ValaGirParserSymbolInfo* vala_gir_parser_symbol_info_construct (GType object_type) {
      ValaGirParserSymbolInfo* self = NULL;
      self = (ValaGirParserSymbolInfo*) g_type_create_instance (object_type);
      return self;
}


static ValaGirParserSymbolInfo* vala_gir_parser_symbol_info_new (void) {
      return vala_gir_parser_symbol_info_construct (VALA_GIR_PARSER_TYPE_SYMBOL_INFO);
}


static void vala_gir_parser_value_symbol_info_init (GValue* value) {
      value->data[0].v_pointer = NULL;
}


static void vala_gir_parser_value_symbol_info_free_value (GValue* value) {
      if (value->data[0].v_pointer) {
            vala_gir_parser_symbol_info_unref (value->data[0].v_pointer);
      }
}


static void vala_gir_parser_value_symbol_info_copy_value (const GValue* src_value, GValue* dest_value) {
      if (src_value->data[0].v_pointer) {
            dest_value->data[0].v_pointer = vala_gir_parser_symbol_info_ref (src_value->data[0].v_pointer);
      } else {
            dest_value->data[0].v_pointer = NULL;
      }
}


static gpointer vala_gir_parser_value_symbol_info_peek_pointer (const GValue* value) {
      return value->data[0].v_pointer;
}


static gchar* vala_gir_parser_value_symbol_info_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
      if (collect_values[0].v_pointer) {
            ValaGirParserSymbolInfo* object;
            object = collect_values[0].v_pointer;
            if (object->parent_instance.g_class == NULL) {
                  return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
            } else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) {
                  return g_strconcat ("invalid object type `", g_type_name (G_TYPE_FROM_INSTANCE (object)), "' for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
            }
            value->data[0].v_pointer = vala_gir_parser_symbol_info_ref (object);
      } else {
            value->data[0].v_pointer = NULL;
      }
      return NULL;
}


static gchar* vala_gir_parser_value_symbol_info_lcopy_value (const GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
      ValaGirParserSymbolInfo** object_p;
      object_p = collect_values[0].v_pointer;
      if (!object_p) {
            return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value));
      }
      if (!value->data[0].v_pointer) {
            *object_p = NULL;
      } else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) {
            *object_p = value->data[0].v_pointer;
      } else {
            *object_p = vala_gir_parser_symbol_info_ref (value->data[0].v_pointer);
      }
      return NULL;
}


static GParamSpec* vala_gir_parser_param_spec_symbol_info (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) {
      ValaGirParserParamSpecSymbolInfo* spec;
      g_return_val_if_fail (g_type_is_a (object_type, VALA_GIR_PARSER_TYPE_SYMBOL_INFO), NULL);
      spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags);
      G_PARAM_SPEC (spec)->value_type = object_type;
      return G_PARAM_SPEC (spec);
}


static gpointer vala_gir_parser_value_get_symbol_info (const GValue* value) {
      g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, VALA_GIR_PARSER_TYPE_SYMBOL_INFO), NULL);
      return value->data[0].v_pointer;
}


static void vala_gir_parser_value_set_symbol_info (GValue* value, gpointer v_object) {
      ValaGirParserSymbolInfo* old;
      g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, VALA_GIR_PARSER_TYPE_SYMBOL_INFO));
      old = value->data[0].v_pointer;
      if (v_object) {
            g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, VALA_GIR_PARSER_TYPE_SYMBOL_INFO));
            g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
            value->data[0].v_pointer = v_object;
            vala_gir_parser_symbol_info_ref (value->data[0].v_pointer);
      } else {
            value->data[0].v_pointer = NULL;
      }
      if (old) {
            vala_gir_parser_symbol_info_unref (old);
      }
}


static void vala_gir_parser_value_take_symbol_info (GValue* value, gpointer v_object) {
      ValaGirParserSymbolInfo* old;
      g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, VALA_GIR_PARSER_TYPE_SYMBOL_INFO));
      old = value->data[0].v_pointer;
      if (v_object) {
            g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, VALA_GIR_PARSER_TYPE_SYMBOL_INFO));
            g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
            value->data[0].v_pointer = v_object;
      } else {
            value->data[0].v_pointer = NULL;
      }
      if (old) {
            vala_gir_parser_symbol_info_unref (old);
      }
}


static void vala_gir_parser_symbol_info_class_init (ValaGirParserSymbolInfoClass * klass) {
      vala_gir_parser_symbol_info_parent_class = g_type_class_peek_parent (klass);
      VALA_GIR_PARSER_SYMBOL_INFO_CLASS (klass)->finalize = vala_gir_parser_symbol_info_finalize;
}


static void vala_gir_parser_symbol_info_instance_init (ValaGirParserSymbolInfo * self) {
      self->ref_count = 1;
}


static void vala_gir_parser_symbol_info_finalize (ValaGirParserSymbolInfo* obj) {
      ValaGirParserSymbolInfo * self;
      self = VALA_GIR_PARSER_SYMBOL_INFO (obj);
      _vala_code_node_unref0 (self->symbol);
      _vala_gir_parser_metadata_unref0 (self->metadata);
      _vala_map_unref0 (self->girdata);
}


static GType vala_gir_parser_symbol_info_get_type (void) {
      static volatile gsize vala_gir_parser_symbol_info_type_id__volatile = 0;
      if (g_once_init_enter (&vala_gir_parser_symbol_info_type_id__volatile)) {
            static const GTypeValueTable g_define_type_value_table = { vala_gir_parser_value_symbol_info_init, vala_gir_parser_value_symbol_info_free_value, vala_gir_parser_value_symbol_info_copy_value, vala_gir_parser_value_symbol_info_peek_pointer, "p", vala_gir_parser_value_symbol_info_collect_value, "p", vala_gir_parser_value_symbol_info_lcopy_value };
            static const GTypeInfo g_define_type_info = { sizeof (ValaGirParserSymbolInfoClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) vala_gir_parser_symbol_info_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ValaGirParserSymbolInfo), 0, (GInstanceInitFunc) vala_gir_parser_symbol_info_instance_init, &g_define_type_value_table };
            static const GTypeFundamentalInfo g_define_type_fundamental_info = { (G_TYPE_FLAG_CLASSED | G_TYPE_FLAG_INSTANTIATABLE | G_TYPE_FLAG_DERIVABLE | G_TYPE_FLAG_DEEP_DERIVABLE) };
            GType vala_gir_parser_symbol_info_type_id;
            vala_gir_parser_symbol_info_type_id = g_type_register_fundamental (g_type_fundamental_next (), "ValaGirParserSymbolInfo", &g_define_type_info, &g_define_type_fundamental_info, 0);
            g_once_init_leave (&vala_gir_parser_symbol_info_type_id__volatile, vala_gir_parser_symbol_info_type_id);
      }
      return vala_gir_parser_symbol_info_type_id__volatile;
}


static gpointer vala_gir_parser_symbol_info_ref (gpointer instance) {
      ValaGirParserSymbolInfo* self;
      self = instance;
      g_atomic_int_inc (&self->ref_count);
      return instance;
}


static void vala_gir_parser_symbol_info_unref (gpointer instance) {
      ValaGirParserSymbolInfo* self;
      self = instance;
      if (g_atomic_int_dec_and_test (&self->ref_count)) {
            VALA_GIR_PARSER_SYMBOL_INFO_GET_CLASS (self)->finalize (self);
            g_type_free_instance ((GTypeInstance *) self);
      }
}


static ValaGirParserCallbackScope* vala_gir_parser_callback_scope_construct (GType object_type) {
      ValaGirParserCallbackScope* self = NULL;
      self = (ValaGirParserCallbackScope*) g_type_create_instance (object_type);
      return self;
}


static ValaGirParserCallbackScope* vala_gir_parser_callback_scope_new (void) {
      return vala_gir_parser_callback_scope_construct (VALA_GIR_PARSER_TYPE_CALLBACK_SCOPE);
}


static void vala_gir_parser_value_callback_scope_init (GValue* value) {
      value->data[0].v_pointer = NULL;
}


static void vala_gir_parser_value_callback_scope_free_value (GValue* value) {
      if (value->data[0].v_pointer) {
            vala_gir_parser_callback_scope_unref (value->data[0].v_pointer);
      }
}


static void vala_gir_parser_value_callback_scope_copy_value (const GValue* src_value, GValue* dest_value) {
      if (src_value->data[0].v_pointer) {
            dest_value->data[0].v_pointer = vala_gir_parser_callback_scope_ref (src_value->data[0].v_pointer);
      } else {
            dest_value->data[0].v_pointer = NULL;
      }
}


static gpointer vala_gir_parser_value_callback_scope_peek_pointer (const GValue* value) {
      return value->data[0].v_pointer;
}


static gchar* vala_gir_parser_value_callback_scope_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
      if (collect_values[0].v_pointer) {
            ValaGirParserCallbackScope* object;
            object = collect_values[0].v_pointer;
            if (object->parent_instance.g_class == NULL) {
                  return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
            } else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) {
                  return g_strconcat ("invalid object type `", g_type_name (G_TYPE_FROM_INSTANCE (object)), "' for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
            }
            value->data[0].v_pointer = vala_gir_parser_callback_scope_ref (object);
      } else {
            value->data[0].v_pointer = NULL;
      }
      return NULL;
}


static gchar* vala_gir_parser_value_callback_scope_lcopy_value (const GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
      ValaGirParserCallbackScope** object_p;
      object_p = collect_values[0].v_pointer;
      if (!object_p) {
            return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value));
      }
      if (!value->data[0].v_pointer) {
            *object_p = NULL;
      } else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) {
            *object_p = value->data[0].v_pointer;
      } else {
            *object_p = vala_gir_parser_callback_scope_ref (value->data[0].v_pointer);
      }
      return NULL;
}


static GParamSpec* vala_gir_parser_param_spec_callback_scope (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) {
      ValaGirParserParamSpecCallbackScope* spec;
      g_return_val_if_fail (g_type_is_a (object_type, VALA_GIR_PARSER_TYPE_CALLBACK_SCOPE), NULL);
      spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags);
      G_PARAM_SPEC (spec)->value_type = object_type;
      return G_PARAM_SPEC (spec);
}


static gpointer vala_gir_parser_value_get_callback_scope (const GValue* value) {
      g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, VALA_GIR_PARSER_TYPE_CALLBACK_SCOPE), NULL);
      return value->data[0].v_pointer;
}


static void vala_gir_parser_value_set_callback_scope (GValue* value, gpointer v_object) {
      ValaGirParserCallbackScope* old;
      g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, VALA_GIR_PARSER_TYPE_CALLBACK_SCOPE));
      old = value->data[0].v_pointer;
      if (v_object) {
            g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, VALA_GIR_PARSER_TYPE_CALLBACK_SCOPE));
            g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
            value->data[0].v_pointer = v_object;
            vala_gir_parser_callback_scope_ref (value->data[0].v_pointer);
      } else {
            value->data[0].v_pointer = NULL;
      }
      if (old) {
            vala_gir_parser_callback_scope_unref (old);
      }
}


static void vala_gir_parser_value_take_callback_scope (GValue* value, gpointer v_object) {
      ValaGirParserCallbackScope* old;
      g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, VALA_GIR_PARSER_TYPE_CALLBACK_SCOPE));
      old = value->data[0].v_pointer;
      if (v_object) {
            g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, VALA_GIR_PARSER_TYPE_CALLBACK_SCOPE));
            g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
            value->data[0].v_pointer = v_object;
      } else {
            value->data[0].v_pointer = NULL;
      }
      if (old) {
            vala_gir_parser_callback_scope_unref (old);
      }
}


static void vala_gir_parser_callback_scope_class_init (ValaGirParserCallbackScopeClass * klass) {
      vala_gir_parser_callback_scope_parent_class = g_type_class_peek_parent (klass);
      VALA_GIR_PARSER_CALLBACK_SCOPE_CLASS (klass)->finalize = vala_gir_parser_callback_scope_finalize;
}


static void vala_gir_parser_callback_scope_instance_init (ValaGirParserCallbackScope * self) {
      self->ref_count = 1;
}


static void vala_gir_parser_callback_scope_finalize (ValaGirParserCallbackScope* obj) {
      ValaGirParserCallbackScope * self;
      self = VALA_GIR_PARSER_CALLBACK_SCOPE (obj);
      _vala_code_node_unref0 (self->parent_namespace);
      _vala_code_node_unref0 (self->gtype_struct_for);
}


static GType vala_gir_parser_callback_scope_get_type (void) {
      static volatile gsize vala_gir_parser_callback_scope_type_id__volatile = 0;
      if (g_once_init_enter (&vala_gir_parser_callback_scope_type_id__volatile)) {
            static const GTypeValueTable g_define_type_value_table = { vala_gir_parser_value_callback_scope_init, vala_gir_parser_value_callback_scope_free_value, vala_gir_parser_value_callback_scope_copy_value, vala_gir_parser_value_callback_scope_peek_pointer, "p", vala_gir_parser_value_callback_scope_collect_value, "p", vala_gir_parser_value_callback_scope_lcopy_value };
            static const GTypeInfo g_define_type_info = { sizeof (ValaGirParserCallbackScopeClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) vala_gir_parser_callback_scope_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ValaGirParserCallbackScope), 0, (GInstanceInitFunc) vala_gir_parser_callback_scope_instance_init, &g_define_type_value_table };
            static const GTypeFundamentalInfo g_define_type_fundamental_info = { (G_TYPE_FLAG_CLASSED | G_TYPE_FLAG_INSTANTIATABLE | G_TYPE_FLAG_DERIVABLE | G_TYPE_FLAG_DEEP_DERIVABLE) };
            GType vala_gir_parser_callback_scope_type_id;
            vala_gir_parser_callback_scope_type_id = g_type_register_fundamental (g_type_fundamental_next (), "ValaGirParserCallbackScope", &g_define_type_info, &g_define_type_fundamental_info, 0);
            g_once_init_leave (&vala_gir_parser_callback_scope_type_id__volatile, vala_gir_parser_callback_scope_type_id);
      }
      return vala_gir_parser_callback_scope_type_id__volatile;
}


static gpointer vala_gir_parser_callback_scope_ref (gpointer instance) {
      ValaGirParserCallbackScope* self;
      self = instance;
      g_atomic_int_inc (&self->ref_count);
      return instance;
}


static void vala_gir_parser_callback_scope_unref (gpointer instance) {
      ValaGirParserCallbackScope* self;
      self = instance;
      if (g_atomic_int_dec_and_test (&self->ref_count)) {
            VALA_GIR_PARSER_CALLBACK_SCOPE_GET_CLASS (self)->finalize (self);
            g_type_free_instance ((GTypeInstance *) self);
      }
}


static ValaGirParserAlias* vala_gir_parser_alias_construct (GType object_type) {
      ValaGirParserAlias* self = NULL;
      self = (ValaGirParserAlias*) g_type_create_instance (object_type);
      return self;
}


static ValaGirParserAlias* vala_gir_parser_alias_new (void) {
      return vala_gir_parser_alias_construct (VALA_GIR_PARSER_TYPE_ALIAS);
}


static void vala_gir_parser_value_alias_init (GValue* value) {
      value->data[0].v_pointer = NULL;
}


static void vala_gir_parser_value_alias_free_value (GValue* value) {
      if (value->data[0].v_pointer) {
            vala_gir_parser_alias_unref (value->data[0].v_pointer);
      }
}


static void vala_gir_parser_value_alias_copy_value (const GValue* src_value, GValue* dest_value) {
      if (src_value->data[0].v_pointer) {
            dest_value->data[0].v_pointer = vala_gir_parser_alias_ref (src_value->data[0].v_pointer);
      } else {
            dest_value->data[0].v_pointer = NULL;
      }
}


static gpointer vala_gir_parser_value_alias_peek_pointer (const GValue* value) {
      return value->data[0].v_pointer;
}


static gchar* vala_gir_parser_value_alias_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
      if (collect_values[0].v_pointer) {
            ValaGirParserAlias* object;
            object = collect_values[0].v_pointer;
            if (object->parent_instance.g_class == NULL) {
                  return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
            } else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) {
                  return g_strconcat ("invalid object type `", g_type_name (G_TYPE_FROM_INSTANCE (object)), "' for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
            }
            value->data[0].v_pointer = vala_gir_parser_alias_ref (object);
      } else {
            value->data[0].v_pointer = NULL;
      }
      return NULL;
}


static gchar* vala_gir_parser_value_alias_lcopy_value (const GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
      ValaGirParserAlias** object_p;
      object_p = collect_values[0].v_pointer;
      if (!object_p) {
            return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value));
      }
      if (!value->data[0].v_pointer) {
            *object_p = NULL;
      } else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) {
            *object_p = value->data[0].v_pointer;
      } else {
            *object_p = vala_gir_parser_alias_ref (value->data[0].v_pointer);
      }
      return NULL;
}


static GParamSpec* vala_gir_parser_param_spec_alias (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) {
      ValaGirParserParamSpecAlias* spec;
      g_return_val_if_fail (g_type_is_a (object_type, VALA_GIR_PARSER_TYPE_ALIAS), NULL);
      spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags);
      G_PARAM_SPEC (spec)->value_type = object_type;
      return G_PARAM_SPEC (spec);
}


static gpointer vala_gir_parser_value_get_alias (const GValue* value) {
      g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, VALA_GIR_PARSER_TYPE_ALIAS), NULL);
      return value->data[0].v_pointer;
}


static void vala_gir_parser_value_set_alias (GValue* value, gpointer v_object) {
      ValaGirParserAlias* old;
      g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, VALA_GIR_PARSER_TYPE_ALIAS));
      old = value->data[0].v_pointer;
      if (v_object) {
            g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, VALA_GIR_PARSER_TYPE_ALIAS));
            g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
            value->data[0].v_pointer = v_object;
            vala_gir_parser_alias_ref (value->data[0].v_pointer);
      } else {
            value->data[0].v_pointer = NULL;
      }
      if (old) {
            vala_gir_parser_alias_unref (old);
      }
}


static void vala_gir_parser_value_take_alias (GValue* value, gpointer v_object) {
      ValaGirParserAlias* old;
      g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, VALA_GIR_PARSER_TYPE_ALIAS));
      old = value->data[0].v_pointer;
      if (v_object) {
            g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, VALA_GIR_PARSER_TYPE_ALIAS));
            g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
            value->data[0].v_pointer = v_object;
      } else {
            value->data[0].v_pointer = NULL;
      }
      if (old) {
            vala_gir_parser_alias_unref (old);
      }
}


static void vala_gir_parser_alias_class_init (ValaGirParserAliasClass * klass) {
      vala_gir_parser_alias_parent_class = g_type_class_peek_parent (klass);
      VALA_GIR_PARSER_ALIAS_CLASS (klass)->finalize = vala_gir_parser_alias_finalize;
}


static void vala_gir_parser_alias_instance_init (ValaGirParserAlias * self) {
      self->ref_count = 1;
}


static void vala_gir_parser_alias_finalize (ValaGirParserAlias* obj) {
      ValaGirParserAlias * self;
      self = VALA_GIR_PARSER_ALIAS (obj);
      _g_free0 (self->name);
      _vala_code_node_unref0 (self->base_type);
      _vala_code_node_unref0 (self->parent_namespace);
      _vala_source_reference_unref0 (self->source_reference);
}


static GType vala_gir_parser_alias_get_type (void) {
      static volatile gsize vala_gir_parser_alias_type_id__volatile = 0;
      if (g_once_init_enter (&vala_gir_parser_alias_type_id__volatile)) {
            static const GTypeValueTable g_define_type_value_table = { vala_gir_parser_value_alias_init, vala_gir_parser_value_alias_free_value, vala_gir_parser_value_alias_copy_value, vala_gir_parser_value_alias_peek_pointer, "p", vala_gir_parser_value_alias_collect_value, "p", vala_gir_parser_value_alias_lcopy_value };
            static const GTypeInfo g_define_type_info = { sizeof (ValaGirParserAliasClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) vala_gir_parser_alias_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ValaGirParserAlias), 0, (GInstanceInitFunc) vala_gir_parser_alias_instance_init, &g_define_type_value_table };
            static const GTypeFundamentalInfo g_define_type_fundamental_info = { (G_TYPE_FLAG_CLASSED | G_TYPE_FLAG_INSTANTIATABLE | G_TYPE_FLAG_DERIVABLE | G_TYPE_FLAG_DEEP_DERIVABLE) };
            GType vala_gir_parser_alias_type_id;
            vala_gir_parser_alias_type_id = g_type_register_fundamental (g_type_fundamental_next (), "ValaGirParserAlias", &g_define_type_info, &g_define_type_fundamental_info, 0);
            g_once_init_leave (&vala_gir_parser_alias_type_id__volatile, vala_gir_parser_alias_type_id);
      }
      return vala_gir_parser_alias_type_id__volatile;
}


static gpointer vala_gir_parser_alias_ref (gpointer instance) {
      ValaGirParserAlias* self;
      self = instance;
      g_atomic_int_inc (&self->ref_count);
      return instance;
}


static void vala_gir_parser_alias_unref (gpointer instance) {
      ValaGirParserAlias* self;
      self = instance;
      if (g_atomic_int_dec_and_test (&self->ref_count)) {
            VALA_GIR_PARSER_ALIAS_GET_CLASS (self)->finalize (self);
            g_type_free_instance ((GTypeInstance *) self);
      }
}


static ValaGirParserMethodInfo* vala_gir_parser_method_info_construct (GType object_type, ValaParameter* param, gint array_length_idx, gint closure_idx, gint destroy_idx) {
      ValaGirParserMethodInfo* self = NULL;
      ValaParameter* _tmp0_;
      g_return_val_if_fail (param != NULL, NULL);
      self = (ValaGirParserMethodInfo*) g_type_create_instance (object_type);
      _tmp0_ = _vala_code_node_ref0 (param);
      _vala_code_node_unref0 (self->param);
      self->param = _tmp0_;
      self->array_length_idx = array_length_idx;
      self->closure_idx = closure_idx;
      self->destroy_idx = destroy_idx;
      self->vala_idx = 0.0F;
      self->keep = TRUE;
      return self;
}


static ValaGirParserMethodInfo* vala_gir_parser_method_info_new (ValaParameter* param, gint array_length_idx, gint closure_idx, gint destroy_idx) {
      return vala_gir_parser_method_info_construct (VALA_GIR_PARSER_TYPE_METHOD_INFO, param, array_length_idx, closure_idx, destroy_idx);
}


static void vala_gir_parser_value_method_info_init (GValue* value) {
      value->data[0].v_pointer = NULL;
}


static void vala_gir_parser_value_method_info_free_value (GValue* value) {
      if (value->data[0].v_pointer) {
            vala_gir_parser_method_info_unref (value->data[0].v_pointer);
      }
}


static void vala_gir_parser_value_method_info_copy_value (const GValue* src_value, GValue* dest_value) {
      if (src_value->data[0].v_pointer) {
            dest_value->data[0].v_pointer = vala_gir_parser_method_info_ref (src_value->data[0].v_pointer);
      } else {
            dest_value->data[0].v_pointer = NULL;
      }
}


static gpointer vala_gir_parser_value_method_info_peek_pointer (const GValue* value) {
      return value->data[0].v_pointer;
}


static gchar* vala_gir_parser_value_method_info_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
      if (collect_values[0].v_pointer) {
            ValaGirParserMethodInfo* object;
            object = collect_values[0].v_pointer;
            if (object->parent_instance.g_class == NULL) {
                  return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
            } else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) {
                  return g_strconcat ("invalid object type `", g_type_name (G_TYPE_FROM_INSTANCE (object)), "' for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
            }
            value->data[0].v_pointer = vala_gir_parser_method_info_ref (object);
      } else {
            value->data[0].v_pointer = NULL;
      }
      return NULL;
}


static gchar* vala_gir_parser_value_method_info_lcopy_value (const GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
      ValaGirParserMethodInfo** object_p;
      object_p = collect_values[0].v_pointer;
      if (!object_p) {
            return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value));
      }
      if (!value->data[0].v_pointer) {
            *object_p = NULL;
      } else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) {
            *object_p = value->data[0].v_pointer;
      } else {
            *object_p = vala_gir_parser_method_info_ref (value->data[0].v_pointer);
      }
      return NULL;
}


static GParamSpec* vala_gir_parser_param_spec_method_info (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) {
      ValaGirParserParamSpecMethodInfo* spec;
      g_return_val_if_fail (g_type_is_a (object_type, VALA_GIR_PARSER_TYPE_METHOD_INFO), NULL);
      spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags);
      G_PARAM_SPEC (spec)->value_type = object_type;
      return G_PARAM_SPEC (spec);
}


static gpointer vala_gir_parser_value_get_method_info (const GValue* value) {
      g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, VALA_GIR_PARSER_TYPE_METHOD_INFO), NULL);
      return value->data[0].v_pointer;
}


static void vala_gir_parser_value_set_method_info (GValue* value, gpointer v_object) {
      ValaGirParserMethodInfo* old;
      g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, VALA_GIR_PARSER_TYPE_METHOD_INFO));
      old = value->data[0].v_pointer;
      if (v_object) {
            g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, VALA_GIR_PARSER_TYPE_METHOD_INFO));
            g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
            value->data[0].v_pointer = v_object;
            vala_gir_parser_method_info_ref (value->data[0].v_pointer);
      } else {
            value->data[0].v_pointer = NULL;
      }
      if (old) {
            vala_gir_parser_method_info_unref (old);
      }
}


static void vala_gir_parser_value_take_method_info (GValue* value, gpointer v_object) {
      ValaGirParserMethodInfo* old;
      g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, VALA_GIR_PARSER_TYPE_METHOD_INFO));
      old = value->data[0].v_pointer;
      if (v_object) {