Logo Search packages:      
Sourcecode: vala-0.14 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
 * Copyright (C) 2011  Luca Bruno
 *
 * 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>
 *    Luca Bruno <lucabru@src.gnome.org>
 */

#include <glib.h>
#include <glib-object.h>
#include <valagee.h>
#include <stdlib.h>
#include <string.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_GIR_PARSER_TYPE_NODE (vala_gir_parser_node_get_type ())
#define VALA_GIR_PARSER_NODE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALA_GIR_PARSER_TYPE_NODE, ValaGirParserNode))
#define VALA_GIR_PARSER_NODE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VALA_GIR_PARSER_TYPE_NODE, ValaGirParserNodeClass))
#define VALA_GIR_PARSER_IS_NODE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VALA_GIR_PARSER_TYPE_NODE))
#define VALA_GIR_PARSER_IS_NODE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VALA_GIR_PARSER_TYPE_NODE))
#define VALA_GIR_PARSER_NODE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VALA_GIR_PARSER_TYPE_NODE, ValaGirParserNodeClass))

typedef struct _ValaGirParserNode ValaGirParserNode;
typedef struct _ValaGirParserNodeClass ValaGirParserNodeClass;

#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_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_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_gir_parser_node_unref0(var) ((var == NULL) ? NULL : (var = (vala_gir_parser_node_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;
typedef struct _ValaGirParserNodePrivate ValaGirParserNodePrivate;

#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_PARAMETER_INFO (vala_gir_parser_parameter_info_get_type ())
#define VALA_GIR_PARSER_PARAMETER_INFO(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALA_GIR_PARSER_TYPE_PARAMETER_INFO, ValaGirParserParameterInfo))
#define VALA_GIR_PARSER_PARAMETER_INFO_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VALA_GIR_PARSER_TYPE_PARAMETER_INFO, ValaGirParserParameterInfoClass))
#define VALA_GIR_PARSER_IS_PARAMETER_INFO(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VALA_GIR_PARSER_TYPE_PARAMETER_INFO))
#define VALA_GIR_PARSER_IS_PARAMETER_INFO_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VALA_GIR_PARSER_TYPE_PARAMETER_INFO))
#define VALA_GIR_PARSER_PARAMETER_INFO_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VALA_GIR_PARSER_TYPE_PARAMETER_INFO, ValaGirParserParameterInfoClass))

typedef struct _ValaGirParserParameterInfo ValaGirParserParameterInfo;
typedef struct _ValaGirParserParameterInfoClass ValaGirParserParameterInfoClass;

#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_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)))
#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 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;
typedef struct _ValaGirParserParameterInfoPrivate ValaGirParserParameterInfoPrivate;
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 __g_list_free__vala_code_node_unref0_0(var) ((var == NULL) ? NULL : (var = (_g_list_free__vala_code_node_unref0_ (var), NULL)))

#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;

#define VALA_TYPE_MEMBER_BINDING (vala_member_binding_get_type ())

#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_gir_parser_parameter_info_unref0(var) ((var == NULL) ? NULL : (var = (vala_gir_parser_parameter_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_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)))

#define VALA_TYPE_UNARY_OPERATOR (vala_unary_operator_get_type ())
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 _ValaGirParserParamSpecNode ValaGirParserParamSpecNode;
typedef struct _ValaGirParserParamSpecParameterInfo ValaGirParserParamSpecParameterInfo;

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;

01351 struct _ValaGirParserPrivate {
      ValaMarkupReader* reader;
      ValaCodeContext* context;
      ValaNamespace* glib_ns;
      ValaSourceFile* current_source_file;
      ValaGirParserNode* root;
      ValaSourceLocation begin;
      ValaSourceLocation end;
      ValaMarkupTokenType current_token;
      gchar** cheader_filenames;
      gint cheader_filenames_length1;
      gint _cheader_filenames_size_;
      ValaArrayList* metadata_stack;
      ValaGirParserMetadata* metadata;
      ValaArrayList* tree_stack;
      ValaGirParserNode* current;
      ValaGirParserNode* old_current;
      ValaHashMap* unresolved_symbols_map;
      ValaArrayList* unresolved_gir_symbols;
};

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_IDX,
      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,
      VALA_GIR_PARSER_ARGUMENT_TYPE_SCOPE,
      VALA_GIR_PARSER_ARGUMENT_TYPE_STRUCT,
      VALA_GIR_PARSER_ARGUMENT_TYPE_THROWS,
      VALA_GIR_PARSER_ARGUMENT_TYPE_PRINTF_FORMAT,
      VALA_GIR_PARSER_ARGUMENT_TYPE_ARRAY_LENGTH_FIELD,
      VALA_GIR_PARSER_ARGUMENT_TYPE_SENTINEL,
      VALA_GIR_PARSER_ARGUMENT_TYPE_CLOSURE,
      VALA_GIR_PARSER_ARGUMENT_TYPE_CPREFIX
} ValaGirParserArgumentType;

01404 struct _ValaGirParserNode {
      GTypeInstance parent_instance;
      volatile int ref_count;
      ValaGirParserNodePrivate * priv;
      ValaGirParserNode* parent;
      gchar* element_type;
      gchar* name;
      ValaMap* girdata;
      ValaGirParserMetadata* metadata;
      ValaSourceReference* source_reference;
      ValaArrayList* members;
      ValaHashMap* scope;
      ValaSymbol* symbol;
      gboolean new_symbol;
      gboolean merged;
      gboolean processed;
      gint return_array_length_idx;
      ValaList* parameters;
      ValaArrayList* array_length_parameters;
      ValaArrayList* closure_parameters;
      ValaArrayList* destroy_parameters;
      ValaDataType* base_type;
};

01428 struct _ValaGirParserNodeClass {
      GTypeClass parent_class;
      void (*finalize) (ValaGirParserNode *self);
};

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

01440 struct _ValaGirParserParameterInfo {
      GTypeInstance parent_instance;
      volatile int ref_count;
      ValaGirParserParameterInfoPrivate * priv;
      ValaParameter* param;
      gfloat vala_idx;
      gint array_length_idx;
      gint closure_idx;
      gint destroy_idx;
      gboolean keep;
};

01452 struct _ValaGirParserParameterInfoClass {
      GTypeClass parent_class;
      void (*finalize) (ValaGirParserParameterInfo *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);
};

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;

typedef enum  {
      VALA_MEMBER_BINDING_INSTANCE,
      VALA_MEMBER_BINDING_CLASS,
      VALA_MEMBER_BINDING_STATIC
} ValaMemberBinding;

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

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

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

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

01528 struct _ValaGirParserParamSpecArgument {
      GParamSpec parent_instance;
};

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

01537 struct _ValaGirParserMetadataSetClass {
      ValaGirParserMetadataClass parent_class;
};

typedef enum  {
      VALA_UNARY_OPERATOR_NONE,
      VALA_UNARY_OPERATOR_PLUS,
      VALA_UNARY_OPERATOR_MINUS,
      VALA_UNARY_OPERATOR_LOGICAL_NEGATION,
      VALA_UNARY_OPERATOR_BITWISE_COMPLEMENT,
      VALA_UNARY_OPERATOR_INCREMENT,
      VALA_UNARY_OPERATOR_DECREMENT,
      VALA_UNARY_OPERATOR_REF,
      VALA_UNARY_OPERATOR_OUT
} ValaUnaryOperator;

01553 struct _ValaGirParserParamSpecMetadata {
      GParamSpec parent_instance;
};

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

01563 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;

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

01711 struct _ValaGirParserParamSpecMetadataParser {
      GParamSpec parent_instance;
};

01715 struct _ValaGirParserParamSpecNode {
      GParamSpec parent_instance;
};

01719 struct _ValaGirParserParamSpecParameterInfo {
      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 ValaArrayList* vala_gir_parser_node_new_namespaces;
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_node_parent_class = NULL;
static ValaArrayList* vala_gir_parser_node_new_namespaces = NULL;
static gpointer vala_gir_parser_parameter_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;
static gpointer vala_gir_parser_node_ref (gpointer instance);
static void vala_gir_parser_node_unref (gpointer instance);
static GParamSpec* vala_gir_parser_param_spec_node (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) G_GNUC_UNUSED;
static void vala_gir_parser_value_set_node (GValue* value, gpointer v_object) G_GNUC_UNUSED;
static void vala_gir_parser_value_take_node (GValue* value, gpointer v_object) G_GNUC_UNUSED;
static gpointer vala_gir_parser_value_get_node (const GValue* value) G_GNUC_UNUSED;
static GType vala_gir_parser_node_get_type (void) G_GNUC_CONST G_GNUC_UNUSED;
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;
GType vala_unresolved_symbol_get_type (void) G_GNUC_CONST;
#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_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);
#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);
static ValaGirParserNode* vala_gir_parser_node_new (const gchar* name);
static ValaGirParserNode* vala_gir_parser_node_construct (GType object_type, const gchar* name);
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;
static gpointer vala_gir_parser_parameter_info_ref (gpointer instance);
static void vala_gir_parser_parameter_info_unref (gpointer instance);
static GParamSpec* vala_gir_parser_param_spec_parameter_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_parameter_info (GValue* value, gpointer v_object) G_GNUC_UNUSED;
static void vala_gir_parser_value_take_parameter_info (GValue* value, gpointer v_object) G_GNUC_UNUSED;
static gpointer vala_gir_parser_value_get_parameter_info (const GValue* value) G_GNUC_UNUSED;
static GType vala_gir_parser_parameter_info_get_type (void) G_GNUC_CONST G_GNUC_UNUSED;
void vala_code_context_accept (ValaCodeContext* self, ValaCodeVisitor* visitor);
static void vala_gir_parser_resolve_gir_symbols (ValaGirParser* self);
static void vala_gir_parser_create_new_namespaces (ValaGirParser* self);
static void vala_gir_parser_node_process (ValaGirParserNode* self, ValaGirParser* parser);
static void vala_gir_parser_report_unused_metadata (ValaGirParser* self, ValaGirParserMetadata* metadata);
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);
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, ValaUnresolvedSymbol* 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);
gchar* vala_code_context_get_metadata_path (ValaCodeContext* self, const gchar* gir_filename);
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);
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 (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);
void vala_error_domain_add_code (ValaErrorDomain* self, ValaErrorCode* ecode);
ValaSourceReference* vala_code_node_get_source_reference (ValaCodeNode* self);
static gboolean vala_gir_parser_is_container (ValaSymbol* sym);
static ValaUnresolvedSymbol* vala_gir_parser_parse_symbol_from_string (ValaGirParser* self, const gchar* symbol_string, ValaSourceReference* source_reference);
static void vala_gir_parser_assume_parameter_names (ValaGirParser* self, ValaSignal* sig, ValaSymbol* sym, gboolean skip_first);
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 ValaGirParserNode* vala_gir_parser_find_invoker (ValaGirParser* self, ValaGirParserNode* node);
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, const gchar* selector);
static gboolean vala_gir_parser_push_metadata (ValaGirParser* self);
static gboolean vala_gir_parser_metadata_has_argument (ValaGirParserMetadata* self, ValaGirParserArgumentType key);
static gboolean vala_gir_parser_metadata_get_bool (ValaGirParserMetadata* self, ValaGirParserArgumentType arg);
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);
GType vala_reference_type_get_type (void) G_GNUC_CONST;
GType vala_array_type_get_type (void) G_GNUC_CONST;
void vala_data_type_set_nullable (ValaDataType* self, gboolean value);
void vala_data_type_set_value_owned (ValaDataType* self, gboolean value);
static gchar* vala_gir_parser_element_get_string (ValaGirParser* self, const gchar* attribute_name, ValaGirParserArgumentType arg_type);
static gchar* vala_gir_parser_metadata_get_string (ValaGirParserMetadata* self, ValaGirParserArgumentType arg);
static ValaDataType* vala_gir_parser_element_get_type (ValaGirParser* self, ValaDataType* orig_type, gboolean owned_by_default, gboolean* no_array_length, gboolean* changed);
static ValaSourceReference* vala_gir_parser_metadata_get_source_reference (ValaGirParserMetadata* self, ValaGirParserArgumentType arg);
void vala_data_type_remove_all_type_arguments (ValaDataType* self);
gboolean vala_data_type_get_value_owned (ValaDataType* self);
static gchar* vala_gir_parser_element_get_name (ValaGirParser* self, const gchar* gir_name);
static void vala_gir_parser_set_array_ccode (ValaGirParser* self, ValaSymbol* sym, ValaGirParserParameterInfo* info);
void vala_method_set_carray_length_parameter_position (ValaMethod* self, gdouble value);
void vala_delegate_set_carray_length_parameter_position (ValaDelegate* self, gdouble value);
void vala_parameter_set_carray_length_parameter_position (ValaParameter* self, gdouble value);
void vala_variable_set_array_length_cname (ValaVariable* self, const gchar* array_length_cname);
ValaDataType* vala_variable_get_variable_type (ValaVariable* self);
gchar* vala_data_type_to_qualified_string (ValaDataType* self, ValaScope* scope);
gchar* vala_typesymbol_get_cname (ValaTypeSymbol* self, gboolean const_type);
void vala_method_set_array_length_type (ValaMethod* self, const gchar* value);
void vala_variable_set_array_length_type (ValaVariable* self, const gchar* value);
static void 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);
static ValaGirParserNode* vala_gir_parser_resolve_node (ValaGirParser* self, ValaGirParserNode* parent_scope, ValaUnresolvedSymbol* unresolved_sym, gboolean create_namespace);
ValaUnresolvedSymbol* vala_unresolved_symbol_get_inner (ValaUnresolvedSymbol* self);
static ValaGirParserNode* vala_gir_parser_node_lookup (ValaGirParserNode* self, const gchar* name, gboolean create_namespace, ValaSourceReference* source_reference);
static ValaSymbol* vala_gir_parser_resolve_symbol (ValaGirParser* self, ValaGirParserNode* parent_scope, ValaUnresolvedSymbol* unresolved_sym);
static void vala_gir_parser_push_node (ValaGirParser* self, const gchar* name, gboolean merge);
static void vala_gir_parser_node_add_member (ValaGirParserNode* self, ValaGirParserNode* node);
ValaMap* vala_markup_reader_get_attributes (ValaMarkupReader* self);
static ValaUnresolvedSymbol* vala_gir_parser_node_get_unresolved_symbol (ValaGirParserNode* self);
static void vala_gir_parser_pop_node (ValaGirParser* self);
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);
GType vala_code_generator_get_type (void) G_GNUC_CONST;
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 void vala_gir_parser_parse_alias (ValaGirParser* self);
static void vala_gir_parser_parse_error_domain (ValaGirParser* self);
static void vala_gir_parser_parse_enumeration (ValaGirParser* self, const gchar* element_name, gboolean error_domain);
static void vala_gir_parser_parse_bitfield (ValaGirParser* self);
static void vala_gir_parser_parse_method (ValaGirParser* self, const gchar* element_name);
static void vala_gir_parser_parse_callback (ValaGirParser* self);
static void vala_gir_parser_parse_boxed (ValaGirParser* self, const gchar* element_name);
static void vala_gir_parser_parse_record (ValaGirParser* self);
static void vala_gir_parser_parse_class (ValaGirParser* self);
static void vala_gir_parser_parse_interface (ValaGirParser* self);
static void vala_gir_parser_parse_union (ValaGirParser* self);
static void vala_gir_parser_parse_constant (ValaGirParser* self);
static ValaDataType* vala_gir_parser_parse_type (ValaGirParser* self, gchar** ctype, gint* array_length_idx, 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;
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);
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);
void vala_enum_set_is_flags (ValaEnum* self, gboolean value);
void vala_symbol_set_external (ValaSymbol* self, gboolean value);
GType vala_symbol_accessibility_get_type (void) G_GNUC_CONST;
void vala_symbol_set_access (ValaSymbol* self, ValaSymbolAccessibility value);
static void vala_gir_parser_parse_error_member (ValaGirParser* self);
static gchar* vala_gir_parser_node_get_cname (ValaGirParserNode* self);
static void vala_gir_parser_parse_enumeration_member (ValaGirParser* self);
void vala_enum_set_cname (ValaEnum* self, const gchar* cname);
void vala_enum_set_cprefix (ValaEnum* self, const gchar* cprefix);
void vala_error_domain_set_cname (ValaErrorDomain* self, const gchar* cname);
void vala_error_domain_set_cprefix (ValaErrorDomain* self, const gchar* cprefix);
static ValaExpression* vala_gir_parser_metadata_get_expression (ValaGirParserMetadata* self, ValaGirParserArgumentType arg);
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);
void vala_error_code_set_cname (ValaErrorCode* self, const gchar* value);
static ValaDataType* vala_gir_parser_parse_return_value (ValaGirParser* self, gchar** ctype, gint* array_length_idx, gboolean* no_array_length, gboolean* array_null_terminated);
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);
static gint vala_gir_parser_metadata_get_integer (ValaGirParserMetadata* self, ValaGirParserArgumentType arg);
ValaParameter* vala_parameter_new_with_ellipsis (ValaSourceReference* source_reference);
ValaParameter* vala_parameter_construct_with_ellipsis (GType object_type, ValaSourceReference* source_reference);
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);
void vala_variable_set_no_array_length (ValaVariable* self, gboolean value);
void vala_variable_set_array_null_terminated (ValaVariable* self, gboolean value);
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, const gchar* ctype);
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_struct_set_cname (ValaStruct* self, const gchar* cname);
static void vala_gir_parser_parse_field (ValaGirParser* self);
static void vala_gir_parser_parse_constructor (ValaGirParser* 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_type_id (ValaClass* self, const gchar* type_id);
void vala_class_set_cname (ValaClass* self, const gchar* cname);
void vala_class_set_lower_case_cprefix (ValaClass* self, const gchar* cprefix);
void vala_class_add_base_type (ValaClass* self, ValaDataType* type);
static ValaProperty* vala_gir_parser_parse_property (ValaGirParser* self);
static void vala_gir_parser_parse_signal (ValaGirParser* self);
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_set_type_id (ValaInterface* self, const gchar* type_id);
void vala_interface_add_prerequisite (ValaInterface* self, ValaDataType* type);
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_accessor_method (ValaProperty* self, gboolean value);
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);
ValaDataType* vala_data_type_copy (ValaDataType* 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);
ValaPropertyAccessor* vala_property_get_get_accessor (ValaProperty* self);
ValaDataType* vala_property_accessor_get_value_type (ValaPropertyAccessor* self);
void vala_property_set_set_accessor (ValaProperty* self, ValaPropertyAccessor* value);
static void vala_gir_parser_parse_function (ValaGirParser* self, const gchar* element_name);
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);
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_method_set_custom_return_type_cname (ValaMethod* self, const gchar* 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);
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_method_set_cname (ValaMethod* self, const gchar* cname);
void vala_delegate_set_cname (ValaDelegate* self, const gchar* cname);
void vala_method_set_is_abstract (ValaMethod* self, gboolean value);
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);
void vala_method_set_vfunc_name (ValaMethod* self, const gchar* value);
GType vala_member_binding_get_type (void) G_GNUC_CONST;
void vala_method_set_binding (ValaMethod* self, ValaMemberBinding value);
void vala_code_node_add_error_type (ValaCodeNode* self, ValaDataType* error_type);
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;
void vala_method_set_printf_format (ValaMethod* self, gboolean value);
void vala_method_set_sentinel (ValaMethod* self, const gchar* value);
void vala_method_set_no_array_length (ValaMethod* self, gboolean value);
void vala_method_set_array_null_terminated (ValaMethod* self, gboolean value);
void vala_delegate_set_no_array_length (ValaDelegate* self, gboolean value);
void vala_delegate_set_array_null_terminated (ValaDelegate* self, gboolean value);
static ValaGirParserParameterInfo* vala_gir_parser_parameter_info_new (ValaParameter* param, gint array_length_idx, gint closure_idx, gint destroy_idx);
static ValaGirParserParameterInfo* vala_gir_parser_parameter_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_class_set_is_compact (ValaClass* self, gboolean value);
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);
ValaSymbol* vala_symbol_get_parent_symbol (ValaSymbol* self);
static void vala_gir_parser_process_interface (ValaGirParser* self, ValaGirParserNode* iface_node);
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;
static void vala_gir_parser_process_alias (ValaGirParser* self, ValaGirParserNode* alias);
ValaDataType* vala_pointer_type_get_base_type (ValaPointerType* self);
gboolean vala_struct_is_simple_type (ValaStruct* self);
void vala_struct_set_base_type (ValaStruct* self, ValaDataType* value);
void vala_struct_set_simple_type (ValaStruct* self, gboolean simple_type);
static void vala_gir_parser_process_callable (ValaGirParser* self, ValaGirParserNode* node);
ValaDataType* vala_method_get_return_type (ValaMethod* self);
ValaDataType* vala_delegate_get_return_type (ValaDelegate* self);
ValaDataType* vala_signal_get_return_type (ValaSignal* self);
ValaParameterDirection vala_parameter_get_direction (ValaParameter* self);
gboolean vala_data_type_get_nullable (ValaDataType* self);
gboolean vala_parameter_get_ellipsis (ValaParameter* self);
void vala_delegate_set_has_target (ValaDelegate* self, gboolean value);
void vala_delegate_set_cinstance_parameter_position (ValaDelegate* self, gdouble value);
void vala_method_add_parameter (ValaMethod* self, ValaParameter* param);
void vala_delegate_add_parameter (ValaDelegate* self, ValaParameter* param);
void vala_signal_add_parameter (ValaSignal* self, ValaParameter* param);
void vala_parameter_set_cdelegate_target_parameter_position (ValaParameter* self, gdouble value);
void vala_parameter_set_cdestroy_notify_parameter_position (ValaParameter* self, gdouble value);
void vala_method_set_return_type (ValaMethod* self, ValaDataType* value);
void vala_delegate_set_return_type (ValaDelegate* self, ValaDataType* value);
void vala_signal_set_return_type (ValaSignal* self, ValaDataType* value);
static void vala_gir_parser_find_parent (ValaGirParser* self, const gchar* cname, ValaGirParserNode* current, ValaGirParserNode** best, gint* match);
static gchar* vala_gir_parser_node_get_lower_case_cprefix (ValaGirParserNode* self);
static void vala_gir_parser_process_namespace_method (ValaGirParser* self, ValaGirParserNode* ns, ValaGirParserNode* node);
static void vala_gir_parser_node_remove_member (ValaGirParserNode* self, ValaGirParserNode* node);
static void vala_gir_parser_process_virtual_method_field (ValaGirParser* self, ValaGirParserNode* node, ValaDelegate* d, ValaUnresolvedSymbol* gtype_struct_for);
gchar* vala_code_node_to_string (ValaCodeNode* self);
static gchar* vala_gir_parser_node_to_string (ValaGirParserNode* self);
static ValaArrayList* vala_gir_parser_node_lookup_all (ValaGirParserNode* self, const gchar* name);
void vala_signal_set_is_virtual (ValaSignal* self, gboolean value);
void vala_property_set_is_virtual (ValaProperty* self, gboolean value);
static void vala_gir_parser_process_async_method (ValaGirParser* self, ValaGirParserNode* node);
gchar* vala_method_get_finish_cname (ValaMethod* self);
ValaNullLiteral* vala_null_literal_new (ValaSourceReference* source);
ValaNullLiteral* vala_null_literal_construct (GType object_type, ValaSourceReference* source);
gdouble vala_parameter_get_cparameter_position (ValaParameter* self);
void vala_scope_remove (ValaScope* self, const gchar* name);
const gchar* vala_creation_method_get_class_name (ValaCreationMethod* self);
ValaSymbolAccessibility vala_symbol_get_access (ValaSymbol* self);
ValaMemberBinding vala_method_get_binding (ValaMethod* self);
gboolean vala_method_get_has_construct_function (ValaMethod* self);
gboolean vala_method_get_no_array_length (ValaMethod* self);
gboolean vala_method_get_array_null_terminated (ValaMethod* self);
ValaParameter* vala_parameter_copy (ValaParameter* self);
ValaList* vala_code_node_get_error_types (ValaCodeNode* self);
void vala_parameter_set_cparameter_position (ValaParameter* self, gdouble value);
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 (const gchar* selector);
static ValaGirParserMetadataSet* vala_gir_parser_metadata_set_construct (GType object_type, const gchar* selector);
static ValaGirParserMetadata* vala_gir_parser_metadata_new (const gchar* pattern, const gchar* selector, ValaSourceReference* source_reference);
static ValaGirParserMetadata* vala_gir_parser_metadata_construct (GType object_type, const gchar* pattern, const gchar* selector, 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 void vala_gir_parser_metadata_add_argument (ValaGirParserMetadata* self, ValaGirParserArgumentType key, ValaGirParserArgument* value);
gchar* vala_string_literal_eval (ValaStringLiteral* self);
GType vala_unary_operator_get_type (void) G_GNUC_CONST;
ValaUnaryOperator vala_unary_expression_get_operator (ValaUnaryExpression* self);
ValaExpression* vala_unary_expression_get_inner (ValaUnaryExpression* 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, ValaSourceLocation* end);
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, ValaSourceLocation* begin, ValaSourceLocation* end);
static gchar* vala_gir_parser_metadata_parser_parse_identifier (ValaGirParserMetadataParser* self, gboolean is_glob);
static gchar* vala_gir_parser_metadata_parser_parse_selector (ValaGirParserMetadataParser* self);
static ValaGirParserMetadata* vala_gir_parser_metadata_parser_parse_pattern (ValaGirParserMetadataParser* self);
const gchar* vala_token_type_to_string (ValaTokenType self);
static ValaExpression* vala_gir_parser_metadata_parser_parse_expression (ValaGirParserMetadataParser* self);
ValaBooleanLiteral* vala_boolean_literal_new (gboolean b, ValaSourceReference* source);
ValaBooleanLiteral* vala_boolean_literal_construct (GType object_type, gboolean b, ValaSourceReference* source);
ValaUnaryExpression* vala_unary_expression_new (ValaUnaryOperator op, ValaExpression* _inner, ValaSourceReference* source);
ValaUnaryExpression* vala_unary_expression_construct (GType object_type, ValaUnaryOperator op, ValaExpression* _inner, 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);
ValaMemberAccess* vala_member_access_new (ValaExpression* inner, const gchar* member_name, ValaSourceReference* source_reference);
ValaMemberAccess* vala_member_access_construct (GType object_type, ValaExpression* inner, const gchar* member_name, 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_NODE_DUMMY_PROPERTY
};
gchar* vala_symbol_get_lower_case_cprefix (ValaSymbol* self);
static gchar* vala_gir_parser_node_get_cprefix (ValaGirParserNode* self);
gchar* vala_symbol_get_cprefix (ValaSymbol* self);
ValaMemberBinding vala_field_get_binding (ValaField* self);
gchar* vala_constant_get_cname (ValaConstant* self);
gchar* vala_method_get_cname (ValaMethod* self);
gchar* vala_property_accessor_get_cname (ValaPropertyAccessor* self);
gchar* vala_field_get_cname (ValaField* self);
gboolean vala_method_get_is_virtual (ValaMethod* self);
void vala_signal_set_has_emitter (ValaSignal* self, gboolean value);
gboolean vala_method_get_is_abstract (ValaMethod* self);
const gchar* vala_attribute_get_name (ValaAttribute* self);
gboolean vala_method_get_coroutine (ValaMethod* self);
gboolean vala_property_get_no_accessor_method (ValaProperty* self);
ValaPropertyAccessor* vala_property_get_set_accessor (ValaProperty* self);
gboolean vala_property_accessor_get_writable (ValaPropertyAccessor* self);
ValaDelegate* vala_delegate_type_get_delegate_symbol (ValaDelegateType* self);
void vala_field_set_cname (ValaField* self, const gchar* cname);
void vala_interface_set_type_cname (ValaInterface* self, const gchar* type_cname);
void vala_symbol_set_replacement (ValaSymbol* self, const gchar* value);
void vala_symbol_set_deprecated_since (ValaSymbol* self, const gchar* value);
const gchar* vala_symbol_get_deprecated_since (ValaSymbol* self);
const gchar* vala_symbol_get_replacement (ValaSymbol* self);
void vala_symbol_set_deprecated (ValaSymbol* self, gboolean value);
gboolean vala_class_get_is_compact (ValaClass* self);
ValaMethod* vala_class_get_default_construction_method (ValaClass* self);
static void vala_gir_parser_node_finalize (ValaGirParserNode* obj);
enum  {
      VALA_GIR_PARSER_PARAMETER_INFO_DUMMY_PROPERTY
};
static void vala_gir_parser_parameter_info_finalize (ValaGirParserParameterInfo* 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 gchar* string_replace (const gchar* self, const gchar* old, const gchar* replacement) {
      gchar* result = NULL;
      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);
      {
            gchar* _tmp0_ = NULL;
            gchar* _tmp1_;
            GRegex* _tmp2_ = NULL;
            GRegex* _tmp3_;
            GRegex* regex;
            gchar* _tmp4_ = NULL;
            gchar* _tmp5_;
            _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;
      }
      goto __finally2;
      __catch2_g_regex_error:
      {
            GError* e = NULL;
            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_IDX, "VALA_GIR_PARSER_ARGUMENT_TYPE_ARRAY_LENGTH_IDX", "array-length-idx"}, {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"}, {VALA_GIR_PARSER_ARGUMENT_TYPE_SCOPE, "VALA_GIR_PARSER_ARGUMENT_TYPE_SCOPE", "scope"}, {VALA_GIR_PARSER_ARGUMENT_TYPE_STRUCT, "VALA_GIR_PARSER_ARGUMENT_TYPE_STRUCT", "struct"}, {VALA_GIR_PARSER_ARGUMENT_TYPE_THROWS, "VALA_GIR_PARSER_ARGUMENT_TYPE_THROWS", "throws"}, {VALA_GIR_PARSER_ARGUMENT_TYPE_PRINTF_FORMAT, "VALA_GIR_PARSER_ARGUMENT_TYPE_PRINTF_FORMAT", "printf-format"}, {VALA_GIR_PARSER_ARGUMENT_TYPE_ARRAY_LENGTH_FIELD, "VALA_GIR_PARSER_ARGUMENT_TYPE_ARRAY_LENGTH_FIELD", "array-length-field"}, {VALA_GIR_PARSER_ARGUMENT_TYPE_SENTINEL, "VALA_GIR_PARSER_ARGUMENT_TYPE_SENTINEL", "sentinel"}, {VALA_GIR_PARSER_ARGUMENT_TYPE_CLOSURE, "VALA_GIR_PARSER_ARGUMENT_TYPE_CLOSURE", "closure"}, {VALA_GIR_PARSER_ARGUMENT_TYPE_CPREFIX, "VALA_GIR_PARSER_ARGUMENT_TYPE_CPREFIX", "cprefix"}, {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;
}


/**
 * 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;
}


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


static gpointer _vala_gir_parser_node_ref0 (gpointer self) {
      return self ? vala_gir_parser_node_ref (self) : NULL;
}


static gpointer _vala_iterable_ref0 (gpointer self) {
      return self ? vala_iterable_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_;
      ValaGirParserNode* _tmp5_ = NULL;
      ValaNamespace* _tmp6_ = NULL;
      ValaSymbol* _tmp7_;
      ValaArrayList* _tmp8_ = NULL;
      ValaGirParserNode* _tmp9_;
      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;
      _tmp5_ = vala_gir_parser_node_new (NULL);
      _vala_gir_parser_node_unref0 (self->priv->root);
      self->priv->root = _tmp5_;
      _tmp6_ = vala_code_context_get_root (context);
      _tmp7_ = _vala_code_node_ref0 ((ValaSymbol*) _tmp6_);
      _vala_code_node_unref0 (self->priv->root->symbol);
      self->priv->root->symbol = _tmp7_;
      _tmp8_ = vala_array_list_new (VALA_GIR_PARSER_TYPE_NODE, (GBoxedCopyFunc) vala_gir_parser_node_ref, vala_gir_parser_node_unref, g_direct_equal);
      _vala_iterable_unref0 (self->priv->tree_stack);
      self->priv->tree_stack = _tmp8_;
      _tmp9_ = _vala_gir_parser_node_ref0 (self->priv->root);
      _vala_gir_parser_node_unref0 (self->priv->current);
      self->priv->current = _tmp9_;
      vala_code_context_accept (context, (ValaCodeVisitor*) self);
      vala_gir_parser_resolve_gir_symbols (self);
      vala_gir_parser_create_new_namespaces (self);
      vala_gir_parser_node_process (self->priv->root, self);
      {
            ValaArrayList* _tmp10_;
            ValaArrayList* _node_list;
            gint _tmp11_;
            gint _node_size;
            gint _node_index;
            _tmp10_ = _vala_iterable_ref0 (self->priv->root->members);
            _node_list = _tmp10_;
            _tmp11_ = vala_collection_get_size ((ValaCollection*) _node_list);
            _node_size = _tmp11_;
            _node_index = -1;
            while (TRUE) {
                  gpointer _tmp12_ = NULL;
                  ValaGirParserNode* node;
                  _node_index = _node_index + 1;
                  if (!(_node_index < _node_size)) {
                        break;
                  }
                  _tmp12_ = vala_list_get ((ValaList*) _node_list, _node_index);
                  node = (ValaGirParserNode*) _tmp12_;
                  vala_gir_parser_report_unused_metadata (self, node->metadata);
                  _vala_gir_parser_node_unref0 (node);
            }
            _vala_iterable_unref0 (_node_list);
      }
}


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, 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 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_;
      const gchar* _tmp3_ = NULL;
      gchar* _tmp4_ = NULL;
      gchar* metadata_filename;
      gboolean _tmp5_ = FALSE;
      ValaSourceFile* _tmp11_;
      const gchar* _tmp12_ = NULL;
      ValaMarkupReader* _tmp13_ = 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_source_file_get_filename (source_file);
      _tmp4_ = vala_code_context_get_metadata_path (self->priv->context, _tmp3_);
      metadata_filename = _tmp4_;
      if (metadata_filename != NULL) {
            gboolean _tmp6_;
            _tmp6_ = g_file_test (metadata_filename, G_FILE_TEST_EXISTS);
            _tmp5_ = _tmp6_;
      } else {
            _tmp5_ = FALSE;
      }
      if (_tmp5_) {
            ValaGirParserMetadataParser* _tmp7_ = NULL;
            ValaGirParserMetadataParser* metadata_parser;
            ValaSourceFileType _tmp8_;
            ValaSourceFile* _tmp9_ = NULL;
            ValaSourceFile* metadata_file;
            ValaGirParserMetadata* _tmp10_ = NULL;
            _tmp7_ = vala_gir_parser_metadata_parser_new ();
            metadata_parser = _tmp7_;
            _tmp8_ = vala_source_file_get_file_type (source_file);
            _tmp9_ = vala_source_file_new (self->priv->context, _tmp8_, metadata_filename, NULL);
            metadata_file = _tmp9_;
            vala_code_context_add_source_file (self->priv->context, metadata_file);
            _tmp10_ = vala_gir_parser_metadata_parser_parse_metadata (metadata_parser, metadata_file);
            _vala_gir_parser_metadata_unref0 (self->priv->metadata);
            self->priv->metadata = _tmp10_;
            _vala_source_file_unref0 (metadata_file);
            _vala_gir_parser_metadata_parser_unref0 (metadata_parser);
      }
      _tmp11_ = _vala_source_file_ref0 (source_file);
      _vala_source_file_unref0 (self->priv->current_source_file);
      self->priv->current_source_file = _tmp11_;
      _tmp12_ = vala_source_file_get_filename (source_file);
      _tmp13_ = vala_markup_reader_new (_tmp12_);
      _g_object_unref0 (self->priv->reader);
      self->priv->reader = _tmp13_;
      vala_gir_parser_next (self);
      vala_gir_parser_next (self);
      vala_gir_parser_next (self);
      vala_gir_parser_parse_repository (self);
      _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 (ValaSymbol* container, ValaSymbol* sym) {
      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 {
                                    if (VALA_IS_ERROR_DOMAIN (container)) {
                                          ValaErrorDomain* ed;
                                          ed = VALA_ERROR_DOMAIN (container);
                                          if (VALA_IS_ERROR_CODE (sym)) {
                                                vala_error_domain_add_code (ed, VALA_ERROR_CODE (sym));
                                          } else {
                                                if (VALA_IS_METHOD (sym)) {
                                                      vala_symbol_add_method ((ValaSymbol*) ed, VALA_METHOD (sym));
                                                }
                                          }
                                    } else {
                                          ValaSourceReference* _tmp0_ = NULL;
                                          const gchar* _tmp1_ = NULL;
                                          const gchar* _tmp2_ = NULL;
                                          gchar* _tmp3_ = NULL;
                                          gchar* _tmp4_;
                                          _tmp0_ = vala_code_node_get_source_reference ((ValaCodeNode*) sym);
                                          _tmp1_ = vala_symbol_get_name (sym);
                                          _tmp2_ = vala_symbol_get_name (container);
                                          _tmp3_ = g_strdup_printf ("impossible to add `%s' to container `%s'", _tmp1_, _tmp2_);
                                          _tmp4_ = _tmp3_;
                                          vala_report_error (_tmp0_, _tmp4_);
                                          _g_free0 (_tmp4_);
                                    }
                              }
                        }
                  }
            }
      }
}


static gboolean vala_gir_parser_is_container (ValaSymbol* sym) {
      gboolean result = FALSE;
      gboolean _tmp0_ = FALSE;
      gboolean _tmp1_ = FALSE;
      gboolean _tmp2_ = FALSE;
      gboolean _tmp3_ = FALSE;
      g_return_val_if_fail (sym != NULL, FALSE);
      if (VALA_IS_OBJECT_TYPE_SYMBOL (sym)) {
            _tmp3_ = TRUE;
      } else {
            _tmp3_ = VALA_IS_STRUCT (sym);
      }
      if (_tmp3_) {
            _tmp2_ = TRUE;
      } else {
            _tmp2_ = VALA_IS_NAMESPACE (sym);
      }
      if (_tmp2_) {
            _tmp1_ = TRUE;
      } else {
            _tmp1_ = VALA_IS_ERROR_DOMAIN (sym);
      }
      if (_tmp1_) {
            _tmp0_ = TRUE;
      } else {
            _tmp0_ = VALA_IS_ENUM (sym);
      }
      result = _tmp0_;
      return result;
}


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 = NULL;
            gint s_collection_length1 = 0;
            gint _s_collection_size_ = 0;
            gint 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 = NULL;
                  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 void vala_gir_parser_set_symbol_mapping (ValaGirParser* self, ValaUnresolvedSymbol* 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);
      }
}


static void vala_gir_parser_assume_parameter_names (ValaGirParser* self, ValaSignal* sig, ValaSymbol* sym, gboolean skip_first) {
      ValaIterator* iter = NULL;
      gboolean first;
      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_);
      }
      first = TRUE;
      {
            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_;
                  gboolean _tmp10_ = FALSE;
                  gpointer _tmp12_ = NULL;
                  ValaParameter* _tmp13_;
                  const gchar* _tmp14_ = 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;
                  }
                  if (skip_first) {
                        _tmp10_ = first;
                  } else {
                        _tmp10_ = FALSE;
                  }
                  if (_tmp10_) {
                        gboolean _tmp11_;
                        _tmp11_ = vala_iterator_next (iter);
                        if (!_tmp11_) {
                              _vala_code_node_unref0 (param);
                              break;
                        }
                        first = FALSE;
                  }
                  _tmp12_ = vala_iterator_get (iter);
                  _tmp13_ = (ValaParameter*) _tmp12_;
                  _tmp14_ = vala_symbol_get_name ((ValaSymbol*) _tmp13_);
                  vala_symbol_set_name ((ValaSymbol*) param, _tmp14_);
                  _vala_code_node_unref0 (_tmp13_);
                  _vala_code_node_unref0 (param);
            }
            _vala_iterable_unref0 (_param_list);
      }
      _vala_iterator_unref0 (iter);
}


static ValaGirParserNode* vala_gir_parser_find_invoker (ValaGirParser* self, ValaGirParserNode* node) {
      ValaGirParserNode* result = NULL;
      ValaMethod* _tmp0_;
      ValaMethod* m;
      const gchar* _tmp1_ = NULL;
      gchar* _tmp2_ = NULL;
      gchar* prefix;
      g_return_val_if_fail (self != NULL, NULL);
      g_return_val_if_fail (node != NULL, NULL);
      _tmp0_ = _vala_code_node_ref0 (VALA_METHOD (node->symbol));
      m = _tmp0_;
      _tmp1_ = vala_symbol_get_name ((ValaSymbol*) m);
      _tmp2_ = g_strdup_printf ("%s_", _tmp1_);
      prefix = _tmp2_;
      {
            ValaArrayList* _tmp3_;
            ValaArrayList* _n_list;
            gint _tmp4_;
            gint _n_size;
            gint _n_index;
            _tmp3_ = _vala_iterable_ref0 (node->parent->members);
            _n_list = _tmp3_;
            _tmp4_ = vala_collection_get_size ((ValaCollection*) _n_list);
            _n_size = _tmp4_;
            _n_index = -1;
            while (TRUE) {
                  gpointer _tmp5_ = NULL;
                  ValaGirParserNode* n;
                  gboolean _tmp6_;
                  ValaSymbol* _tmp7_;
                  ValaMethod* _tmp8_;
                  ValaMethod* invoker;
                  gboolean _tmp9_ = FALSE;
                  ValaList* _tmp16_ = NULL;
                  ValaList* _tmp17_;
                  ValaIterator* _tmp18_ = NULL;
                  ValaIterator* _tmp19_;
                  ValaIterator* iter;
                  _n_index = _n_index + 1;
                  if (!(_n_index < _n_size)) {
                        break;
                  }
                  _tmp5_ = vala_list_get ((ValaList*) _n_list, _n_index);
                  n = (ValaGirParserNode*) _tmp5_;
                  _tmp6_ = g_str_has_prefix (n->name, prefix);
                  if (!_tmp6_) {
                        _vala_gir_parser_node_unref0 (n);
                        continue;
                  }
                  _tmp7_ = n->symbol;
                  _tmp8_ = _vala_code_node_ref0 (VALA_IS_METHOD (_tmp7_) ? ((ValaMethod*) _tmp7_) : NULL);
                  invoker = _tmp8_;
                  if (invoker == NULL) {
                        _tmp9_ = TRUE;
                  } else {
                        ValaList* _tmp10_ = NULL;
                        ValaList* _tmp11_;
                        gint _tmp12_;
                        ValaList* _tmp13_ = NULL;
                        ValaList* _tmp14_;
                        gint _tmp15_;
                        _tmp10_ = vala_method_get_parameters (m);
                        _tmp11_ = _tmp10_;
                        _tmp12_ = vala_collection_get_size ((ValaCollection*) _tmp11_);
                        _tmp13_ = vala_method_get_parameters (invoker);
                        _tmp14_ = _tmp13_;
                        _tmp15_ = vala_collection_get_size ((ValaCollection*) _tmp14_);
                        _tmp9_ = _tmp12_ != _tmp15_;
                        _vala_iterable_unref0 (_tmp14_);
                        _vala_iterable_unref0 (_tmp11_);
                  }
                  if (_tmp9_) {
                        _vala_code_node_unref0 (invoker);
                        _vala_gir_parser_node_unref0 (n);
                        continue;
                  }
                  _tmp16_ = vala_method_get_parameters (invoker);
                  _tmp17_ = _tmp16_;
                  _tmp18_ = vala_iterable_iterator ((ValaIterable*) _tmp17_);
                  _tmp19_ = _tmp18_;
                  _vala_iterable_unref0 (_tmp17_);
                  iter = _tmp19_;
                  {
                        ValaList* _tmp20_ = NULL;
                        ValaList* _param_list;
                        gint _tmp21_;
                        gint _param_size;
                        gint _param_index;
                        _tmp20_ = vala_method_get_parameters (m);
                        _param_list = _tmp20_;
                        _tmp21_ = vala_collection_get_size ((ValaCollection*) _param_list);
                        _param_size = _tmp21_;
                        _param_index = -1;
                        while (TRUE) {
                              gpointer _tmp22_ = NULL;
                              ValaParameter* param;
                              gboolean _tmp23_;
                              const gchar* _tmp24_ = NULL;
                              gpointer _tmp25_ = NULL;
                              ValaParameter* _tmp26_;
                              const gchar* _tmp27_ = NULL;
                              gboolean _tmp28_;
                              _param_index = _param_index + 1;
                              if (!(_param_index < _param_size)) {
                                    break;
                              }
                              _tmp22_ = vala_list_get (_param_list, _param_index);
                              param = (ValaParameter*) _tmp22_;
                              _tmp23_ = vala_iterator_next (iter);
                              g_assert (_tmp23_);
                              _tmp24_ = vala_symbol_get_name ((ValaSymbol*) param);
                              _tmp25_ = vala_iterator_get (iter);
                              _tmp26_ = (ValaParameter*) _tmp25_;
                              _tmp27_ = vala_symbol_get_name ((ValaSymbol*) _tmp26_);
                              _tmp28_ = g_strcmp0 (_tmp24_, _tmp27_) != 0;
                              _vala_code_node_unref0 (_tmp26_);
                              if (_tmp28_) {
                                    _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 = n;
                        _vala_iterator_unref0 (iter);
                        _vala_code_node_unref0 (invoker);
                        _vala_iterable_unref0 (_n_list);
                        _g_free0 (prefix);
                        _vala_code_node_unref0 (m);
                        return result;
                  }
                  _vala_iterator_unref0 (iter);
                  _vala_code_node_unref0 (invoker);
                  _vala_gir_parser_node_unref0 (n);
            }
            _vala_iterable_unref0 (_n_list);
      }
      result = NULL;
      _g_free0 (prefix);
      _vala_code_node_unref0 (m);
      return result;
}


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 >= ((glong) 0)) {
            _tmp0_ = len >= ((glong) 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 < ((glong) 0)) {
            offset = string_length + offset;
            g_return_val_if_fail (offset >= ((glong) 0), NULL);
      } else {
            g_return_val_if_fail (offset <= string_length, NULL);
      }
      if (len < ((glong) 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 ValaGirParserMetadata* vala_gir_parser_get_current_metadata (ValaGirParser* self) {
      ValaGirParserMetadata* result = NULL;
      const gchar* _tmp0_ = NULL;
      gchar* _tmp1_;
      gchar* selector;
      gchar* _tmp2_ = NULL;
      gchar* child_name;
      gchar* _tmp5_ = NULL;
      gchar* _tmp6_ = NULL;
      gboolean _tmp7_;
      ValaGirParserMetadata* _tmp10_ = NULL;
      g_return_val_if_fail (self != NULL, NULL);
      _tmp0_ = vala_markup_reader_get_name (self->priv->reader);
      _tmp1_ = g_strdup (_tmp0_);
      selector = _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 (selector);
            return result;
      }
      _tmp5_ = string_replace (selector, "-", "_");
      _g_free0 (selector);
      selector = _tmp5_;
      _tmp6_ = string_replace (child_name, "-", "_");
      _g_free0 (child_name);
      child_name = _tmp6_;
      _tmp7_ = g_str_has_prefix (selector, "glib:");
      if (_tmp7_) {
            gint _tmp8_;
            gchar* _tmp9_ = NULL;
            _tmp8_ = strlen ("glib:");
            _tmp9_ = string_substring (selector, (glong) _tmp8_, (glong) (-1));
            _g_free0 (selector);
            selector = _tmp9_;
      }
      _tmp10_ = vala_gir_parser_metadata_match_child (self->priv->metadata, child_name, selector);
      result = _tmp10_;
      _g_free0 (child_name);
      _g_free0 (selector);
      return result;
}


static gboolean vala_gir_parser_push_metadata (ValaGirParser* self) {
      gboolean result = FALSE;
      ValaGirParserMetadata* _tmp0_ = NULL;
      ValaGirParserMetadata* new_metadata;
      gboolean _tmp1_;
      ValaGirParserMetadata* _tmp9_;
      g_return_val_if_fail (self != NULL, FALSE);
      _tmp0_ = vala_gir_parser_get_current_metadata (self);
      new_metadata = _tmp0_;
      _tmp1_ = vala_gir_parser_metadata_has_argument (new_metadata, VALA_GIR_PARSER_ARGUMENT_TYPE_SKIP);
      if (_tmp1_) {
            gboolean _tmp2_;
            _tmp2_ = vala_gir_parser_metadata_get_bool (new_metadata, VALA_GIR_PARSER_ARGUMENT_TYPE_SKIP);
            if (_tmp2_) {
                  result = FALSE;
                  _vala_gir_parser_metadata_unref0 (new_metadata);
                  return result;
            }
      } else {
            gboolean _tmp3_ = FALSE;
            gchar* _tmp4_ = NULL;
            gchar* _tmp5_;
            gboolean _tmp6_;
            _tmp4_ = vala_markup_reader_get_attribute (self->priv->reader, "introspectable");
            _tmp5_ = _tmp4_;
            _tmp6_ = g_strcmp0 (_tmp5_, "0") == 0;
            _g_free0 (_tmp5_);
            if (_tmp6_) {
                  _tmp3_ = TRUE;
            } else {
                  gchar* _tmp7_ = NULL;
                  gchar* _tmp8_;
                  _tmp7_ = vala_markup_reader_get_attribute (self->priv->reader, "private");
                  _tmp8_ = _tmp7_;
                  _tmp3_ = g_strcmp0 (_tmp8_, "1") == 0;
                  _g_free0 (_tmp8_);
            }
            if (_tmp3_) {
                  result = FALSE;
                  _vala_gir_parser_metadata_unref0 (new_metadata);
                  return result;
            }
      }
      vala_collection_add ((ValaCollection*) self->priv->metadata_stack, self->priv->metadata);
      _tmp9_ = _vala_gir_parser_metadata_ref0 (new_metadata);
      _vala_gir_parser_metadata_unref0 (self->priv->metadata);
      self->priv->metadata = _tmp9_;
      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_;
      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);
}


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 = NULL;
                  e = _inner_error_;
                  _inner_error_ = NULL;
                  g_error ("valagirparser.vala:1281: 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 = FALSE;
                  } 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;
      gboolean _tmp0_;
      g_return_val_if_fail (self != NULL, NULL);
      g_return_val_if_fail (attribute_name != NULL, NULL);
      _tmp0_ = vala_gir_parser_metadata_has_argument (self->priv->metadata, arg_type);
      if (_tmp0_) {
            gchar* _tmp1_ = NULL;
            _tmp1_ = vala_gir_parser_metadata_get_string (self->priv->metadata, arg_type);
            result = _tmp1_;
            return result;
      } else {
            gchar* _tmp2_ = NULL;
            _tmp2_ = vala_markup_reader_get_attribute (self->priv->reader, attribute_name);
            result = _tmp2_;
            return result;
      }
}


static ValaDataType* vala_gir_parser_element_get_type (ValaGirParser* self, ValaDataType* orig_type, gboolean owned_by_default, gboolean* no_array_length, gboolean* changed) {
      gboolean _changed = FALSE;
      ValaDataType* result = NULL;
      ValaDataType* _tmp0_;
      ValaDataType* type;
      gboolean _tmp1_;
      gboolean _tmp22_ = FALSE;
      g_return_val_if_fail (self != NULL, NULL);
      g_return_val_if_fail (orig_type != NULL, 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;
            _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_);
            _vala_code_node_unref0 (type);
            type = _tmp6_;
            _vala_source_reference_unref0 (_tmp5_);
            _g_free0 (_tmp3_);
            _changed = TRUE;
      } else {
            if (!VALA_IS_VOID_TYPE (type)) {
                  gboolean _tmp7_;
                  gboolean _tmp12_;
                  gboolean _tmp15_;
                  gboolean _tmp20_;
                  _tmp7_ = vala_gir_parser_metadata_has_argument (self->priv->metadata, VALA_GIR_PARSER_ARGUMENT_TYPE_TYPE_ARGUMENTS);
                  if (_tmp7_) {
                        gchar* _tmp8_ = NULL;
                        gchar* _tmp9_;
                        ValaSourceReference* _tmp10_ = NULL;
                        ValaSourceReference* _tmp11_;
                        vala_data_type_remove_all_type_arguments (type);
                        _tmp8_ = vala_gir_parser_metadata_get_string (self->priv->metadata, VALA_GIR_PARSER_ARGUMENT_TYPE_TYPE_ARGUMENTS);
                        _tmp9_ = _tmp8_;
                        _tmp10_ = vala_gir_parser_metadata_get_source_reference (self->priv->metadata, VALA_GIR_PARSER_ARGUMENT_TYPE_TYPE_ARGUMENTS);
                        _tmp11_ = _tmp10_;
                        vala_gir_parser_parse_type_arguments_from_string (self, type, _tmp9_, _tmp11_);
                        _vala_source_reference_unref0 (_tmp11_);
                        _g_free0 (_tmp9_);
                  }
                  _tmp12_ = vala_gir_parser_metadata_get_bool (self->priv->metadata, VALA_GIR_PARSER_ARGUMENT_TYPE_ARRAY);
                  if (_tmp12_) {
                        ValaSourceReference* _tmp13_ = NULL;
                        ValaArrayType* _tmp14_ = NULL;
                        _tmp13_ = vala_code_node_get_source_reference ((ValaCodeNode*) type);
                        _tmp14_ = vala_array_type_new (type, 1, _tmp13_);
                        _vala_code_node_unref0 (type);
                        type = (ValaDataType*) _tmp14_;
                        _changed = TRUE;
                  }
                  _tmp15_ = vala_data_type_get_value_owned (type);
                  if (_tmp15_) {
                        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_);
                  }
            }
      }
      if (VALA_IS_ARRAY_TYPE (type)) {
            _tmp22_ = !VALA_IS_ARRAY_TYPE (orig_type);
      } else {
            _tmp22_ = FALSE;
      }
      if (_tmp22_) {
            *no_array_length = TRUE;
      }
      result = type;
      if (changed) {
            *changed = _changed;
      }
      return result;
}


static gchar* vala_gir_parser_element_get_name (ValaGirParser* self, const gchar* gir_name) {
      gchar* result = NULL;
      gchar* _tmp0_;
      gchar* name;
      gchar* _tmp2_ = NULL;
      gchar* pattern;
      GError * _inner_error_ = NULL;
      g_return_val_if_fail (self != NULL, NULL);
      _tmp0_ = g_strdup (gir_name);
      name = _tmp0_;
      if (name == NULL) {
            gchar* _tmp1_ = NULL;
            _tmp1_ = vala_markup_reader_get_attribute (self->priv->reader, "name");
            _g_free0 (name);
            name = _tmp1_;
      }
      _tmp2_ = vala_gir_parser_metadata_get_string (self->priv->metadata, VALA_GIR_PARSER_ARGUMENT_TYPE_NAME);
      pattern = _tmp2_;
      if (pattern != NULL) {
            {
                  GRegex* _tmp3_ = NULL;
                  GRegex* regex;
                  GMatchInfo* match = NULL;
                  GMatchInfo* _tmp4_ = NULL;
                  gboolean _tmp5_;
                  _tmp3_ = g_regex_new (pattern, G_REGEX_ANCHORED, G_REGEX_MATCH_ANCHORED, &_inner_error_);
                  regex = _tmp3_;
                  if (_inner_error_ != NULL) {
                        goto __catch4_g_error;
                  }
                  _tmp5_ = g_regex_match (regex, name, 0, &_tmp4_);
                  _g_match_info_free0 (match);
                  match = _tmp4_;
                  if (!_tmp5_) {
                        gchar* _tmp6_;
                        _tmp6_ = g_strdup (pattern);
                        _g_free0 (name);
                        name = _tmp6_;
                  } else {
                        gchar* _tmp7_ = NULL;
                        gchar* matched;
                        gboolean _tmp8_ = FALSE;
                        _tmp7_ = g_match_info_fetch (match, 1);
                        matched = _tmp7_;
                        if (matched != NULL) {
                              gint _tmp9_;
                              _tmp9_ = strlen (matched);
                              _tmp8_ = _tmp9_ > 0;
                        } else {
                              _tmp8_ = FALSE;
                        }
                        if (_tmp8_) {
                              gchar* _tmp10_;
                              _tmp10_ = g_strdup (matched);
                              _g_free0 (name);
                              name = _tmp10_;
                        } else {
                              gchar* _tmp11_;
                              _tmp11_ = g_strdup (pattern);
                              _g_free0 (name);
                              name = _tmp11_;
                        }
                        _g_free0 (matched);
                  }
                  _g_match_info_free0 (match);
                  _g_regex_unref0 (regex);
            }
            goto __finally4;
            __catch4_g_error:
            {
                  GError* e = NULL;
                  gchar* _tmp12_;
                  e = _inner_error_;
                  _inner_error_ = NULL;
                  _tmp12_ = g_strdup (pattern);
                  _g_free0 (name);
                  name = _tmp12_;
                  _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;
            }
      } else {
            gboolean _tmp13_ = FALSE;
            if (name != NULL) {
                  gboolean _tmp14_;
                  _tmp14_ = g_str_has_suffix (name, "Enum");
                  _tmp13_ = _tmp14_;
            } else {
                  _tmp13_ = FALSE;
            }
            if (_tmp13_) {
                  gint _tmp15_;
                  gint _tmp16_;
                  gchar* _tmp17_ = NULL;
                  _tmp15_ = strlen (name);
                  _tmp16_ = strlen ("Enum");
                  _tmp17_ = string_substring (name, (glong) 0, (glong) (_tmp15_ - _tmp16_));
                  _g_free0 (name);
                  name = _tmp17_;
            }
      }
      result = name;
      _g_free0 (pattern);
      return result;
}


static void vala_gir_parser_set_array_ccode (ValaGirParser* self, ValaSymbol* sym, ValaGirParserParameterInfo* info) {
      ValaDataType* _tmp4_ = NULL;
      gchar* _tmp5_ = NULL;
      gchar* type_name;
      g_return_if_fail (self != NULL);
      g_return_if_fail (sym != NULL);
      g_return_if_fail (info != NULL);
      if (VALA_IS_METHOD (sym)) {
            ValaMethod* _tmp0_;
            ValaMethod* m;
            _tmp0_ = _vala_code_node_ref0 (VALA_METHOD (sym));
            m = _tmp0_;
            vala_method_set_carray_length_parameter_position (m, (gdouble) info->vala_idx);
            _vala_code_node_unref0 (m);
      } else {
            if (VALA_IS_DELEGATE (sym)) {
                  ValaDelegate* _tmp1_;
                  ValaDelegate* d;
                  _tmp1_ = _vala_code_node_ref0 (VALA_DELEGATE (sym));
                  d = _tmp1_;
                  vala_delegate_set_carray_length_parameter_position (d, (gdouble) info->vala_idx);
                  _vala_code_node_unref0 (d);
            } else {
                  ValaParameter* _tmp2_;
                  ValaParameter* param;
                  const gchar* _tmp3_ = NULL;
                  _tmp2_ = _vala_code_node_ref0 (VALA_PARAMETER (sym));
                  param = _tmp2_;
                  vala_parameter_set_carray_length_parameter_position (param, (gdouble) info->vala_idx);
                  _tmp3_ = vala_symbol_get_name ((ValaSymbol*) info->param);
                  vala_variable_set_array_length_cname ((ValaVariable*) param, _tmp3_);
                  _vala_code_node_unref0 (param);
            }
      }
      _tmp4_ = vala_variable_get_variable_type ((ValaVariable*) info->param);
      _tmp5_ = vala_data_type_to_qualified_string (_tmp4_, NULL);
      type_name = _tmp5_;
      if (g_strcmp0 (type_name, "int") != 0) {
            ValaNamespace* _tmp6_ = NULL;
            ValaScope* _tmp7_ = NULL;
            ValaSymbol* _tmp8_ = NULL;
            ValaSymbol* _tmp9_;
            ValaStruct* st;
            _tmp6_ = vala_code_context_get_root (self->priv->context);
            _tmp7_ = vala_symbol_get_scope ((ValaSymbol*) _tmp6_);
            _tmp8_ = vala_scope_lookup (_tmp7_, type_name);
            _tmp9_ = _tmp8_;
            st = VALA_IS_STRUCT (_tmp9_) ? ((ValaStruct*) _tmp9_) : NULL;
            if (st != NULL) {
                  if (VALA_IS_METHOD (sym)) {
                        ValaMethod* _tmp10_;
                        ValaMethod* m;
                        gchar* _tmp11_ = NULL;
                        gchar* _tmp12_;
                        _tmp10_ = _vala_code_node_ref0 (VALA_METHOD (sym));
                        m = _tmp10_;
                        _tmp11_ = vala_typesymbol_get_cname ((ValaTypeSymbol*) st, FALSE);
                        _tmp12_ = _tmp11_;
                        vala_method_set_array_length_type (m, _tmp12_);
                        _g_free0 (_tmp12_);
                        _vala_code_node_unref0 (m);
                  } else {
                        ValaParameter* _tmp13_;
                        ValaParameter* param;
                        gchar* _tmp14_ = NULL;
                        gchar* _tmp15_;
                        _tmp13_ = _vala_code_node_ref0 (VALA_PARAMETER (sym));
                        param = _tmp13_;
                        _tmp14_ = vala_typesymbol_get_cname ((ValaTypeSymbol*) st, FALSE);
                        _tmp15_ = _tmp14_;
                        vala_variable_set_array_length_type ((ValaVariable*) param, _tmp15_);
                        _g_free0 (_tmp15_);
                        _vala_code_node_unref0 (param);
                  }
            }
            _vala_code_node_unref0 (st);
      }
      _g_free0 (type_name);
}


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) {
                  vala_gir_parser_parse_namespace (self);
            } else {
                  const gchar* _tmp10_ = NULL;
                  _tmp10_ = vala_markup_reader_get_name (self->priv->reader);
                  if (g_strcmp0 (_tmp10_, "include") == 0) {
                        vala_gir_parser_parse_include (self);
                  } else {
                        const gchar* _tmp11_ = NULL;
                        _tmp11_ = vala_markup_reader_get_name (self->priv->reader);
                        if (g_strcmp0 (_tmp11_, "package") == 0) {
                              gchar* _tmp12_ = NULL;
                              gchar* pkg;
                              gboolean _tmp13_;
                              _tmp12_ = vala_gir_parser_parse_package (self);
                              pkg = _tmp12_;
                              _tmp13_ = vala_code_context_has_package (self->priv->context, pkg);
                              if (_tmp13_) {
                                    _g_free0 (pkg);
                                    return;
                              } else {
                                    vala_code_context_add_package (self->priv->context, pkg);
                              }
                              _g_free0 (pkg);
                        } else {
                              const gchar* _tmp14_ = NULL;
                              _tmp14_ = vala_markup_reader_get_name (self->priv->reader);
                              if (g_strcmp0 (_tmp14_, "c:include") == 0) {
                                    vala_gir_parser_parse_c_include (self);
                              } else {
                                    ValaSourceReference* _tmp15_ = NULL;
                                    ValaSourceReference* _tmp16_;
                                    const gchar* _tmp17_ = NULL;
                                    gchar* _tmp18_ = NULL;
                                    gchar* _tmp19_;
                                    _tmp15_ = vala_gir_parser_get_current_src (self);
                                    _tmp16_ = _tmp15_;
                                    _tmp17_ = vala_markup_reader_get_name (self->priv->reader);
                                    _tmp18_ = g_strdup_printf ("unknown child element `%s' in `repository'", _tmp17_);
                                    _tmp19_ = _tmp18_;
                                    vala_report_error (_tmp16_, _tmp19_);
                                    _g_free0 (_tmp19_);
                                    _vala_source_reference_unref0 (_tmp16_);
                                    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 ValaGirParserNode* vala_gir_parser_resolve_node (ValaGirParser* self, ValaGirParserNode* parent_scope, ValaUnresolvedSymbol* unresolved_sym, gboolean create_namespace) {
      ValaGirParserNode* 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_sym != NULL, NULL);
      _tmp0_ = vala_unresolved_symbol_get_inner (unresolved_sym);
      if (_tmp0_ == NULL) {
            ValaGirParserNode* _tmp1_;
            ValaGirParserNode* scope;
            _tmp1_ = _vala_gir_parser_node_ref0 (parent_scope);
            scope = _tmp1_;
            while (TRUE) {
                  const gchar* _tmp2_ = NULL;
                  ValaSourceReference* _tmp3_ = NULL;
                  ValaGirParserNode* _tmp4_ = NULL;
                  ValaGirParserNode* node;
                  ValaGirParserNode* _tmp5_;
                  if (!(scope != NULL)) {
                        break;
                  }
                  _tmp2_ = vala_symbol_get_name ((ValaSymbol*) unresolved_sym);
                  _tmp3_ = vala_code_node_get_source_reference ((ValaCodeNode*) unresolved_sym);
                  _tmp4_ = vala_gir_parser_node_lookup (scope, _tmp2_, create_namespace, _tmp3_);
                  node = _tmp4_;
                  if (node != NULL) {
                        result = node;
                        _vala_gir_parser_node_unref0 (scope);
                        return result;
                  }
                  _tmp5_ = _vala_gir_parser_node_ref0 (scope->parent);
                  _vala_gir_parser_node_unref0 (scope);
                  scope = _tmp5_;
                  _vala_gir_parser_node_unref0 (node);
            }
            _vala_gir_parser_node_unref0 (scope);
      } else {
            ValaUnresolvedSymbol* _tmp6_ = NULL;
            ValaGirParserNode* _tmp7_ = NULL;
            ValaGirParserNode* inner;
            _tmp6_ = vala_unresolved_symbol_get_inner (unresolved_sym);
            _tmp7_ = vala_gir_parser_resolve_node (self, parent_scope, _tmp6_, create_namespace);
            inner = _tmp7_;
            if (inner != NULL) {
                  const gchar* _tmp8_ = NULL;
                  ValaSourceReference* _tmp9_ = NULL;
                  ValaGirParserNode* _tmp10_ = NULL;
                  _tmp8_ = vala_symbol_get_name ((ValaSymbol*) unresolved_sym);
                  _tmp9_ = vala_code_node_get_source_reference ((ValaCodeNode*) unresolved_sym);
                  _tmp10_ = vala_gir_parser_node_lookup (inner, _tmp8_, create_namespace, _tmp9_);
                  result = _tmp10_;
                  _vala_gir_parser_node_unref0 (inner);
                  return result;
            }
            _vala_gir_parser_node_unref0 (inner);
      }
      result = NULL;
      return result;
}


static ValaSymbol* vala_gir_parser_resolve_symbol (ValaGirParser* self, ValaGirParserNode* parent_scope, ValaUnresolvedSymbol* unresolved_sym) {
      ValaSymbol* result = NULL;
      ValaGirParserNode* _tmp0_ = NULL;
      ValaGirParserNode* node;
      g_return_val_if_fail (self != NULL, NULL);
      g_return_val_if_fail (parent_scope != NULL, NULL);
      g_return_val_if_fail (unresolved_sym != NULL, NULL);
      _tmp0_ = vala_gir_parser_resolve_node (self, parent_scope, unresolved_sym, FALSE);
      node = _tmp0_;
      if (node != NULL) {
            ValaSymbol* _tmp1_;
            _tmp1_ = _vala_code_node_ref0 (node->symbol);
            result = _tmp1_;
            _vala_gir_parser_node_unref0 (node);
            return result;
      }
      result = NULL;
      _vala_gir_parser_node_unref0 (node);
      return result;
}


static void vala_gir_parser_push_node (ValaGirParser* self, const gchar* name, gboolean merge) {
      ValaGirParserNode* _tmp0_;
      ValaGirParserNode* parent;
      gboolean _tmp1_;
      ValaGirParserNode* _tmp9_ = NULL;
      ValaGirParserNode* node;
      gboolean _tmp10_ = FALSE;
      const gchar* _tmp13_ = NULL;
      gchar* _tmp14_;
      ValaMap* _tmp15_ = NULL;
      ValaGirParserMetadata* _tmp16_;
      ValaSourceReference* _tmp17_ = NULL;
      gpointer _tmp18_ = NULL;
      gchar* gir_name;
      gboolean _tmp20_ = FALSE;
      ValaGirParserNode* _tmp25_;
      g_return_if_fail (self != NULL);
      g_return_if_fail (name != NULL);
      _tmp0_ = _vala_gir_parser_node_ref0 (self->priv->current);
      parent = _tmp0_;
      _tmp1_ = vala_gir_parser_metadata_has_argument (self->priv->metadata, VALA_GIR_PARSER_ARGUMENT_TYPE_PARENT);
      if (_tmp1_) {
            gchar* _tmp2_ = NULL;
            gchar* _tmp3_;
            ValaSourceReference* _tmp4_ = NULL;
            ValaSourceReference* _tmp5_;
            ValaUnresolvedSymbol* _tmp6_ = NULL;
            ValaUnresolvedSymbol* _tmp7_;
            ValaUnresolvedSymbol* target;
            ValaGirParserNode* _tmp8_ = NULL;
            _tmp2_ = vala_gir_parser_metadata_get_string (self->priv->metadata, VALA_GIR_PARSER_ARGUMENT_TYPE_PARENT);
            _tmp3_ = _tmp2_;
            _tmp4_ = vala_gir_parser_metadata_get_source_reference (self->priv->metadata, VALA_GIR_PARSER_ARGUMENT_TYPE_PARENT);
            _tmp5_ = _tmp4_;
            _tmp6_ = vala_gir_parser_parse_symbol_from_string (self, _tmp3_, _tmp5_);
            _tmp7_ = _tmp6_;
            _vala_source_reference_unref0 (_tmp5_);
            _g_free0 (_tmp3_);
            target = _tmp7_;
            _tmp8_ = vala_gir_parser_resolve_node (self, self->priv->root, target, TRUE);
            _vala_gir_parser_node_unref0 (parent);
            parent = _tmp8_;
            _vala_code_node_unref0 (target);
      }
      _tmp9_ = vala_gir_parser_node_lookup (parent, name, FALSE, NULL);
      node = _tmp9_;
      if (node == NULL) {
            _tmp10_ = TRUE;
      } else {
            gboolean _tmp11_ = FALSE;
            if (node->symbol != NULL) {
                  _tmp11_ = !merge;
            } else {
                  _tmp11_ = FALSE;
            }
            _tmp10_ = _tmp11_;
      }
      if (_tmp10_) {
            ValaGirParserNode* _tmp12_ = NULL;
            _tmp12_ = vala_gir_parser_node_new (name);
            _vala_gir_parser_node_unref0 (node);
            node = _tmp12_;
            node->new_symbol = TRUE;
            vala_gir_parser_node_add_member (parent, node);
      } else {
            vala_collection_remove ((ValaCollection*) vala_gir_parser_node_new_namespaces, node);
      }
      _tmp13_ = vala_markup_reader_get_name (self->priv->reader);
      _tmp14_ = g_strdup (_tmp13_);
      _g_free0 (node->element_type);
      node->element_type = _tmp14_;
      _tmp15_ = vala_markup_reader_get_attributes (self->priv->reader);
      _vala_map_unref0 (node->girdata);
      node->girdata = _tmp15_;
      _tmp16_ = _vala_gir_parser_metadata_ref0 (self->priv->metadata);
      _vala_gir_parser_metadata_unref0 (node->metadata);
      node->metadata = _tmp16_;
      _tmp17_ = vala_gir_parser_get_current_src (self);
      _vala_source_reference_unref0 (node->source_reference);
      node->source_reference = _tmp17_;
      _tmp18_ = vala_map_get (node->girdata, "name");
      gir_name = (gchar*) _tmp18_;
      if (gir_name == NULL) {
            gpointer _tmp19_ = NULL;
            _tmp19_ = vala_map_get (node->girdata, "glib:name");
            _g_free0 (gir_name);
            gir_name = (gchar*) _tmp19_;
      }
      if (parent != self->priv->current) {
            _tmp20_ = TRUE;
      } else {
            _tmp20_ = g_strcmp0 (gir_name, name) != 0;
      }
      if (_tmp20_) {
            ValaUnresolvedSymbol* _tmp21_ = NULL;
            ValaUnresolvedSymbol* _tmp22_;
            ValaUnresolvedSymbol* _tmp23_ = NULL;
            ValaUnresolvedSymbol* _tmp24_;
            _tmp21_ = vala_unresolved_symbol_new (NULL, gir_name, NULL);
            _tmp22_ = _tmp21_;
            _tmp23_ = vala_gir_parser_node_get_unresolved_symbol (node);
            _tmp24_ = _tmp23_;
            vala_gir_parser_set_symbol_mapping (self, _tmp22_, (ValaSymbol*) _tmp24_);
            _vala_code_node_unref0 (_tmp24_);
            _vala_code_node_unref0 (_tmp22_);
      }
      vala_collection_add ((ValaCollection*) self->priv->tree_stack, self->priv->current);
      _tmp25_ = _vala_gir_parser_node_ref0 (node);
      _vala_gir_parser_node_unref0 (self->priv->current);
      self->priv->current = _tmp25_;
      _g_free0 (gir_name);
      _vala_gir_parser_node_unref0 (node);
      _vala_gir_parser_node_unref0 (parent);
}


static void vala_gir_parser_pop_node (ValaGirParser* self) {
      ValaGirParserNode* _tmp0_;
      gint _tmp1_;
      gpointer _tmp2_ = NULL;
      gint _tmp3_;
      g_return_if_fail (self != NULL);
      _tmp0_ = _vala_gir_parser_node_ref0 (self->priv->current);
      _vala_gir_parser_node_unref0 (self->priv->old_current);
      self->priv->old_current = _tmp0_;
      _tmp1_ = vala_collection_get_size ((ValaCollection*) self->priv->tree_stack);
      _tmp2_ = vala_list_get ((ValaList*) self->priv->tree_stack, _tmp1_ - 1);
      _vala_gir_parser_node_unref0 (self->priv->current);
      self->priv->current = (ValaGirParserNode*) _tmp2_;
      _tmp3_ = vala_collection_get_size ((ValaCollection*) self->priv->tree_stack);
      vala_list_remove_at ((ValaList*) self->priv->tree_stack, _tmp3_ - 1);
}


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 void vala_gir_parser_parse_namespace (ValaGirParser* self) {
      gchar* _tmp0_ = NULL;
      gchar* cprefix;
      gchar* _tmp1_;
      gchar* vala_namespace;
      gchar* _tmp2_ = NULL;
      gchar* gir_namespace;
      gchar* _tmp3_ = NULL;
      gchar* gir_version;
      ValaGirParserMetadata* _tmp4_ = NULL;
      ValaGirParserMetadata* ns_metadata;
      gboolean _tmp5_;
      ValaNamespace* ns = NULL;
      gboolean _tmp15_;
      g_return_if_fail (self != NULL);
      vala_gir_parser_start_element (self, "namespace");
      _tmp0_ = vala_markup_reader_get_attribute (self->priv->reader, "c:identifier-prefixes");
      cprefix = _tmp0_;
      _tmp1_ = g_strdup (cprefix);
      vala_namespace = _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_;
      _tmp4_ = vala_gir_parser_metadata_match_child (self->priv->metadata, gir_namespace, NULL);
      ns_metadata = _tmp4_;
      _tmp5_ = vala_gir_parser_metadata_has_argument (ns_metadata, VALA_GIR_PARSER_ARGUMENT_TYPE_NAME);
      if (_tmp5_) {
            gchar* _tmp6_ = NULL;
            _tmp6_ = vala_gir_parser_metadata_get_string (ns_metadata, VALA_GIR_PARSER_ARGUMENT_TYPE_NAME);
            _g_free0 (vala_namespace);
            vala_namespace = _tmp6_;
      }
      if (vala_namespace == NULL) {
            gchar* _tmp7_;
            _tmp7_ = g_strdup (gir_namespace);
            _g_free0 (vala_namespace);
            vala_namespace = _tmp7_;
      }
      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);
      vala_gir_parser_push_node (self, vala_namespace, TRUE);
      if (self->priv->current->new_symbol) {
            ValaNamespace* _tmp8_ = NULL;
            ValaSymbol* _tmp9_;
            _tmp8_ = vala_namespace_new (vala_namespace, self->priv->current->source_reference);
            _vala_code_node_unref0 (ns);
            ns = _tmp8_;
            _tmp9_ = _vala_code_node_ref0 ((ValaSymbol*) ns);
            _vala_code_node_unref0 (self->priv->current->symbol);
            self->priv->current->symbol = _tmp9_;
      } else {
            ValaNamespace* _tmp10_;
            _tmp10_ = _vala_code_node_ref0 (VALA_NAMESPACE (self->priv->current->symbol));
            _vala_code_node_unref0 (ns);
            ns = _tmp10_;
            __g_list_free__vala_code_node_unref0_0 (((ValaCodeNode*) ns)->attributes);
            ((ValaCodeNode*) ns)->attributes = NULL;
            vala_code_node_set_source_reference ((ValaCodeNode*) ns, self->priv->current->source_reference);
      }
      if (cprefix != NULL) {
            gchar* _tmp11_ = NULL;
            gchar* _tmp12_;
            gchar* _tmp13_;
            gchar* _tmp14_;
            vala_namespace_add_cprefix (ns, cprefix);
            _tmp11_ = vala_symbol_camel_case_to_lower_case (cprefix);
            _tmp12_ = _tmp11_;
            _tmp13_ = g_strconcat (_tmp12_, "_", NULL);
            _tmp14_ = _tmp13_;
            vala_namespace_set_lower_case_cprefix (ns, _tmp14_);
            _g_free0 (_tmp14_);
            _g_free0 (_tmp12_);
      }
      _tmp15_ = vala_gir_parser_metadata_has_argument (ns_metadata, VALA_GIR_PARSER_ARGUMENT_TYPE_CHEADER_FILENAME);
      if (_tmp15_) {
            gchar* _tmp16_ = NULL;
            gchar* val;
            gchar** _tmp17_;
            gchar** _tmp18_ = NULL;
            _tmp16_ = vala_gir_parser_metadata_get_string (ns_metadata, VALA_GIR_PARSER_ARGUMENT_TYPE_CHEADER_FILENAME);
            val = _tmp16_;
            _tmp18_ = _tmp17_ = g_strsplit (val, ",", 0);
            {
                  gchar** filename_collection = NULL;
                  gint filename_collection_length1 = 0;
                  gint _filename_collection_size_ = 0;
                  gint filename_it;
                  filename_collection = _tmp18_;
                  filename_collection_length1 = _vala_array_length (_tmp17_);
                  for (filename_it = 0; filename_it < _vala_array_length (_tmp17_); filename_it = filename_it + 1) {
                        gchar* _tmp19_;
                        gchar* filename = NULL;
                        _tmp19_ = g_strdup (filename_collection[filename_it]);
                        filename = _tmp19_;
                        {
                              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 = NULL;
                  gint c_header_collection_length1 = 0;
                  gint _c_header_collection_size_ = 0;
                  gint 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* _tmp20_;
                        gchar* c_header = NULL;
                        _tmp20_ = g_strdup (c_header_collection[c_header_it]);
                        c_header = _tmp20_;
                        {
                              vala_symbol_add_cheader_filename ((ValaSymbol*) ns, c_header);
                              _g_free0 (c_header);
                        }
                  }
            }
      }
      vala_gir_parser_next (self);
      while (TRUE) {
            gboolean _tmp21_;
            const gchar* _tmp22_ = NULL;
            if (!(self->priv->current_token == VALA_MARKUP_TOKEN_TYPE_START_ELEMENT)) {
                  break;
            }
            _tmp21_ = vala_gir_parser_push_metadata (self);
            if (!_tmp21_) {
                  vala_gir_parser_skip_element (self);
                  continue;
            }
            _tmp22_ = vala_markup_reader_get_name (self->priv->reader);
            if (g_strcmp0 (_tmp22_, "alias") == 0) {
                  vala_gir_parser_parse_alias (self);
            } else {
                  const gchar* _tmp23_ = NULL;
                  _tmp23_ = vala_markup_reader_get_name (self->priv->reader);
                  if (g_strcmp0 (_tmp23_, "enumeration") == 0) {
                        gchar* _tmp24_ = NULL;
                        gchar* _tmp25_;
                        gboolean _tmp26_;
                        _tmp24_ = vala_markup_reader_get_attribute (self->priv->reader, "glib:error-quark");
                        _tmp25_ = _tmp24_;
                        _tmp26_ = _tmp25_ != NULL;
                        _g_free0 (_tmp25_);
                        if (_tmp26_) {
                              vala_gir_parser_parse_error_domain (self);
                        } else {
                              vala_gir_parser_parse_enumeration (self, "enumeration", FALSE);
                        }
                  } else {
                        const gchar* _tmp27_ = NULL;
                        _tmp27_ = vala_markup_reader_get_name (self->priv->reader);
                        if (g_strcmp0 (_tmp27_, "bitfield") == 0) {
                              vala_gir_parser_parse_bitfield (self);
                        } else {
                              const gchar* _tmp28_ = NULL;
                              _tmp28_ = vala_markup_reader_get_name (self->priv->reader);
                              if (g_strcmp0 (_tmp28_, "function") == 0) {
                                    vala_gir_parser_parse_method (self, "function");
                              } else {
                                    const gchar* _tmp29_ = NULL;
                                    _tmp29_ = vala_markup_reader_get_name (self->priv->reader);
                                    if (g_strcmp0 (_tmp29_, "callback") == 0) {
                                          vala_gir_parser_parse_callback (self);
                                    } else {
                                          const gchar* _tmp30_ = NULL;
                                          _tmp30_ = vala_markup_reader_get_name (self->priv->reader);
                                          if (g_strcmp0 (_tmp30_, "record") == 0) {
                                                gboolean _tmp31_ = FALSE;
                                                gchar* _tmp32_ = NULL;
                                                gchar* _tmp33_;
                                                gboolean _tmp34_;
                                                _tmp32_ = vala_markup_reader_get_attribute (self->priv->reader, "glib:get-type");
                                                _tmp33_ = _tmp32_;
                                                _tmp34_ = _tmp33_ != NULL;
                                                _g_free0 (_tmp33_);
                                                if (_tmp34_) {
                                                      gboolean _tmp35_;
                                                      _tmp35_ = vala_gir_parser_metadata_get_bool (self->priv->metadata, VALA_GIR_PARSER_ARGUMENT_TYPE_STRUCT);
                                                      _tmp31_ = !_tmp35_;
                                                } else {
                                                      _tmp31_ = FALSE;
                                                }
                                                if (_tmp31_) {
                                                      vala_gir_parser_parse_boxed (self, "record");
                                                } else {
                                                      gchar* _tmp36_ = NULL;
                                                      gchar* _tmp37_;
                                                      gboolean _tmp38_;
                                                      gboolean _tmp39_;
                                                      _tmp36_ = vala_markup_reader_get_attribute (self->priv->reader, "name");
                                                      _tmp37_ = _tmp36_;
                                                      _tmp38_ = g_str_has_suffix (_tmp37_, "Private");
                                                      _tmp39_ = !_tmp38_;
                                                      _g_free0 (_tmp37_);
                                                      if (_tmp39_) {
                                                            gboolean _tmp40_ = FALSE;
                                                            gchar* _tmp41_ = NULL;
                                                            gchar* _tmp42_;
                                                            gboolean _tmp43_;
                                                            _tmp41_ = vala_markup_reader_get_attribute (self->priv->reader, "glib:is-gtype-struct-for");
                                                            _tmp42_ = _tmp41_;
                                                            _tmp43_ = _tmp42_ == NULL;
                                                            _g_free0 (_tmp42_);
                                                            if (_tmp43_) {
                                                                  gchar* _tmp44_ = NULL;
                                                                  gchar* _tmp45_;
                                                                  _tmp44_ = vala_markup_reader_get_attribute (self->priv->reader, "disguised");
                                                                  _tmp45_ = _tmp44_;
                                                                  _tmp40_ = g_strcmp0 (_tmp45_, "1") == 0;
                                                                  _g_free0 (_tmp45_);
                                                            } else {
                                                                  _tmp40_ = FALSE;
                                                            }
                                                            if (_tmp40_) {
                                                                  vala_gir_parser_parse_boxed (self, "record");
                                                            } else {
                                                                  vala_gir_parser_parse_record (self);
                                                            }
                                                      } else {
                                                            vala_gir_parser_skip_element (self);
                                                      }
                                                }
                                          } else {
                                                const gchar* _tmp46_ = NULL;
                                                _tmp46_ = vala_markup_reader_get_name (self->priv->reader);
                                                if (g_strcmp0 (_tmp46_, "class") == 0) {
                                                      vala_gir_parser_parse_class (self);
                                                } else {
                                                      const gchar* _tmp47_ = NULL;
                                                      _tmp47_ = vala_markup_reader_get_name (self->priv->reader);
                                                      if (g_strcmp0 (_tmp47_, "interface") == 0) {
                                                            vala_gir_parser_parse_interface (self);
                                                      } else {
                                                            const gchar* _tmp48_ = NULL;
                                                            _tmp48_ = vala_markup_reader_get_name (self->priv->reader);
                                                            if (g_strcmp0 (_tmp48_, "glib:boxed") == 0) {
                                                                  vala_gir_parser_parse_boxed (self, "glib:boxed");
                                                            } else {
                                                                  const gchar* _tmp49_ = NULL;
                                                                  _tmp49_ = vala_markup_reader_get_name (self->priv->reader);
                                                                  if (g_strcmp0 (_tmp49_, "union") == 0) {
                                                                        gboolean _tmp50_ = FALSE;
                                                                        gchar* _tmp51_ = NULL;
                                                                        gchar* _tmp52_;
                                                                        gboolean _tmp53_;
                                                                        _tmp51_ = vala_markup_reader_get_attribute (self->priv->reader, "glib:get-type");
                                                                        _tmp52_ = _tmp51_;
                                                                        _tmp53_ = _tmp52_ != NULL;
                                                                        _g_free0 (_tmp52_);
                                                                        if (_tmp53_) {
                                                                              gboolean _tmp54_;
                                                                              _tmp54_ = vala_gir_parser_metadata_get_bool (self->priv->metadata, VALA_GIR_PARSER_ARGUMENT_TYPE_STRUCT);
                                                                              _tmp50_ = !_tmp54_;
                                                                        } else {
                                                                              _tmp50_ = FALSE;
                                                                        }
                                                                        if (_tmp50_) {
                                                                              vala_gir_parser_parse_boxed (self, "union");
                                                                        } else {
                                                                              vala_gir_parser_parse_union (self);
                                                                        }
                                                                  } else {
                                                                        const gchar* _tmp55_ = NULL;
                                                                        _tmp55_ = vala_markup_reader_get_name (self->priv->reader);
                                                                        if (g_strcmp0 (_tmp55_, "constant") == 0) {
                                                                              vala_gir_parser_parse_constant (self);
                                                                        } else {
                                                                              ValaSourceReference* _tmp56_ = NULL;
                                                                              ValaSourceReference* _tmp57_;
                                                                              const gchar* _tmp58_ = NULL;
                                                                              gchar* _tmp59_ = NULL;
                                                                              gchar* _tmp60_;
                                                                              _tmp56_ = vala_gir_parser_get_current_src (self);
                                                                              _tmp57_ = _tmp56_;
                                                                              _tmp58_ = vala_markup_reader_get_name (self->priv->reader);
                                                                              _tmp59_ = g_strdup_printf ("unknown child element `%s' in `namespace'", _tmp58_);
                                                                              _tmp60_ = _tmp59_;
                                                                              vala_report_error (_tmp57_, _tmp60_);
                                                                              _g_free0 (_tmp60_);
                                                                              _vala_source_reference_unref0 (_tmp57_);
                                                                              vala_gir_parser_skip_element (self);
                                                                        }
                                                                  }
                                                            }
                                                      }
                                                }
                                          }
                                    }
                              }
                        }
                  }
            }
            vala_gir_parser_pop_metadata (self);
      }
      vala_gir_parser_pop_node (self);
      vala_gir_parser_end_element (self, "namespace");
      _vala_code_node_unref0 (ns);
      _vala_gir_parser_metadata_unref0 (ns_metadata);
      _g_free0 (gir_version);
      _g_free0 (gir_namespace);
      _g_free0 (vala_namespace);
      _g_free0 (cprefix);
}


static void vala_gir_parser_parse_alias (ValaGirParser* self) {
      gchar* _tmp0_ = NULL;
      gchar* _tmp1_;
      gboolean no_array_length;
      ValaDataType* _tmp2_ = NULL;
      ValaDataType* _tmp3_;
      ValaDataType* _tmp4_ = NULL;
      g_return_if_fail (self != NULL);
      vala_gir_parser_start_element (self, "alias");
      _tmp0_ = vala_gir_parser_element_get_name (self, NULL);
      _tmp1_ = _tmp0_;
      vala_gir_parser_push_node (self, _tmp1_, TRUE);
      _g_free0 (_tmp1_);
      vala_gir_parser_next (self);
      no_array_length = FALSE;
      _tmp2_ = vala_gir_parser_parse_type (self, NULL, NULL, TRUE, NULL, NULL);
      _tmp3_ = _tmp2_;
      _tmp4_ = vala_gir_parser_element_get_type (self, _tmp3_, TRUE, &no_array_length, NULL);
      _vala_code_node_unref0 (self->priv->current->base_type);
      self->priv->current->base_type = _tmp4_;
      _vala_code_node_unref0 (_tmp3_);
      vala_gir_parser_pop_node (self);
      vala_gir_parser_end_element (self, "alias");
}


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 void vala_gir_parser_parse_enumeration (ValaGirParser* self, const gchar* element_name, gboolean error_domain) {
      gchar* _tmp0_ = NULL;
      gchar* _tmp1_;
      ValaSymbol* sym = NULL;
      gchar* _tmp7_ = NULL;
      gchar* cname;
      gchar* common_prefix;
      g_return_if_fail (self != NULL);
      g_return_if_fail (element_name != NULL);
      vala_gir_parser_start_element (self, element_name);
      _tmp0_ = vala_gir_parser_element_get_name (self, NULL);
      _tmp1_ = _tmp0_;
      vala_gir_parser_push_node (self, _tmp1_, TRUE);
      _g_free0 (_tmp1_);
      if (self->priv->current->new_symbol) {
            ValaSymbol* _tmp5_;
            if (error_domain) {
                  ValaErrorDomain* _tmp2_ = NULL;
                  _tmp2_ = vala_error_domain_new (self->priv->current->name, self->priv->current->source_reference, NULL);
                  _vala_code_node_unref0 (sym);
                  sym = (ValaSymbol*) _tmp2_;
            } else {
                  ValaEnum* _tmp3_ = NULL;
                  ValaEnum* en;
                  ValaSymbol* _tmp4_;
                  _tmp3_ = vala_enum_new (self->priv->current->name, self->priv->current->source_reference, NULL);
                  en = _tmp3_;
                  if (g_strcmp0 (element_name, "bitfield") == 0) {
                        vala_enum_set_is_flags (en, TRUE);
                  }
                  _tmp4_ = _vala_code_node_ref0 ((ValaSymbol*) en);
                  _vala_code_node_unref0 (sym);
                  sym = _tmp4_;
                  _vala_code_node_unref0 (en);
            }
            _tmp5_ = _vala_code_node_ref0 (sym);
            _vala_code_node_unref0 (self->priv->current->symbol);
            self->priv->current->symbol = _tmp5_;
      } else {
            ValaSymbol* _tmp6_;
            _tmp6_ = _vala_code_node_ref0 (self->priv->current->symbol);
            _vala_code_node_unref0 (sym);
            sym = _tmp6_;
      }
      vala_symbol_set_external (sym, TRUE);
      vala_symbol_set_access (sym, VALA_SYMBOL_ACCESSIBILITY_PUBLIC);
      _tmp7_ = vala_markup_reader_get_attribute (self->priv->reader, "c:type");
      cname = _tmp7_;
      common_prefix = NULL;
      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_, "member") == 0) {
                  if (error_domain) {
                        gchar* _tmp10_ = NULL;
                        gchar* _tmp11_;
                        vala_gir_parser_parse_error_member (self);
                        _tmp10_ = vala_gir_parser_node_get_cname (self->priv->old_current);
                        _tmp11_ = _tmp10_;
                        vala_gir_parser_calculate_common_prefix (self, &common_prefix, _tmp11_);
                        _g_free0 (_tmp11_);
                  } else {
                        gchar* _tmp12_ = NULL;
                        gchar* _tmp13_;
                        vala_gir_parser_parse_enumeration_member (self);
                        _tmp12_ = vala_gir_parser_node_get_cname (self->priv->old_current);
                        _tmp13_ = _tmp12_;
                        vala_gir_parser_calculate_common_prefix (self, &common_prefix, _tmp13_);
                        _g_free0 (_tmp13_);
                  }
            } else {
                  ValaSourceReference* _tmp14_ = NULL;
                  ValaSourceReference* _tmp15_;
                  const gchar* _tmp16_ = NULL;
                  gchar* _tmp17_ = NULL;
                  gchar* _tmp18_;
                  _tmp14_ = vala_gir_parser_get_current_src (self);
                  _tmp15_ = _tmp14_;
                  _tmp16_ = vala_markup_reader_get_name (self->priv->reader);
                  _tmp17_ = g_strdup_printf ("unknown child element `%s' in `%s'", _tmp16_, element_name);
                  _tmp18_ = _tmp17_;
                  vala_report_error (_tmp15_, _tmp18_);
                  _g_free0 (_tmp18_);
                  _vala_source_reference_unref0 (_tmp15_);
                  vala_gir_parser_skip_element (self);
            }
            vala_gir_parser_pop_metadata (self);
      }
      if (cname != NULL) {
            if (VALA_IS_ENUM (sym)) {
                  if (cname != NULL) {
                        vala_enum_set_cname (VALA_ENUM (sym), cname);
                  }
                  if (common_prefix != NULL) {
                        vala_enum_set_cprefix (VALA_ENUM (sym), common_prefix);
                  }
            } else {
                  if (cname != NULL) {
                        vala_error_domain_set_cname (VALA_ERROR_DOMAIN (sym), cname);
                  }
                  if (common_prefix != NULL) {
                        vala_error_domain_set_cprefix (VALA_ERROR_DOMAIN (sym), common_prefix);
                  }
            }
      }
      vala_gir_parser_pop_node (self);
      vala_gir_parser_end_element (self, element_name);
      _g_free0 (common_prefix);
      _g_free0 (cname);
      _vala_code_node_unref0 (sym);
}


static void vala_gir_parser_parse_error_domain (ValaGirParser* self) {
      g_return_if_fail (self != NULL);
      vala_gir_parser_parse_enumeration (self, "enumeration", TRUE);
}


static void vala_gir_parser_parse_bitfield (ValaGirParser* self) {
      g_return_if_fail (self != NULL);
      vala_gir_parser_parse_enumeration (self, "bitfield", FALSE);
}


static void vala_gir_parser_parse_enumeration_member (ValaGirParser* self) {
      gchar* _tmp0_ = NULL;
      gchar* _tmp1_;
      gchar* _tmp2_ = NULL;
      gchar* _tmp3_;
      gchar* _tmp4_ = NULL;
      gchar* _tmp5_;
      ValaExpression* _tmp6_ = NULL;
      ValaExpression* _tmp7_;
      ValaEnumValue* _tmp8_ = NULL;
      ValaEnumValue* _tmp9_;
      ValaEnumValue* ev;
      gchar* _tmp10_ = NULL;
      gchar* cname;
      ValaSymbol* _tmp11_;
      g_return_if_fail (self != NULL);
      vala_gir_parser_start_element (self, "member");
      _tmp0_ = vala_gir_parser_element_get_name (self, NULL);
      _tmp1_ = _tmp0_;
      _tmp2_ = g_utf8_strup (_tmp1_, (gssize) (-1));
      _tmp3_ = _tmp2_;
      _tmp4_ = string_replace (_tmp3_, "-", "_");
      _tmp5_ = _tmp4_;
      vala_gir_parser_push_node (self, _tmp5_, FALSE);
      _g_free0 (_tmp5_);
      _g_free0 (_tmp3_);
      _g_free0 (_tmp1_);
      _tmp6_ = vala_gir_parser_metadata_get_expression (self->priv->metadata, VALA_GIR_PARSER_ARGUMENT_TYPE_DEFAULT);
      _tmp7_ = _tmp6_;
      _tmp8_ = vala_enum_value_new (self->priv->current->name, _tmp7_, self->priv->current->source_reference, NULL);
      _tmp9_ = _tmp8_;
      _vala_code_node_unref0 (_tmp7_);
      ev = _tmp9_;
      _tmp10_ = vala_markup_reader_get_attribute (self->priv->reader, "c:identifier");
      cname = _tmp10_;
      if (cname != NULL) {
            vala_constant_set_cname ((ValaConstant*) ev, cname);
      }
      _tmp11_ = _vala_code_node_ref0 ((ValaSymbol*) ev);
      _vala_code_node_unref0 (self->priv->current->symbol);
      self->priv->current->symbol = _tmp11_;
      vala_gir_parser_next (self);
      vala_gir_parser_pop_node (self);
      vala_gir_parser_end_element (self, "member");
      _g_free0 (cname);
      _vala_code_node_unref0 (ev);
}


static void vala_gir_parser_parse_error_member (ValaGirParser* self) {
      gchar* _tmp0_ = NULL;
      gchar* _tmp1_;
      gchar* _tmp2_ = NULL;
      gchar* _tmp3_;
      gchar* _tmp4_ = NULL;
      gchar* _tmp5_;
      ValaErrorCode* ec = NULL;
      gchar* _tmp6_ = NULL;
      gchar* value;
      ValaSymbol* _tmp11_;
      gchar* _tmp12_ = NULL;
      gchar* cname;
      g_return_if_fail (self != NULL);
      vala_gir_parser_start_element (self, "member");
      _tmp0_ = vala_gir_parser_element_get_name (self, NULL);
      _tmp1_ = _tmp0_;
      _tmp2_ = g_utf8_strup (_tmp1_, (gssize) (-1));
      _tmp3_ = _tmp2_;
      _tmp4_ = string_replace (_tmp3_, "-", "_");
      _tmp5_ = _tmp4_;
      vala_gir_parser_push_node (self, _tmp5_, FALSE);
      _g_free0 (_tmp5_);
      _g_free0 (_tmp3_);
      _g_free0 (_tmp1_);
      _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 (self->priv->current->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 (self->priv->current->name, NULL, NULL);
            _vala_code_node_unref0 (ec);
            ec = _tmp10_;
      }
      _tmp11_ = _vala_code_node_ref0 ((ValaSymbol*) ec);
      _vala_code_node_unref0 (self->priv->current->symbol);
      self->priv->current->symbol = _tmp11_;
      _tmp12_ = vala_markup_reader_get_attribute (self->priv->reader, "c:identifier");
      cname = _tmp12_;
      if (cname != NULL) {
            vala_error_code_set_cname (ec, cname);
      }
      vala_gir_parser_next (self);
      vala_gir_parser_pop_node (self);
      vala_gir_parser_end_element (self, "member");
      _g_free0 (cname);
      _g_free0 (value);
      _vala_code_node_unref0 (ec);
}


static ValaDataType* vala_gir_parser_parse_return_value (ValaGirParser* self, gchar** ctype, gint* array_length_idx, gboolean* no_array_length, gboolean* array_null_terminated) {
      gchar* _ctype = NULL;
      gint _array_length_idx = 0;
      gboolean _no_array_length = FALSE;
      gboolean _array_null_terminated = FALSE;
      ValaDataType* result = NULL;
      gchar* _tmp0_ = NULL;
      gchar* transfer;
      gchar* _tmp1_ = NULL;
      gchar* allow_none;
      gboolean transfer_elements;
      gchar* _tmp2_ = NULL;
      gint _tmp3_;
      gboolean _tmp4_;
      gboolean _tmp5_;
      ValaDataType* _tmp6_ = NULL;
      ValaDataType* type;
      gboolean _tmp7_ = FALSE;
      ValaDataType* _tmp8_ = NULL;
      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, "container") != 0;
      _tmp6_ = vala_gir_parser_parse_type (self, &_tmp2_, &_tmp3_, transfer_elements, &_tmp4_, &_tmp5_);
      _g_free0 (_ctype);
      _ctype = _tmp2_;
      _array_length_idx = _tmp3_;
      _no_array_length = _tmp4_;
      _array_null_terminated = _tmp5_;
      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);
      }
      _tmp8_ = vala_gir_parser_element_get_type (self, type, TRUE, &_no_array_length, NULL);
      _vala_code_node_unref0 (type);
      type = _tmp8_;
      vala_gir_parser_end_element (self, "return-value");
      result = type;
      _g_free0 (allow_none);
      _g_free0 (transfer);
      if (ctype) {
            *ctype = _ctype;
      } else {
            _g_free0 (_ctype);
      }
      if (array_length_idx) {
            *array_length_idx = _array_length_idx;
      }
      if (no_array_length) {
            *no_array_length = _no_array_length;
      }
      if (array_null_terminated) {
            *array_null_terminated = _array_null_terminated;
      }
      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* _tmp11_ = NULL;
      gchar* _tmp12_ = NULL;
      gchar* closure;
      gchar* _tmp13_ = NULL;
      gchar* destroy;
      gboolean _tmp14_ = FALSE;
      gboolean _tmp16_ = FALSE;
      gboolean _tmp18_;
      const gchar* _tmp20_ = NULL;
      g_return_val_if_fail (self != NULL, NULL);
      _array_length_idx = -1;
      _closure_idx = -1;
      _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_;
      _tmp11_ = vala_gir_parser_element_get_string (self, "scope", VALA_GIR_PARSER_ARGUMENT_TYPE_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_;
      }
      _tmp18_ = vala_gir_parser_metadata_has_argument (self->priv->metadata, VALA_GIR_PARSER_ARGUMENT_TYPE_CLOSURE);
      if (_tmp18_) {
            gint _tmp19_;
            _tmp19_ = vala_gir_parser_metadata_get_integer (self->priv->metadata, VALA_GIR_PARSER_ARGUMENT_TYPE_CLOSURE);
            _closure_idx = _tmp19_;
      }
      vala_gir_parser_next (self);
      _tmp20_ = vala_markup_reader_get_name (self->priv->reader);
      if (g_strcmp0 (_tmp20_, "varargs") == 0) {
            ValaSourceReference* _tmp21_ = NULL;
            ValaSourceReference* _tmp22_;
            ValaParameter* _tmp23_ = NULL;
            vala_gir_parser_start_element (self, "varargs");
            vala_gir_parser_next (self);
            _tmp21_ = vala_gir_parser_get_current_src (self);
            _tmp22_ = _tmp21_;
            _tmp23_ = vala_parameter_new_with_ellipsis (_tmp22_);
            _vala_code_node_unref0 (param);
            param = _tmp23_;
            _vala_source_reference_unref0 (_tmp22_);
            vala_gir_parser_end_element (self, "varargs");
      } else {
            gchar* ctype = NULL;
            gboolean no_array_length = FALSE;
            gboolean array_null_terminated = FALSE;
            gchar* _tmp24_ = NULL;
            gint _tmp25_;
            gboolean _tmp26_;
            gboolean _tmp27_;
            ValaDataType* _tmp28_ = NULL;
            ValaDataType* type;
            gboolean _tmp29_ = FALSE;
            gboolean _tmp30_ = FALSE;
            gboolean _tmp31_ = FALSE;
            gboolean changed = FALSE;
            gboolean _tmp32_ = FALSE;
            gboolean _tmp33_;
            ValaDataType* _tmp34_ = NULL;
            ValaSourceReference* _tmp35_ = NULL;
            ValaSourceReference* _tmp36_;
            ValaParameter* _tmp37_ = NULL;
            gboolean _tmp38_ = FALSE;
            ValaExpression* _tmp41_ = NULL;
            ValaExpression* _tmp42_;
            _tmp28_ = vala_gir_parser_parse_type (self, &_tmp24_, &_tmp25_, g_strcmp0 (transfer, "container") != 0, &_tmp26_, &_tmp27_);
            _g_free0 (ctype);
            ctype = _tmp24_;
            _array_length_idx = _tmp25_;
            no_array_length = _tmp26_;
            array_null_terminated = _tmp27_;
            type = _tmp28_;
            if (g_strcmp0 (transfer, "full") == 0) {
                  _tmp30_ = TRUE;
            } else {
                  _tmp30_ = g_strcmp0 (transfer, "container") == 0;
            }
            if (_tmp30_) {
                  _tmp29_ = TRUE;
            } else {
                  _tmp29_ = destroy != NULL;
            }
            if (_tmp29_) {
                  vala_data_type_set_value_owned (type, TRUE);
            }
            if (g_strcmp0 (allow_none, "1") == 0) {
                  _tmp31_ = g_strcmp0 (direction, "out") != 0;
            } else {
                  _tmp31_ = FALSE;
            }
            if (_tmp31_) {
                  vala_data_type_set_nullable (type, TRUE);
            }
            if (g_strcmp0 (direction, "out") == 0) {
                  _tmp32_ = TRUE;
            } else {
                  _tmp32_ = g_strcmp0 (direction, "ref") == 0;
            }
            _tmp34_ = vala_gir_parser_element_get_type (self, type, _tmp32_, &no_array_length, &_tmp33_);
            changed = _tmp33_;
            _vala_code_node_unref0 (type);
            type = _tmp34_;
            if (!changed) {
                  _g_free0 (ctype);
                  ctype = NULL;
            }
            _tmp35_ = vala_gir_parser_get_current_src (self);
            _tmp36_ = _tmp35_;
            _tmp37_ = vala_parameter_new (name, type, _tmp36_);
            _vala_code_node_unref0 (param);
            param = _tmp37_;
            _vala_source_reference_unref0 (_tmp36_);
            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);
                  }
            }
            if (VALA_IS_ARRAY_TYPE (type)) {
                  gboolean _tmp39_;
                  _tmp39_ = vala_gir_parser_metadata_has_argument (self->priv->metadata, VALA_GIR_PARSER_ARGUMENT_TYPE_ARRAY_LENGTH_IDX);
                  _tmp38_ = _tmp39_;
            } else {
                  _tmp38_ = FALSE;
            }
            if (_tmp38_) {
                  gint _tmp40_;
                  _tmp40_ = vala_gir_parser_metadata_get_integer (self->priv->metadata, VALA_GIR_PARSER_ARGUMENT_TYPE_ARRAY_LENGTH_IDX);
                  _array_length_idx = _tmp40_;
            } else {
                  vala_variable_set_no_array_length ((ValaVariable*) param, no_array_length);
                  vala_variable_set_array_null_terminated ((ValaVariable*) param, array_null_terminated);
            }
            _tmp41_ = vala_gir_parser_metadata_get_expression (self->priv->metadata, VALA_GIR_PARSER_ARGUMENT_TYPE_DEFAULT);
            _tmp42_ = _tmp41_;
            vala_variable_set_initializer ((ValaVariable*) param, _tmp42_);
            _vala_code_node_unref0 (_tmp42_);
            _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_idx, gboolean transfer_elements, gboolean* no_array_length, gboolean* array_null_terminated) {
      gchar* _ctype = NULL;
      gint _array_length_idx = 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;
      gchar* _tmp19_ = NULL;
      gboolean _tmp20_ = FALSE;
      gboolean _tmp22_;
      gboolean _tmp23_;
      ValaDataType* _tmp24_ = NULL;
      ValaDataType* type;
      const gchar* _tmp26_ = 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_;
      _array_length_idx = -1;
      _no_array_length = TRUE;
      _array_null_terminated = TRUE;
      _tmp1_ = vala_markup_reader_get_name (self->priv->reader);
      if (g_strcmp0 (_tmp1_, "array") == 0) {
            ValaSourceReference* _tmp2_ = NULL;
            ValaSourceReference* src;
            is_array = TRUE;
            vala_gir_parser_start_element (self, "array");
            _tmp2_ = vala_gir_parser_get_current_src (self);
            src = _tmp2_;
            if (type_name == NULL) {
                  gchar* _tmp3_ = NULL;
                  gchar* _tmp4_;
                  gboolean _tmp5_;
                  gchar* _tmp9_ = NULL;
                  gchar* _tmp10_;
                  gboolean _tmp11_;
                  gchar* _tmp12_ = NULL;
                  gchar* _tmp13_;
                  gboolean _tmp14_;
                  ValaDataType* _tmp15_ = NULL;
                  ValaDataType* element_type;
                  ValaArrayType* _tmp16_ = NULL;
                  _tmp3_ = vala_markup_reader_get_attribute (self->priv->reader, "length");
                  _tmp4_ = _tmp3_;
                  _tmp5_ = _tmp4_ != NULL;
                  _g_free0 (_tmp4_);
                  if (_tmp5_) {
                        gchar* _tmp6_ = NULL;
                        gchar* _tmp7_;
                        gint _tmp8_;
                        _tmp6_ = vala_markup_reader_get_attribute (self->priv->reader, "length");
                        _tmp7_ = _tmp6_;
                        _tmp8_ = atoi (_tmp7_);
                        _array_length_idx = _tmp8_;
                        _g_free0 (_tmp7_);
                        _no_array_length = FALSE;
                        _array_null_terminated = FALSE;
                  }
                  _tmp9_ = vala_markup_reader_get_attribute (self->priv->reader, "fixed-size");
                  _tmp10_ = _tmp9_;
                  _tmp11_ = _tmp10_ != NULL;
                  _g_free0 (_tmp10_);
                  if (_tmp11_) {
                        _array_null_terminated = FALSE;
                  }
                  _tmp12_ = vala_markup_reader_get_attribute (self->priv->reader, "c:type");
                  _tmp13_ = _tmp12_;
                  _tmp14_ = g_strcmp0 (_tmp13_, "GStrv") == 0;
                  _g_free0 (_tmp13_);
                  if (_tmp14_) {
                        _no_array_length = TRUE;
                        _array_null_terminated = TRUE;
                  }
                  vala_gir_parser_next (self);
                  _tmp15_ = vala_gir_parser_parse_type (self, NULL, NULL, TRUE, NULL, NULL);
                  element_type = _tmp15_;
                  vala_gir_parser_end_element (self, "array");
                  _tmp16_ = vala_array_type_new (element_type, 1, src);
                  result = (ValaDataType*) _tmp16_;
                  _vala_code_node_unref0 (element_type);
                  _vala_source_reference_unref0 (src);
                  _g_free0 (type_name);
                  if (ctype) {
                        *ctype = _ctype;
                  } else {
                        _g_free0 (_ctype);
                  }
                  if (array_length_idx) {
                        *array_length_idx = _array_length_idx;
                  }
                  if (no_array_length) {
                        *no_array_length = _no_array_length;
                  }
                  if (array_null_terminated) {
                        *array_null_terminated = _array_null_terminated;
                  }
                  return result;
            }
            _vala_source_reference_unref0 (src);
      } else {
            const gchar* _tmp17_ = NULL;
            _tmp17_ = vala_markup_reader_get_name (self->priv->reader);
            if (g_strcmp0 (_tmp17_, "callback") == 0) {
                  ValaDelegateType* _tmp18_ = NULL;
                  vala_gir_parser_parse_callback (self);
                  _tmp18_ = vala_delegate_type_new (VALA_DELEGATE (self->priv->old_current->symbol));
                  result = (ValaDataType*) _tmp18_;
                  _g_free0 (type_name);
                  if (ctype) {
                        *ctype = _ctype;
                  } else {
                        _g_free0 (_ctype);
                  }
                  if (array_length_idx) {
                        *array_length_idx = _array_length_idx;
                  }
                  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");
            }
      }
      _tmp19_ = vala_markup_reader_get_attribute (self->priv->reader, "c:type");
      _g_free0 (_ctype);
      _ctype = _tmp19_;
      vala_gir_parser_next (self);
      if (g_strcmp0 (type_name, "GLib.PtrArray") == 0) {
            _tmp20_ = self->priv->current_token == VALA_MARKUP_TOKEN_TYPE_START_ELEMENT;
      } else {
            _tmp20_ = FALSE;
      }
      if (_tmp20_) {
            gchar* _tmp21_;
            _tmp21_ = g_strdup ("GLib.GenericArray");
            _g_free0 (type_name);
            type_name = _tmp21_;
      }
      _tmp24_ = vala_gir_parser_parse_type_from_gir_name (self, type_name, &_tmp22_, &_tmp23_, _ctype);
      _no_array_length = _tmp22_;
      _array_null_terminated = _tmp23_;
      type = _tmp24_;
      while (TRUE) {
            ValaDataType* _tmp25_ = NULL;
            ValaDataType* element_type;
            if (!(self->priv->current_token == VALA_MARKUP_TOKEN_TYPE_START_ELEMENT)) {
                  break;
            }
            if (g_strcmp0 (type_name, "GLib.ByteArray") == 0) {
                  vala_gir_parser_skip_element (self);
                  continue;
            }
            _tmp25_ = vala_gir_parser_parse_type (self, NULL, NULL, TRUE, NULL, NULL);
            element_type = _tmp25_;
            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) {
            _tmp26_ = "array";
      } else {
            _tmp26_ = "type";
      }
      vala_gir_parser_end_element (self, _tmp26_);
      result = type;
      _g_free0 (type_name);
      if (ctype) {
            *ctype = _ctype;
      } else {
            _g_free0 (_ctype);
      }
      if (array_length_idx) {
            *array_length_idx = _array_length_idx;
      }
      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, const gchar* ctype) {
      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);
      _no_array_length = FALSE;
      _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_);
                        _no_array_length = TRUE;
                        _array_null_terminated = TRUE;
                  } else {
                        gboolean known_type;
                        ValaSourceReference* _tmp21_ = NULL;
                        ValaSourceReference* _tmp22_;
                        ValaUnresolvedSymbol* _tmp23_ = NULL;
                        ValaUnresolvedSymbol* _tmp24_;
                        ValaUnresolvedSymbol* sym;
                        ValaSourceReference* _tmp25_ = NULL;
                        ValaSourceReference* _tmp26_;
                        ValaUnresolvedType* _tmp27_ = 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) {
                                                                        gboolean _tmp17_ = FALSE;
                                                                        if (ctype != NULL) {
                                                                              gboolean _tmp18_;
                                                                              _tmp18_ = g_str_has_prefix (ctype, "gssize");
                                                                              _tmp17_ = _tmp18_;
                                                                        } else {
                                                                              _tmp17_ = FALSE;
                                                                        }
                                                                        if (_tmp17_) {
                                                                              type_name = "ssize_t";
                                                                        } else {
                                                                              type_name = "long";
                                                                        }
                                                                  } else {
                                                                        if (g_strcmp0 (type_name, "gulong") == 0) {
                                                                              gboolean _tmp19_ = FALSE;
                                                                              if (ctype != NULL) {
                                                                                    gboolean _tmp20_;
                                                                                    _tmp20_ = g_str_has_prefix (ctype, "gsize");
                                                                                    _tmp19_ = _tmp20_;
                                                                              } else {
                                                                                    _tmp19_ = FALSE;
                                                                              }
                                                                              if (_tmp19_) {
                                                                                    type_name = "size_t";
                                                                              } else {
                                                                                    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, "gunichar") == 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;
                                                                                                                                                                                                }
                                                                                                                                                                                          }
                                                                                                                                                                                    }
                                                                                                                                                                              }
                                                                                                                                                                        }
                                                                                                                                                                  }
                                                                                                                                                            }
                                                                                                                                                      }
                                                                                                                                                }
                                                                                                                                          }
                                                                                                                                    }
                                                                                                                              }
                                                                                                                        }
                                                                                                                  }
                                                                                                            }
                                                                                                      }
                                                                                                }
                                                                                          }
                                                                                    }
                                                                              }
                                                                        }
                                                                  }
                                                            }
                                                      }
                                                }
                                          }
                                    }
                              }
                        }
                        _tmp21_ = vala_gir_parser_get_current_src (self);
                        _tmp22_ = _tmp21_;
                        _tmp23_ = vala_gir_parser_parse_symbol_from_string (self, type_name, _tmp22_);
                        _tmp24_ = _tmp23_;
                        _vala_source_reference_unref0 (_tmp22_);
                        sym = _tmp24_;
                        _tmp25_ = vala_gir_parser_get_current_src (self);
                        _tmp26_ = _tmp25_;
                        _tmp27_ = vala_unresolved_type_new_from_symbol (sym, _tmp26_);
                        _vala_code_node_unref0 (type);
                        type = (ValaDataType*) _tmp27_;
                        _vala_source_reference_unref0 (_tmp26_);
                        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 void vala_gir_parser_parse_record (ValaGirParser* self) {
      gchar* _tmp0_ = NULL;
      gchar* _tmp1_;
      ValaStruct* st = NULL;
      gchar* _tmp8_ = NULL;
      gchar* gtype_struct_for;
      gboolean first_field;
      g_return_if_fail (self != NULL);
      vala_gir_parser_start_element (self, "record");
      _tmp0_ = vala_gir_parser_element_get_name (self, NULL);
      _tmp1_ = _tmp0_;
      vala_gir_parser_push_node (self, _tmp1_, TRUE);
      _g_free0 (_tmp1_);
      if (self->priv->current->new_symbol) {
            gchar* _tmp2_ = NULL;
            gchar* _tmp3_;
            ValaStruct* _tmp4_ = NULL;
            gchar* _tmp5_ = NULL;
            gchar* cname;
            ValaSymbol* _tmp6_;
            _tmp2_ = vala_markup_reader_get_attribute (self->priv->reader, "name");
            _tmp3_ = _tmp2_;
            _tmp4_ = vala_struct_new (_tmp3_, self->priv->current->source_reference, NULL);
            _vala_code_node_unref0 (st);
            st = _tmp4_;
            _g_free0 (_tmp3_);
            _tmp5_ = vala_markup_reader_get_attribute (self->priv->reader, "c:type");
            cname = _tmp5_;
            if (cname != NULL) {
                  vala_struct_set_cname (st, cname);
            }
            _tmp6_ = _vala_code_node_ref0 ((ValaSymbol*) st);
            _vala_code_node_unref0 (self->priv->current->symbol);
            self->priv->current->symbol = _tmp6_;
            _g_free0 (cname);
      } else {
            ValaStruct* _tmp7_;
            _tmp7_ = _vala_code_node_ref0 (VALA_STRUCT (self->priv->current->symbol));
            _vala_code_node_unref0 (st);
            st = _tmp7_;
      }
      vala_symbol_set_external ((ValaSymbol*) st, TRUE);
      vala_symbol_set_access ((ValaSymbol*) st, VALA_SYMBOL_ACCESSIBILITY_PUBLIC);
      _tmp8_ = vala_markup_reader_get_attribute (self->priv->reader, "glib:is-gtype-struct-for");
      gtype_struct_for = _tmp8_;
      first_field = TRUE;
      vala_gir_parser_next (self);
      while (TRUE) {
            gboolean _tmp9_;
            const gchar* _tmp12_ = NULL;
            if (!(self->priv->current_token == VALA_MARKUP_TOKEN_TYPE_START_ELEMENT)) {
                  break;
            }
            _tmp9_ = vala_gir_parser_push_metadata (self);
            if (!_tmp9_) {
                  gboolean _tmp10_ = FALSE;
                  if (first_field) {
                        const gchar* _tmp11_ = NULL;
                        _tmp11_ = vala_markup_reader_get_name (self->priv->reader);
                        _tmp10_ = g_strcmp0 (_tmp11_, "field") == 0;
                  } else {
                        _tmp10_ = FALSE;
                  }
                  if (_tmp10_) {
                        first_field = FALSE;
                  }
                  vala_gir_parser_skip_element (self);
                  continue;
            }
            _tmp12_ = vala_markup_reader_get_name (self->priv->reader);
            if (g_strcmp0 (_tmp12_, "field") == 0) {
                  gboolean _tmp13_ = FALSE;
                  gchar* _tmp14_ = NULL;
                  gchar* _tmp15_;
                  gboolean _tmp16_;
                  _tmp14_ = vala_markup_reader_get_attribute (self->priv->reader, "name");
                  _tmp15_ = _tmp14_;
                  _tmp16_ = g_strcmp0 (_tmp15_, "priv") != 0;
                  _g_free0 (_tmp15_);
                  if (_tmp16_) {
                        gboolean _tmp17_ = FALSE;
                        if (first_field) {
                              _tmp17_ = gtype_struct_for != NULL;
                        } else {
                              _tmp17_ = FALSE;
                        }
                        _tmp13_ = !_tmp17_;
                  } else {
                        _tmp13_ = FALSE;
                  }
                  if (_tmp13_) {
                        vala_gir_parser_parse_field (self);
                  } else {
                        vala_gir_parser_skip_element (self);
                  }
                  first_field = FALSE;
            } else {
                  const gchar* _tmp18_ = NULL;
                  _tmp18_ = vala_markup_reader_get_name (self->priv->reader);
                  if (g_strcmp0 (_tmp18_, "constructor") == 0) {
                        vala_gir_parser_parse_constructor (self);
                  } else {
                        const gchar* _tmp19_ = NULL;
                        _tmp19_ = vala_markup_reader_get_name (self->priv->reader);
                        if (g_strcmp0 (_tmp19_, "method") == 0) {
                              vala_gir_parser_parse_method (self, "method");
                        } else {
                              const gchar* _tmp20_ = NULL;
                              _tmp20_ = vala_markup_reader_get_name (self->priv->reader);
                              if (g_strcmp0 (_tmp20_, "union") == 0) {
                                    vala_gir_parser_parse_union (self);
                              } 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 `record'", _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_pop_node (self);
      vala_gir_parser_end_element (self, "record");
      _g_free0 (gtype_struct_for);
      _vala_code_node_unref0 (st);
}


static void vala_gir_parser_parse_class (ValaGirParser* self) {
      gchar* _tmp0_ = NULL;
      gchar* _tmp1_;
      ValaClass* cl = NULL;
      gchar* _tmp2_ = NULL;
      gchar* parent;
      gboolean first_field;
      g_return_if_fail (self != NULL);
      vala_gir_parser_start_element (self, "class");
      _tmp0_ = vala_gir_parser_element_get_name (self, NULL);
      _tmp1_ = _tmp0_;
      vala_gir_parser_push_node (self, _tmp1_, TRUE);
      _g_free0 (_tmp1_);
      _tmp2_ = vala_markup_reader_get_attribute (self->priv->reader, "parent");
      parent = _tmp2_;
      if (self->priv->current->new_symbol) {
            ValaClass* _tmp3_ = NULL;
            gchar* _tmp4_ = NULL;
            gchar* _tmp5_;
            gchar* _tmp6_ = NULL;
            gchar* _tmp7_;
            gchar* _tmp8_ = NULL;
            gchar* cname;
            gboolean _tmp9_;
            ValaSymbol* _tmp14_;
            _tmp3_ = vala_class_new (self->priv->current->name, self->priv->current->source_reference, NULL);
            _vala_code_node_unref0 (cl);
            cl = _tmp3_;
            _tmp4_ = vala_markup_reader_get_attribute (self->priv->reader, "glib:get-type");
            _tmp5_ = _tmp4_;
            _tmp6_ = g_strdup_printf ("%s ()", _tmp5_);
            _tmp7_ = _tmp6_;
            vala_class_set_type_id (cl, _tmp7_);
            _g_free0 (_tmp7_);
            _g_free0 (_tmp5_);
            _tmp8_ = vala_markup_reader_get_attribute (self->priv->reader, "c:type");
            cname = _tmp8_;
            if (cname != NULL) {
                  vala_class_set_cname (cl, cname);
            }
            _tmp9_ = vala_gir_parser_metadata_has_argument (self->priv->metadata, VALA_GIR_PARSER_ARGUMENT_TYPE_CPREFIX);
            if (_tmp9_) {
                  gchar* _tmp10_ = NULL;
                  gchar* _tmp11_;
                  _tmp10_ = vala_gir_parser_metadata_get_string (self->priv->metadata, VALA_GIR_PARSER_ARGUMENT_TYPE_CPREFIX);
                  _tmp11_ = _tmp10_;
                  vala_class_set_lower_case_cprefix (cl, _tmp11_);
                  _g_free0 (_tmp11_);
            }
            if (parent != NULL) {
                  ValaDataType* _tmp12_ = NULL;
                  ValaDataType* _tmp13_;
                  _tmp12_ = vala_gir_parser_parse_type_from_gir_name (self, parent, NULL, NULL, NULL);
                  _tmp13_ = _tmp12_;
                  vala_class_add_base_type (cl, _tmp13_);
                  _vala_code_node_unref0 (_tmp13_);
            }
            _tmp14_ = _vala_code_node_ref0 ((ValaSymbol*) cl);
            _vala_code_node_unref0 (self->priv->current->symbol);
            self->priv->current->symbol = _tmp14_;
            _g_free0 (cname);
      } else {
            ValaClass* _tmp15_;
            _tmp15_ = _vala_code_node_ref0 (VALA_CLASS (self->priv->current->symbol));
            _vala_code_node_unref0 (cl);
            cl = _tmp15_;
      }
      vala_symbol_set_access ((ValaSymbol*) cl, VALA_SYMBOL_ACCESSIBILITY_PUBLIC);
      vala_symbol_set_external ((ValaSymbol*) cl, TRUE);
      vala_gir_parser_next (self);
      first_field = TRUE;
      while (TRUE) {
            gboolean _tmp16_;
            const gchar* _tmp19_ = NULL;
            if (!(self->priv->current_token == VALA_MARKUP_TOKEN_TYPE_START_ELEMENT)) {
                  break;
            }
            _tmp16_ = vala_gir_parser_push_metadata (self);
            if (!_tmp16_) {
                  gboolean _tmp17_ = FALSE;
                  if (first_field) {
                        const gchar* _tmp18_ = NULL;
                        _tmp18_ = vala_markup_reader_get_name (self->priv->reader);
                        _tmp17_ = g_strcmp0 (_tmp18_, "field") == 0;
                  } else {
                        _tmp17_ = FALSE;
                  }
                  if (_tmp17_) {
                        first_field = FALSE;
                  }
                  vala_gir_parser_skip_element (self);
                  continue;
            }
            _tmp19_ = vala_markup_reader_get_name (self->priv->reader);
            if (g_strcmp0 (_tmp19_, "implements") == 0) {
                  gchar* _tmp20_ = NULL;
                  gchar* _tmp21_;
                  ValaDataType* _tmp22_ = NULL;
                  ValaDataType* _tmp23_;
                  vala_gir_parser_start_element (self, "implements");
                  _tmp20_ = vala_markup_reader_get_attribute (self->priv->reader, "name");
                  _tmp21_ = _tmp20_;
                  _tmp22_ = vala_gir_parser_parse_type_from_gir_name (self, _tmp21_, NULL, NULL, NULL);
                  _tmp23_ = _tmp22_;
                  vala_class_add_base_type (cl, _tmp23_);
                  _vala_code_node_unref0 (_tmp23_);
                  _g_free0 (_tmp21_);
                  vala_gir_parser_next (self);
                  vala_gir_parser_end_element (self, "implements");
            } else {
                  const gchar* _tmp24_ = NULL;
                  _tmp24_ = vala_markup_reader_get_name (self->priv->reader);
                  if (g_strcmp0 (_tmp24_, "constant") == 0) {
                        vala_gir_parser_parse_constant (self);
                  } else {
                        const gchar* _tmp25_ = NULL;
                        _tmp25_ = vala_markup_reader_get_name (self->priv->reader);
                        if (g_strcmp0 (_tmp25_, "field") == 0) {
                              gboolean _tmp26_ = FALSE;
                              if (first_field) {
                                    _tmp26_ = parent != NULL;
                              } else {
                                    _tmp26_ = FALSE;
                              }
                              if (_tmp26_) {
                                    vala_gir_parser_skip_element (self);
                              } else {
                                    gchar* _tmp27_ = NULL;
                                    gchar* _tmp28_;
                                    gboolean _tmp29_;
                                    _tmp27_ = vala_markup_reader_get_attribute (self->priv->reader, "name");
                                    _tmp28_ = _tmp27_;
                                    _tmp29_ = g_strcmp0 (_tmp28_, "priv") != 0;
                                    _g_free0 (_tmp28_);
                                    if (_tmp29_) {
                                          vala_gir_parser_parse_field (self);
                                    } else {
                                          vala_gir_parser_skip_element (self);
                                    }
                              }
                              first_field = FALSE;
                        } else {
                              const gchar* _tmp30_ = NULL;
                              _tmp30_ = vala_markup_reader_get_name (self->priv->reader);
                              if (g_strcmp0 (_tmp30_, "property") == 0) {
                                    ValaProperty* _tmp31_ = NULL;
                                    ValaProperty* _tmp32_;
                                    _tmp31_ = vala_gir_parser_parse_property (self);
                                    _tmp32_ = _tmp31_;
                                    _vala_code_node_unref0 (_tmp32_);
                              } else {
                                    const gchar* _tmp33_ = NULL;
                                    _tmp33_ = vala_markup_reader_get_name (self->priv->reader);
                                    if (g_strcmp0 (_tmp33_, "constructor") == 0) {
                                          vala_gir_parser_parse_constructor (self);
                                    } else {
                                          const gchar* _tmp34_ = NULL;
                                          _tmp34_ = vala_markup_reader_get_name (self->priv->reader);
                                          if (g_strcmp0 (_tmp34_, "function") == 0) {
                                                vala_gir_parser_parse_method (self, "function");
                                          } else {
                                                const gchar* _tmp35_ = NULL;
                                                _tmp35_ = vala_markup_reader_get_name (self->priv->reader);
                                                if (g_strcmp0 (_tmp35_, "method") == 0) {
                                                      vala_gir_parser_parse_method (self, "method");
                                                } else {
                                                      const gchar* _tmp36_ = NULL;
                                                      _tmp36_ = vala_markup_reader_get_name (self->priv->reader);
                                                      if (g_strcmp0 (_tmp36_, "virtual-method") == 0) {
                                                            vala_gir_parser_parse_method (self, "virtual-method");
                                                      } else {
                                                            const gchar* _tmp37_ = NULL;
                                                            _tmp37_ = vala_markup_reader_get_name (self->priv->reader);
                                                            if (g_strcmp0 (_tmp37_, "union") == 0) {
                                                                  vala_gir_parser_parse_union (self);
                                                            } else {
                                                                  const gchar* _tmp38_ = NULL;
                                                                  _tmp38_ = vala_markup_reader_get_name (self->priv->reader);
                                                                  if (g_strcmp0 (_tmp38_, "glib:signal") == 0) {
                                                                        vala_gir_parser_parse_signal (self);
                                                                  } else {
                                                                        ValaSourceReference* _tmp39_ = NULL;
                                                                        ValaSourceReference* _tmp40_;
                                                                        const gchar* _tmp41_ = NULL;
                                                                        gchar* _tmp42_ = NULL;
                                                                        gchar* _tmp43_;
                                                                        _tmp39_ = vala_gir_parser_get_current_src (self);
                                                                        _tmp40_ = _tmp39_;
                                                                        _tmp41_ = vala_markup_reader_get_name (self->priv->reader);
                                                                        _tmp42_ = g_strdup_printf ("unknown child element `%s' in `class'", _tmp41_);
                                                                        _tmp43_ = _tmp42_;
                                                                        vala_report_error (_tmp40_, _tmp43_);
                                                                        _g_free0 (_tmp43_);
                                                                        _vala_source_reference_unref0 (_tmp40_);
                                                                        vala_gir_parser_skip_element (self);
                                                                  }
                                                            }
                                                      }
                                                }
                                          }
                                    }
                              }
                        }
                  }
            }
            vala_gir_parser_pop_metadata (self);
      }
      vala_gir_parser_pop_node (self);
      vala_gir_parser_end_element (self, "class");
      _g_free0 (parent);
      _vala_code_node_unref0 (cl);
}


static void vala_gir_parser_parse_interface (ValaGirParser* self) {
      gchar* _tmp0_ = NULL;
      gchar* _tmp1_;
      ValaInterface* iface = NULL;
      g_return_if_fail (self != NULL);
      vala_gir_parser_start_element (self, "interface");
      _tmp0_ = vala_gir_parser_element_get_name (self, NULL);
      _tmp1_ = _tmp0_;
      vala_gir_parser_push_node (self, _tmp1_, TRUE);
      _g_free0 (_tmp1_);
      if (self->priv->current->new_symbol) {
            ValaInterface* _tmp2_ = NULL;
            gchar* _tmp3_ = NULL;
            gchar* cname;
            gchar* _tmp4_ = NULL;
            gchar* typeid;
            ValaSymbol* _tmp7_;
            _tmp2_ = vala_interface_new (self->priv->current->name, self->priv->current->source_reference, NULL);
            _vala_code_node_unref0 (iface);
            iface = _tmp2_;
            _tmp3_ = vala_markup_reader_get_attribute (self->priv->reader, "c:type");
            cname = _tmp3_;
            if (cname != NULL) {
                  vala_interface_set_cname (iface, cname);
            }
            _tmp4_ = vala_markup_reader_get_attribute (self->priv->reader, "glib:get-type");
            typeid = _tmp4_;
            if (typeid != NULL) {
                  gchar* _tmp5_ = NULL;
                  gchar* _tmp6_;
                  _tmp5_ = g_strdup_printf ("%s ()", typeid);
                  _tmp6_ = _tmp5_;
                  vala_interface_set_type_id (iface, _tmp6_);
                  _g_free0 (_tmp6_);
            }
            _tmp7_ = _vala_code_node_ref0 ((ValaSymbol*) iface);
            _vala_code_node_unref0 (self->priv->current->symbol);
            self->priv->current->symbol = _tmp7_;
            _g_free0 (typeid);
            _g_free0 (cname);
      } else {
            ValaInterface* _tmp8_;
            _tmp8_ = _vala_code_node_ref0 (VALA_INTERFACE (self->priv->current->symbol));
            _vala_code_node_unref0 (iface);
            iface = _tmp8_;
      }
      vala_symbol_set_access ((ValaSymbol*) iface, VALA_SYMBOL_ACCESSIBILITY_PUBLIC);
      vala_symbol_set_external ((ValaSymbol*) iface, TRUE);
      vala_gir_parser_next (self);
      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, 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) {
                        vala_gir_parser_parse_field (self);
                  } else {
                        const gchar* _tmp16_ = NULL;
                        _tmp16_ = vala_markup_reader_get_name (self->priv->reader);
                        if (g_strcmp0 (_tmp16_, "property") == 0) {
                              ValaProperty* _tmp17_ = NULL;
                              ValaProperty* _tmp18_;
                              _tmp17_ = vala_gir_parser_parse_property (self);
                              _tmp18_ = _tmp17_;
                              _vala_code_node_unref0 (_tmp18_);
                        } else {
                              const gchar* _tmp19_ = NULL;
                              _tmp19_ = vala_markup_reader_get_name (self->priv->reader);
                              if (g_strcmp0 (_tmp19_, "virtual-method") == 0) {
                                    vala_gir_parser_parse_method (self, "virtual-method");
                              } else {
                                    const gchar* _tmp20_ = NULL;
                                    _tmp20_ = vala_markup_reader_get_name (self->priv->reader);
                                    if (g_strcmp0 (_tmp20_, "function") == 0) {
                                          vala_gir_parser_parse_method (self, "function");
                                    } else {
                                          const gchar* _tmp21_ = NULL;
                                          _tmp21_ = vala_markup_reader_get_name (self->priv->reader);
                                          if (g_strcmp0 (_tmp21_, "method") == 0) {
                                                vala_gir_parser_parse_method (self, "method");
                                          } else {
                                                const gchar* _tmp22_ = NULL;
                                                _tmp22_ = vala_markup_reader_get_name (self->priv->reader);
                                                if (g_strcmp0 (_tmp22_, "glib:signal") == 0) {
                                                      vala_gir_parser_parse_signal (self);
                                                } else {
                                                      ValaSourceReference* _tmp23_ = NULL;
                                                      ValaSourceReference* _tmp24_;
                                                      const gchar* _tmp25_ = NULL;
                                                      gchar* _tmp26_ = NULL;
                                                      gchar* _tmp27_;
                                                      _tmp23_ = vala_gir_parser_get_current_src (self);
                                                      _tmp24_ = _tmp23_;
                                                      _tmp25_ = vala_markup_reader_get_name (self->priv->reader);
                                                      _tmp26_ = g_strdup_printf ("unknown child element `%s' in `interface'", _tmp25_);
                                                      _tmp27_ = _tmp26_;
                                                      vala_report_error (_tmp24_, _tmp27_);
                                                      _g_free0 (_tmp27_);
                                                      _vala_source_reference_unref0 (_tmp24_);
                                                      vala_gir_parser_skip_element (self);
                                                }
                                          }
                                    }
                              }
                        }
                  }
            }
            vala_gir_parser_pop_metadata (self);
      }
      vala_gir_parser_pop_node (self);
      vala_gir_parser_end_element (self, "interface");
      _vala_code_node_unref0 (iface);
}


static void vala_gir_parser_parse_field (ValaGirParser* self) {
      gchar* _tmp0_ = NULL;
      gchar* _tmp1_;
      gchar* _tmp2_ = NULL;
      gchar* allow_none;
      ValaDataType* _tmp3_ = NULL;
      ValaDataType* type;
      gboolean no_array_length;
      ValaDataType* _tmp4_ = NULL;
      ValaField* _tmp5_ = NULL;
      ValaField* field;
      ValaSymbol* _tmp6_;
      g_return_if_fail (self != NULL);
      vala_gir_parser_start_element (self, "field");
      _tmp0_ = vala_gir_parser_element_get_name (self, NULL);
      _tmp1_ = _tmp0_;
      vala_gir_parser_push_node (self, _tmp1_, FALSE);
      _g_free0 (_tmp1_);
      _tmp2_ = vala_markup_reader_get_attribute (self->priv->reader, "allow-none");
      allow_none = _tmp2_;
      vala_gir_parser_next (self);
      _tmp3_ = vala_gir_parser_parse_type (self, NULL, NULL, TRUE, NULL, NULL);
      type = _tmp3_;
      no_array_length = TRUE;
      _tmp4_ = vala_gir_parser_element_get_type (self, type, TRUE, &no_array_length, NULL);
      _vala_code_node_unref0 (type);
      type = _tmp4_;
      _tmp5_ = vala_field_new (self->priv->current->name, type, NULL, self->priv->current->source_reference, NULL);
      field = _tmp5_;
      vala_symbol_set_access ((ValaSymbol*) field, VALA_SYMBOL_ACCESSIBILITY_PUBLIC);
      vala_variable_set_no_array_length ((ValaVariable*) field, no_array_length);
      vala_variable_set_array_null_terminated ((ValaVariable*) field, TRUE);
      if (g_strcmp0 (allow_none, "1") == 0) {
            vala_data_type_set_nullable (type, TRUE);
      }
      _tmp6_ = _vala_code_node_ref0 ((ValaSymbol*) field);
      _vala_code_node_unref0 (self->priv->current->symbol);
      self->priv->current->symbol = _tmp6_;
      vala_gir_parser_pop_node (self);
      vala_gir_parser_end_element (self, "field");
      _vala_code_node_unref0 (field);
      _vala_code_node_unref0 (type);
      _g_free0 (allow_none);
}


static ValaProperty* vala_gir_parser_parse_property (ValaGirParser* self) {
      ValaProperty* result = NULL;
      gchar* _tmp0_ = NULL;
      gchar* _tmp1_;
      gchar* _tmp2_ = NULL;
      gchar* _tmp3_;
      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;
      ValaDataType* _tmp11_ = NULL;
      ValaProperty* _tmp12_ = NULL;
      ValaProperty* prop;
      gboolean _tmp20_ = FALSE;
      ValaSymbol* _tmp28_;
      g_return_val_if_fail (self != NULL, NULL);
      vala_gir_parser_start_element (self, "property");
      _tmp0_ = vala_gir_parser_element_get_name (self, NULL);
      _tmp1_ = _tmp0_;
      _tmp2_ = string_replace (_tmp1_, "-", "_");
      _tmp3_ = _tmp2_;
      vala_gir_parser_push_node (self, _tmp3_, FALSE);
      _g_free0 (_tmp3_);
      _g_free0 (_tmp1_);
      _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_element_get_type (self, type, TRUE, &no_array_length, NULL);
      _vala_code_node_unref0 (type);
      type = _tmp11_;
      _tmp12_ = vala_property_new (self->priv->current->name, type, NULL, NULL, self->priv->current->source_reference, NULL);
      prop = _tmp12_;
      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* _tmp13_ = NULL;
            ValaDataType* _tmp14_ = NULL;
            ValaDataType* _tmp15_;
            ValaPropertyAccessor* _tmp16_ = NULL;
            ValaPropertyAccessor* _tmp17_;
            ValaPropertyAccessor* _tmp18_ = NULL;
            ValaDataType* _tmp19_ = NULL;
            _tmp13_ = vala_property_get_property_type (prop);
            _tmp14_ = vala_data_type_copy (_tmp13_);
            _tmp15_ = _tmp14_;
            _tmp16_ = vala_property_accessor_new (TRUE, FALSE, FALSE, _tmp15_, NULL, NULL, NULL);
            _tmp17_ = _tmp16_;
            vala_property_set_get_accessor (prop, _tmp17_);
            _vala_code_node_unref0 (_tmp17_);
            _vala_code_node_unref0 (_tmp15_);
            _tmp18_ = vala_property_get_get_accessor (prop);
            _tmp19_ = vala_property_accessor_get_value_type (_tmp18_);
            vala_data_type_set_value_owned (_tmp19_, TRUE);
      }
      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_);
      }
      _tmp28_ = _vala_code_node_ref0 ((ValaSymbol*) prop);
      _vala_code_node_unref0 (self->priv->current->symbol);
      self->priv->current->symbol = _tmp28_;
      vala_gir_parser_pop_node (self);
      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);
      return result;
}


static void vala_gir_parser_parse_callback (ValaGirParser* self) {
      g_return_if_fail (self != NULL);
      vala_gir_parser_parse_function (self, "callback");
}


static void vala_gir_parser_parse_constructor (ValaGirParser* self) {
      g_return_if_fail (self != NULL);
      vala_gir_parser_parse_function (self, "constructor");
}


static void vala_gir_parser_parse_function (ValaGirParser* self, const gchar* element_name) {
      gchar* _tmp0_ = NULL;
      gchar* _tmp1_;
      gchar* _tmp2_ = NULL;
      gchar* _tmp3_;
      gchar* _tmp4_ = NULL;
      gchar* _tmp5_;
      gchar* _tmp6_;
      gchar* name;
      gchar* _tmp7_ = NULL;
      gchar* cname;
      gchar* _tmp8_ = NULL;
      gchar* throws_string;
      gchar* _tmp9_ = NULL;
      gchar* invoker;
      ValaDataType* return_type = NULL;
      gchar* return_ctype;
      gint return_array_length_idx;
      gboolean return_no_array_length;
      gboolean return_array_null_terminated;
      gboolean _tmp10_ = FALSE;
      ValaSymbol* s = NULL;
      gboolean _tmp42_ = FALSE;
      ValaExpression* _tmp51_ = NULL;
      ValaExpression* _tmp52_;
      gboolean _tmp53_;
      gboolean _tmp71_ = FALSE;
      ValaSymbol* _tmp76_;
      ValaArrayList* _tmp77_ = NULL;
      ValaArrayList* parameters;
      ValaArrayList* _tmp78_ = NULL;
      ValaArrayList* _tmp79_ = NULL;
      ValaArrayList* _tmp80_ = NULL;
      gboolean _tmp81_ = FALSE;
      ValaList* _tmp99_;
      g_return_if_fail (self != NULL);
      g_return_if_fail (element_name != NULL);
      vala_gir_parser_start_element (self, element_name);
      _tmp0_ = vala_markup_reader_get_attribute (self->priv->reader, "invoker");
      _tmp1_ = _tmp0_;
      _tmp2_ = vala_gir_parser_element_get_name (self, _tmp1_);
      _tmp3_ = _tmp2_;
      _tmp4_ = string_replace (_tmp3_, "-", "_");
      _tmp5_ = _tmp4_;
      vala_gir_parser_push_node (self, _tmp5_, FALSE);
      _g_free0 (_tmp5_);
      _g_free0 (_tmp3_);
      _g_free0 (_tmp1_);
      _tmp6_ = g_strdup (self->priv->current->name);
      name = _tmp6_;
      _tmp7_ = vala_markup_reader_get_attribute (self->priv->reader, "c:identifier");
      cname = _tmp7_;
      _tmp8_ = vala_markup_reader_get_attribute (self->priv->reader, "throws");
      throws_string = _tmp8_;
      _tmp9_ = vala_markup_reader_get_attribute (self->priv->reader, "invoker");
      invoker = _tmp9_;
      vala_gir_parser_next (self);
      return_ctype = NULL;
      return_array_length_idx = -1;
      return_no_array_length = FALSE;
      return_array_null_terminated = FALSE;
      if (self->priv->current_token == VALA_MARKUP_TOKEN_TYPE_START_ELEMENT) {
            const gchar* _tmp11_ = NULL;
            _tmp11_ = vala_markup_reader_get_name (self->priv->reader);
            _tmp10_ = g_strcmp0 (_tmp11_, "return-value") == 0;
      } else {
            _tmp10_ = FALSE;
      }
      if (_tmp10_) {
            gchar* _tmp12_ = NULL;
            gint _tmp13_;
            gboolean _tmp14_;
            gboolean _tmp15_;
            ValaDataType* _tmp16_ = NULL;
            _tmp16_ = vala_gir_parser_parse_return_value (self, &_tmp12_, &_tmp13_, &_tmp14_, &_tmp15_);
            _g_free0 (return_ctype);
            return_ctype = _tmp12_;
            return_array_length_idx = _tmp13_;
            return_no_array_length = _tmp14_;
            return_array_null_terminated = _tmp15_;
            _vala_code_node_unref0 (return_type);
            return_type = _tmp16_;
      } else {
            ValaVoidType* _tmp17_ = NULL;
            _tmp17_ = vala_void_type_new (NULL);
            _vala_code_node_unref0 (return_type);
            return_type = (ValaDataType*) _tmp17_;
      }
      if (g_strcmp0 (element_name, "callback") == 0) {
            ValaDelegate* _tmp18_ = NULL;
            _tmp18_ = vala_delegate_new (name, return_type, self->priv->current->source_reference, NULL);
            _vala_code_node_unref0 (s);
            s = (ValaSymbol*) _tmp18_;
      } else {
            if (g_strcmp0 (element_name, "constructor") == 0) {
                  ValaCreationMethod* _tmp22_ = NULL;
                  ValaCreationMethod* m;
                  gchar* parent_ctype;
                  gboolean _tmp24_ = FALSE;
                  ValaSymbol* _tmp28_;
                  if (g_strcmp0 (name, "new") == 0) {
                        _g_free0 (name);
                        name = NULL;
                  } else {
                        gboolean _tmp19_;
                        _tmp19_ = g_str_has_prefix (name, "new_");
                        if (_tmp19_) {
                              gint _tmp20_;
                              gchar* _tmp21_ = NULL;
                              _tmp20_ = strlen ("new_");
                              _tmp21_ = string_substring (name, (glong) _tmp20_, (glong) (-1));
                              _g_free0 (name);
                              name = _tmp21_;
                        }
                  }
                  _tmp22_ = vala_creation_method_new (NULL, name, self->priv->current->source_reference, NULL);
                  m = _tmp22_;
                  vala_method_set_has_construct_function ((ValaMethod*) m, FALSE);
                  parent_ctype = NULL;
                  if (VALA_IS_CLASS (self->priv->current->parent->symbol)) {
                        gchar* _tmp23_ = NULL;
                        _tmp23_ = vala_gir_parser_node_get_cname (self->priv->current->parent);
                        _g_free0 (parent_ctype);
                        parent_ctype = _tmp23_;
                  }
                  if (return_ctype != NULL) {
                        gboolean _tmp25_ = FALSE;
                        if (parent_ctype == NULL) {
                              _tmp25_ = TRUE;
                        } else {
                              gchar* _tmp26_;
                              gchar* _tmp27_;
                              _tmp26_ = g_strconcat (parent_ctype, "*", NULL);
                              _tmp27_ = _tmp26_;
                              _tmp25_ = g_strcmp0 (return_ctype, _tmp27_) != 0;
                              _g_free0 (_tmp27_);
                        }
                        _tmp24_ = _tmp25_;
                  } else {
                        _tmp24_ = FALSE;
                  }
                  if (_tmp24_) {
                        vala_method_set_custom_return_type_cname ((ValaMethod*) m, return_ctype);
                  }
                  _tmp28_ = _vala_code_node_ref0 ((ValaSymbol*) m);
                  _vala_code_node_unref0 (s);
                  s = _tmp28_;
                  _g_free0 (parent_ctype);
                  _vala_code_node_unref0 (m);
            } else {
                  if (g_strcmp0 (element_name, "glib:signal") == 0) {
                        ValaSignal* _tmp29_ = NULL;
                        _tmp29_ = vala_signal_new (name, return_type, self->priv->current->source_reference, NULL);
                        _vala_code_node_unref0 (s);
                        s = (ValaSymbol*) _tmp29_;
                  } else {
                        ValaMethod* _tmp30_ = NULL;
                        _tmp30_ = vala_method_new (name, return_type, self->priv->current->source_reference, NULL);
                        _vala_code_node_unref0 (s);
                        s = (ValaSymbol*) _tmp30_;
                  }
            }
      }
      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 {
                  if (VALA_IS_DELEGATE (s)) {
                        vala_delegate_set_cname (VALA_DELEGATE (s), cname);
                  }
            }
      }
      vala_symbol_set_external (s, TRUE);
      if (VALA_IS_METHOD (s)) {
            ValaMethod* _tmp31_;
            ValaMethod* m;
            gboolean _tmp32_ = FALSE;
            _tmp31_ = _vala_code_node_ref0 (VALA_METHOD (s));
            m = _tmp31_;
            if (g_strcmp0 (element_name, "virtual-method") == 0) {
                  _tmp32_ = TRUE;
            } else {
                  _tmp32_ = g_strcmp0 (element_name, "callback") == 0;
            }
            if (_tmp32_) {
                  gboolean _tmp33_ = FALSE;
                  if (VALA_IS_INTERFACE (self->priv->current->parent->symbol)) {
                        vala_method_set_is_abstract (m, TRUE);
                  } else {
                        vala_method_set_is_virtual (m, TRUE);
                  }
                  if (invoker == NULL) {
                        gboolean _tmp34_;
                        _tmp34_ = vala_gir_parser_metadata_has_argument (self->priv->metadata, VALA_GIR_PARSER_ARGUMENT_TYPE_VFUNC_NAME);
                        _tmp33_ = !_tmp34_;
                  } else {
                        _tmp33_ = FALSE;
                  }
                  if (_tmp33_) {
                        ValaSourceReference* _tmp35_ = NULL;
                        ValaAttribute* _tmp36_ = NULL;
                        _tmp35_ = vala_code_node_get_source_reference ((ValaCodeNode*) s);
                        _tmp36_ = vala_attribute_new ("NoWrapper", _tmp35_);
                        ((ValaCodeNode*) s)->attributes = g_list_append (((ValaCodeNode*) s)->attributes, _tmp36_);
                  } else {
                        gpointer _tmp37_ = NULL;
                        gchar* _tmp38_;
                        gboolean _tmp39_;
                        _tmp37_ = vala_map_get (self->priv->current->girdata, "name");
                        _tmp38_ = (gchar*) _tmp37_;
                        _tmp39_ = g_strcmp0 (_tmp38_, name) != 0;
                        _g_free0 (_tmp38_);
                        if (_tmp39_) {
                              gpointer _tmp40_ = NULL;
                              gchar* _tmp41_;
                              _tmp40_ = vala_map_get (self->priv->current->girdata, "name");
                              _tmp41_ = (gchar*) _tmp40_;
                              vala_method_set_vfunc_name (m, _tmp41_);
                              _g_free0 (_tmp41_);
                        }
                  }
            } else {
                  if (g_strcmp0 (element_name, "function") == 0) {
                        vala_method_set_binding (m, VALA_MEMBER_BINDING_STATIC);
                  }
            }
            _vala_code_node_unref0 (m);
      }
      if (VALA_IS_METHOD (s)) {
            _tmp42_ = !VALA_IS_CREATION_METHOD (s);
      } else {
            _tmp42_ = FALSE;
      }
      if (_tmp42_) {
            ValaMethod* _tmp43_;
            ValaMethod* method;
            gboolean _tmp44_;
            gboolean _tmp48_;
            _tmp43_ = _vala_code_node_ref0 (VALA_METHOD (s));
            method = _tmp43_;
            _tmp44_ = vala_gir_parser_metadata_has_argument (self->priv->metadata, VALA_GIR_PARSER_ARGUMENT_TYPE_VIRTUAL);
            if (_tmp44_) {
                  gboolean _tmp45_;
                  _tmp45_ = vala_gir_parser_metadata_get_bool (self->priv->metadata, VALA_GIR_PARSER_ARGUMENT_TYPE_VIRTUAL);
                  vala_method_set_is_virtual (method, _tmp45_);
                  vala_method_set_is_abstract (method, FALSE);
            } else {
                  gboolean _tmp46_;
                  _tmp46_ = vala_gir_parser_metadata_has_argument (self->priv->metadata, VALA_GIR_PARSER_ARGUMENT_TYPE_ABSTRACT);
                  if (_tmp46_) {
                        gboolean _tmp47_;
                        _tmp47_ = vala_gir_parser_metadata_get_bool (self->priv->metadata, VALA_GIR_PARSER_ARGUMENT_TYPE_ABSTRACT);
                        vala_method_set_is_abstract (method, _tmp47_);
                        vala_method_set_is_virtual (method, FALSE);
                  }
            }
            _tmp48_ = vala_gir_parser_metadata_has_argument (self->priv->metadata, VALA_GIR_PARSER_ARGUMENT_TYPE_VFUNC_NAME);
            if (_tmp48_) {
                  gchar* _tmp49_ = NULL;
                  gchar* _tmp50_;
                  _tmp49_ = vala_gir_parser_metadata_get_string (self->priv->metadata, VALA_GIR_PARSER_ARGUMENT_TYPE_VFUNC_NAME);
                  _tmp50_ = _tmp49_;
                  vala_method_set_vfunc_name (method, _tmp50_);
                  _g_free0 (_tmp50_);
                  vala_method_set_is_virtual (method, TRUE);
            }
            _vala_code_node_unref0 (method);
      }
      _tmp51_ = vala_gir_parser_metadata_get_expression (self->priv->metadata, VALA_GIR_PARSER_ARGUMENT_TYPE_THROWS);
      _tmp52_ = _tmp51_;
      _tmp53_ = !VALA_IS_NULL_LITERAL (_tmp52_);
      _vala_code_node_unref0 (_tmp52_);
      if (_tmp53_) {
            gboolean _tmp54_;
            _tmp54_ = vala_gir_parser_metadata_has_argument (self->priv->metadata, VALA_GIR_PARSER_ARGUMENT_TYPE_THROWS);
            if (_tmp54_) {
                  gchar* _tmp55_ = NULL;
                  gchar* _tmp56_;
                  gchar** _tmp57_;
                  gchar** _tmp58_ = NULL;
                  gchar** _tmp59_;
                  gchar** error_types;
                  gint error_types_length1;
                  gint _error_types_size_;
                  _tmp55_ = vala_gir_parser_metadata_get_string (self->priv->metadata, VALA_GIR_PARSER_ARGUMENT_TYPE_THROWS);
                  _tmp56_ = _tmp55_;
                  _tmp58_ = _tmp57_ = g_strsplit (_tmp56_, ",", 0);
                  _tmp59_ = _tmp58_;
                  _g_free0 (_tmp56_);
                  error_types = _tmp59_;
                  error_types_length1 = _vala_array_length (_tmp57_);
                  _error_types_size_ = error_types_length1;
                  {
                        gchar** error_type_collection = NULL;
                        gint error_type_collection_length1 = 0;
                        gint _error_type_collection_size_ = 0;
                        gint error_type_it;
                        error_type_collection = error_types;
                        error_type_collection_length1 = error_types_length1;
                        for (error_type_it = 0; error_type_it < error_types_length1; error_type_it = error_type_it + 1) {
                              gchar* _tmp60_;
                              gchar* error_type = NULL;
                              _tmp60_ = g_strdup (error_type_collection[error_type_it]);
                              error_type = _tmp60_;
                              {
                                    ValaSourceReference* _tmp61_ = NULL;
                                    ValaSourceReference* _tmp62_;
                                    ValaDataType* _tmp63_ = NULL;
                                    ValaDataType* _tmp64_;
                                    _tmp61_ = vala_gir_parser_metadata_get_source_reference (self->priv->metadata, VALA_GIR_PARSER_ARGUMENT_TYPE_THROWS);
                                    _tmp62_ = _tmp61_;
                                    _tmp63_ = vala_gir_parser_parse_type_from_string (self, error_type, TRUE, _tmp62_);
                                    _tmp64_ = _tmp63_;
                                    vala_code_node_add_error_type ((ValaCodeNode*) s, _tmp64_);
                                    _vala_code_node_unref0 (_tmp64_);
                                    _vala_source_reference_unref0 (_tmp62_);
                                    _g_free0 (error_type);
                              }
                        }
                  }
                  error_types = (_vala_array_free (error_types, error_types_length1, (GDestroyNotify) g_free), NULL);
            } else {
                  if (g_strcmp0 (throws_string, "1") == 0) {
                        ValaErrorType* _tmp65_ = NULL;
                        ValaErrorType* _tmp66_;
                        _tmp65_ = vala_error_type_new (NULL, NULL, NULL);
                        _tmp66_ = _tmp65_;
                        vala_code_node_add_error_type ((ValaCodeNode*) s, (ValaDataType*) _tmp66_);
                        _vala_code_node_unref0 (_tmp66_);
                  }
            }
      }
      if (VALA_IS_METHOD (s)) {
            ValaMethod* _tmp67_;
            ValaMethod* m;
            gboolean _tmp68_;
            gchar* _tmp69_ = NULL;
            gchar* _tmp70_;
            _tmp67_ = _vala_code_node_ref0 (VALA_METHOD (s));
            m = _tmp67_;
            _tmp68_ = vala_gir_parser_metadata_get_bool (self->priv->metadata, VALA_GIR_PARSER_ARGUMENT_TYPE_PRINTF_FORMAT);
            vala_method_set_printf_format (m, _tmp68_);
            _tmp69_ = vala_gir_parser_metadata_get_string (self->priv->metadata, VALA_GIR_PARSER_ARGUMENT_TYPE_SENTINEL);
            _tmp70_ = _tmp69_;
            vala_method_set_sentinel (m, _tmp70_);
            _g_free0 (_tmp70_);
            _vala_code_node_unref0 (m);
      }
      if (VALA_IS_ARRAY_TYPE (return_type)) {
            gboolean _tmp72_;
            _tmp72_ = vala_gir_parser_metadata_has_argument (self->priv->metadata, VALA_GIR_PARSER_ARGUMENT_TYPE_ARRAY_LENGTH_IDX);
            _tmp71_ = _tmp72_;
      } else {
            _tmp71_ = FALSE;
      }
      if (_tmp71_) {
            gint _tmp73_;
            _tmp73_ = vala_gir_parser_metadata_get_integer (self->priv->metadata, VALA_GIR_PARSER_ARGUMENT_TYPE_ARRAY_LENGTH_IDX);
            return_array_length_idx = _tmp73_;
      } else {
            if (VALA_IS_METHOD (s)) {
                  ValaMethod* _tmp74_;
                  ValaMethod* m;
                  _tmp74_ = _vala_code_node_ref0 (VALA_METHOD (s));
                  m = _tmp74_;
                  vala_method_set_no_array_length (m, return_no_array_length);
                  vala_method_set_array_null_terminated (m, return_array_null_terminated);
                  _vala_code_node_unref0 (m);
            } else {
                  if (VALA_IS_DELEGATE (s)) {
                        ValaDelegate* _tmp75_;
                        ValaDelegate* d;
                        _tmp75_ = _vala_code_node_ref0 (VALA_DELEGATE (s));
                        d = _tmp75_;
                        vala_delegate_set_no_array_length (d, return_no_array_length);
                        vala_delegate_set_array_null_terminated (d, return_array_null_terminated);
                        _vala_code_node_unref0 (d);
                  }
            }
      }
      self->priv->current->return_array_length_idx = return_array_length_idx;
      _tmp76_ = _vala_code_node_ref0 (s);
      _vala_code_node_unref0 (self->priv->current->symbol);
      self->priv->current->symbol = _tmp76_;
      _tmp77_ = vala_array_list_new (VALA_GIR_PARSER_TYPE_PARAMETER_INFO, (GBoxedCopyFunc) vala_gir_parser_parameter_info_ref, vala_gir_parser_parameter_info_unref, g_direct_equal);
      parameters = _tmp77_;
      _tmp78_ = vala_array_list_new (G_TYPE_INT, NULL, NULL, g_direct_equal);
      _vala_iterable_unref0 (self->priv->current->array_length_parameters);
      self->priv->current->array_length_parameters = _tmp78_;
      _tmp79_ = vala_array_list_new (G_TYPE_INT, NULL, NULL, g_direct_equal);
      _vala_iterable_unref0 (self->priv->current->closure_parameters);
      self->priv->current->closure_parameters = _tmp79_;
      _tmp80_ = vala_array_list_new (G_TYPE_INT, NULL, NULL, g_direct_equal);
      _vala_iterable_unref0 (self->priv->current->destroy_parameters);
      self->priv->current->destroy_parameters = _tmp80_;
      if (self->priv->current_token == VALA_MARKUP_TOKEN_TYPE_START_ELEMENT) {
            const gchar* _tmp82_ = NULL;
            _tmp82_ = vala_markup_reader_get_name (self->priv->reader);
            _tmp81_ = g_strcmp0 (_tmp82_, "parameters") == 0;
      } else {
            _tmp81_ = FALSE;
      }
      if (_tmp81_) {
            vala_gir_parser_start_element (self, "parameters");
            vala_gir_parser_next (self);
            while (TRUE) {
                  gboolean _tmp83_;
                  gint array_length_idx = 0;
                  gint closure_idx = 0;
                  gint destroy_idx = 0;
                  gchar* scope = NULL;
                  gchar* default_param_name;
                  gint _tmp84_;
                  gchar* _tmp85_ = NULL;
                  gint _tmp86_;
                  gint _tmp87_;
                  gint _tmp88_;
                  gchar* _tmp89_ = NULL;
                  ValaParameter* _tmp90_ = NULL;
                  ValaParameter* param;
                  ValaGirParserParameterInfo* _tmp91_ = NULL;
                  ValaGirParserParameterInfo* info;
                  gboolean _tmp92_ = FALSE;
                  if (!(self->priv->current_token == VALA_MARKUP_TOKEN_TYPE_START_ELEMENT)) {
                        break;
                  }
                  _tmp83_ = vala_gir_parser_push_metadata (self);
                  if (!_tmp83_) {
                        vala_gir_parser_skip_element (self);
                        continue;
                  }
                  default_param_name = NULL;
                  _tmp84_ = vala_collection_get_size ((ValaCollection*) parameters);
                  _tmp85_ = g_strdup_printf ("arg%d", _tmp84_);
                  _g_free0 (default_param_name);
                  default_param_name = _tmp85_;
                  _tmp90_ = vala_gir_parser_parse_parameter (self, &_tmp86_, &_tmp87_, &_tmp88_, &_tmp89_, default_param_name);
                  array_length_idx = _tmp86_;
                  closure_idx = _tmp87_;
                  destroy_idx = _tmp88_;
                  _g_free0 (scope);
                  scope = _tmp89_;
                  param = _tmp90_;
                  if (array_length_idx != (-1)) {
                        vala_collection_add ((ValaCollection*) self->priv->current->array_length_parameters, GINT_TO_POINTER (array_length_idx));
                  }
                  if (closure_idx != (-1)) {
                        vala_collection_add ((ValaCollection*) self->priv->current->closure_parameters, GINT_TO_POINTER (closure_idx));
                  }
                  if (destroy_idx != (-1)) {
                        vala_collection_add ((ValaCollection*) self->priv->current->destroy_parameters, GINT_TO_POINTER (destroy_idx));
                  }
                  _tmp91_ = vala_gir_parser_parameter_info_new (param, array_length_idx, closure_idx, destroy_idx);
                  info = _tmp91_;
                  if (VALA_IS_METHOD (s)) {
                        _tmp92_ = g_strcmp0 (scope, "async") == 0;
                  } else {
                        _tmp92_ = FALSE;
                  }
                  if (_tmp92_) {
                        ValaDataType* _tmp93_ = NULL;
                        ValaDataType* _tmp94_;
                        ValaUnresolvedType* _tmp95_;
                        ValaUnresolvedType* unresolved_type;
                        gboolean _tmp96_ = FALSE;
                        _tmp93_ = vala_variable_get_variable_type ((ValaVariable*) param);
                        _tmp94_ = _tmp93_;
                        _tmp95_ = _vala_code_node_ref0 (VALA_IS_UNRESOLVED_TYPE (_tmp94_) ? ((ValaUnresolvedType*) _tmp94_) : NULL);
                        unresolved_type = _tmp95_;
                        if (unresolved_type != NULL) {
                              ValaUnresolvedSymbol* _tmp97_ = NULL;
                              const gchar* _tmp98_ = NULL;
                              _tmp97_ = vala_unresolved_type_get_unresolved_symbol (unresolved_type);
                              _tmp98_ = vala_symbol_get_name ((ValaSymbol*) _tmp97_);
                              _tmp96_ = g_strcmp0 (_tmp98_, "AsyncReadyCallback") == 0;
                        } else {
                              _tmp96_ = FALSE;
                        }
                        if (_tmp96_) {
                              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_parameter_info_unref0 (info);
                  _vala_code_node_unref0 (param);
                  _g_free0 (default_param_name);
                  _g_free0 (scope);
            }
            vala_gir_parser_end_element (self, "parameters");
      }
      _tmp99_ = _vala_iterable_ref0 ((ValaList*) parameters);
      _vala_iterable_unref0 (self->priv->current->parameters);
      self->priv->current->parameters = _tmp99_;
      vala_gir_parser_pop_node (self);
      vala_gir_parser_end_element (self, element_name);
      _vala_iterable_unref0 (parameters);
      _vala_code_node_unref0 (s);
      _g_free0 (return_ctype);
      _vala_code_node_unref0 (return_type);
      _g_free0 (invoker);
      _g_free0 (throws_string);
      _g_free0 (cname);
      _g_free0 (name);
}


static void vala_gir_parser_parse_method (ValaGirParser* self, const gchar* element_name) {
      g_return_if_fail (self != NULL);
      g_return_if_fail (element_name != NULL);
      vala_gir_parser_parse_function (self, element_name);
}


static void vala_gir_parser_parse_signal (ValaGirParser* self) {
      g_return_if_fail (self != NULL);
      vala_gir_parser_parse_function (self, "glib:signal");
}


static void vala_gir_parser_parse_boxed (ValaGirParser* self, const gchar* element_name) {
      gchar* _tmp0_ = NULL;
      gchar* name;
      gchar* _tmp2_ = NULL;
      gchar* _tmp3_;
      ValaClass* cl = NULL;
      g_return_if_fail (self != NULL);
      g_return_if_fail (element_name != 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_element_get_name (self, name);
      _tmp3_ = _tmp2_;
      vala_gir_parser_push_node (self, _tmp3_, TRUE);
      _g_free0 (_tmp3_);
      if (self->priv->current->new_symbol) {
            ValaClass* _tmp4_ = NULL;
            gchar* _tmp5_ = NULL;
            gchar* cname;
            gchar* _tmp8_ = NULL;
            gchar* typeid;
            ValaSymbol* _tmp11_;
            _tmp4_ = vala_class_new (self->priv->current->name, self->priv->current->source_reference, NULL);
            _vala_code_node_unref0 (cl);
            cl = _tmp4_;
            vala_class_set_is_compact (cl, TRUE);
            _tmp5_ = vala_markup_reader_get_attribute (self->priv->reader, "c:type");
            cname = _tmp5_;
            if (cname != NULL) {
                  gchar* _tmp6_ = NULL;
                  gchar* _tmp7_;
                  _tmp6_ = vala_markup_reader_get_attribute (self->priv->reader, "c:type");
                  _tmp7_ = _tmp6_;
                  vala_class_set_cname (cl, _tmp7_);
                  _g_free0 (_tmp7_);
            }
            _tmp8_ = vala_markup_reader_get_attribute (self->priv->reader, "glib:get-type");
            typeid = _tmp8_;
            if (typeid != NULL) {
                  gchar* _tmp9_ = NULL;
                  gchar* _tmp10_;
                  _tmp9_ = g_strdup_printf ("%s ()", typeid);
                  _tmp10_ = _tmp9_;
                  vala_class_set_type_id (cl, _tmp10_);
                  _g_free0 (_tmp10_);
                  vala_class_set_free_function (cl, "g_boxed_free");
                  vala_class_set_dup_function (cl, "g_boxed_copy");
            }
            _tmp11_ = _vala_code_node_ref0 ((ValaSymbol*) cl);
            _vala_code_node_unref0 (self->priv->current->symbol);
            self->priv->current->symbol = _tmp11_;
            _g_free0 (typeid);
            _g_free0 (cname);
      } else {
            ValaClass* _tmp12_;
            _tmp12_ = _vala_code_node_ref0 (VALA_CLASS (self->priv->current->symbol));
            _vala_code_node_unref0 (cl);
            cl = _tmp12_;
      }
      vala_symbol_set_access ((ValaSymbol*) cl, VALA_SYMBOL_ACCESSIBILITY_PUBLIC);
      vala_symbol_set_external ((ValaSymbol*) cl, TRUE);
      vala_gir_parser_next (self);
      while (TRUE) {
            gboolean _tmp13_;
            const gchar* _tmp14_ = NULL;
            if (!(self->priv->current_token == VALA_MARKUP_TOKEN_TYPE_START_ELEMENT)) {
                  break;
            }
            _tmp13_ = vala_gir_parser_push_metadata (self);
            if (!_tmp13_) {
                  vala_gir_parser_skip_element (self);
                  continue;
            }
            _tmp14_ = vala_markup_reader_get_name (self->priv->reader);
            if (g_strcmp0 (_tmp14_, "field") == 0) {
                  vala_gir_parser_parse_field (self);
            } else {
                  const gchar* _tmp15_ = NULL;
                  _tmp15_ = vala_markup_reader_get_name (self->priv->reader);
                  if (g_strcmp0 (_tmp15_, "constructor") == 0) {
                        vala_gir_parser_parse_constructor (self);
                  } else {
                        const gchar* _tmp16_ = NULL;
                        _tmp16_ = vala_markup_reader_get_name (self->priv->reader);
                        if (g_strcmp0 (_tmp16_, "method") == 0) {
                              vala_gir_parser_parse_method (self, "method");
                        } else {
                              const gchar* _tmp17_ = NULL;
                              _tmp17_ = vala_markup_reader_get_name (self->priv->reader);
                              if (g_strcmp0 (_tmp17_, "union") == 0) {
                                    vala_gir_parser_parse_union (self);
                              } else {
                                    ValaSourceReference* _tmp18_ = NULL;
                                    ValaSourceReference* _tmp19_;
                                    const gchar* _tmp20_ = NULL;
                                    gchar* _tmp21_ = NULL;
                                    gchar* _tmp22_;
                                    _tmp18_ = vala_gir_parser_get_current_src (self);
                                    _tmp19_ = _tmp18_;
                                    _tmp20_ = vala_markup_reader_get_name (self->priv->reader);
                                    _tmp21_ = g_strdup_printf ("unknown child element `%s' in `class'", _tmp20_);
                                    _tmp22_ = _tmp21_;
                                    vala_report_error (_tmp19_, _tmp22_);
                                    _g_free0 (_tmp22_);
                                    _vala_source_reference_unref0 (_tmp19_);
                                    vala_gir_parser_skip_element (self);
                              }
                        }
                  }
            }
            vala_gir_parser_pop_metadata (self);
      }
      vala_gir_parser_pop_node (self);
      vala_gir_parser_end_element (self, element_name);
      _vala_code_node_unref0 (cl);
      _g_free0 (name);
}


static void vala_gir_parser_parse_union (ValaGirParser* self) {
      gchar* _tmp0_ = NULL;
      gchar* _tmp1_;
      ValaStruct* st = NULL;
      g_return_if_fail (self != NULL);
      vala_gir_parser_start_element (self, "union");
      _tmp0_ = vala_gir_parser_element_get_name (self, NULL);
      _tmp1_ = _tmp0_;
      vala_gir_parser_push_node (self, _tmp1_, TRUE);
      _g_free0 (_tmp1_);
      if (self->priv->current->new_symbol) {
            gchar* _tmp2_ = NULL;
            gchar* _tmp3_;
            ValaStruct* _tmp4_ = NULL;
            ValaSymbol* _tmp5_;
            _tmp2_ = vala_markup_reader_get_attribute (self->priv->reader, "name");
            _tmp3_ = _tmp2_;
            _tmp4_ = vala_struct_new (_tmp3_, self->priv->current->source_reference, NULL);
            _vala_code_node_unref0 (st);
            st = _tmp4_;
            _g_free0 (_tmp3_);
            _tmp5_ = _vala_code_node_ref0 ((ValaSymbol*) st);
            _vala_code_node_unref0 (self->priv->current->symbol);
            self->priv->current->symbol = _tmp5_;
      } else {
            ValaStruct* _tmp6_;
            _tmp6_ = _vala_code_node_ref0 (VALA_STRUCT (self->priv->current->symbol));
            _vala_code_node_unref0 (st);
            st = _tmp6_;
      }
      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 _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_, "field") == 0) {
                  vala_gir_parser_parse_field (self);
            } else {
                  const gchar* _tmp9_ = NULL;
                  _tmp9_ = vala_markup_reader_get_name (self->priv->reader);
                  if (g_strcmp0 (_tmp9_, "constructor") == 0) {
                        vala_gir_parser_parse_constructor (self);
                  } else {
                        const gchar* _tmp10_ = NULL;
                        _tmp10_ = vala_markup_reader_get_name (self->priv->reader);
                        if (g_strcmp0 (_tmp10_, "method") == 0) {
                              vala_gir_parser_parse_method (self, "method");
                        } else {
                              const gchar* _tmp11_ = NULL;
                              _tmp11_ = vala_markup_reader_get_name (self->priv->reader);
                              if (g_strcmp0 (_tmp11_, "record") == 0) {
                                    vala_gir_parser_parse_record (self);
                              } 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 `union'", _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_gir_parser_pop_node (self);
      vala_gir_parser_end_element (self, "union");
      _vala_code_node_unref0 (st);
}


static void vala_gir_parser_parse_constant (ValaGirParser* self) {
      gchar* _tmp0_ = NULL;
      gchar* _tmp1_;
      ValaDataType* _tmp2_ = NULL;
      ValaDataType* type;
      ValaConstant* _tmp3_ = NULL;
      ValaConstant* c;
      ValaSymbol* _tmp4_;
      g_return_if_fail (self != NULL);
      vala_gir_parser_start_element (self, "constant");
      _tmp0_ = vala_gir_parser_element_get_name (self, NULL);
      _tmp1_ = _tmp0_;
      vala_gir_parser_push_node (self, _tmp1_, FALSE);
      _g_free0 (_tmp1_);
      vala_gir_parser_next (self);
      _tmp2_ = vala_gir_parser_parse_type (self, NULL, NULL, TRUE, NULL, NULL);
      type = _tmp2_;
      _tmp3_ = vala_constant_new (self->priv->current->name, type, NULL, self->priv->current->source_reference, NULL);
      c = _tmp3_;
      _tmp4_ = _vala_code_node_ref0 ((ValaSymbol*) c);
      _vala_code_node_unref0 (self->priv->current->symbol);
      self->priv->current->symbol = _tmp4_;
      vala_symbol_set_access ((ValaSymbol*) c, VALA_SYMBOL_ACCESSIBILITY_PUBLIC);
      vala_symbol_set_external ((ValaSymbol*) c, TRUE);
      vala_gir_parser_pop_node (self);
      vala_gir_parser_end_element (self, "constant");
      _vala_code_node_unref0 (c);
      _vala_code_node_unref0 (type);
}


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);
      {
            ValaArrayList* _tmp0_;
            ValaArrayList* _map_from_list;
            gint _tmp1_;
            gint _map_from_size;
            gint _map_from_index;
            _tmp0_ = _vala_iterable_ref0 (self->priv->unresolved_gir_symbols);
            _map_from_list = _tmp0_;
            _tmp1_ = vala_collection_get_size ((ValaCollection*) _map_from_list);
            _map_from_size = _tmp1_;
            _map_from_index = -1;
            while (TRUE) {
                  gpointer _tmp2_ = NULL;
                  ValaUnresolvedSymbol* map_from;
                  _map_from_index = _map_from_index + 1;
                  if (!(_map_from_index < _map_from_size)) {
                        break;
                  }
                  _tmp2_ = vala_list_get ((ValaList*) _map_from_list, _map_from_index);
                  map_from = (ValaUnresolvedSymbol*) _tmp2_;
                  while (TRUE) {
                        gpointer _tmp3_ = NULL;
                        ValaSymbol* map_to;
                        ValaUnresolvedSymbol* _tmp25_ = NULL;
                        ValaUnresolvedSymbol* _tmp26_;
                        if (!(map_from != NULL)) {
                              break;
                        }
                        _tmp3_ = vala_map_get ((ValaMap*) self->priv->unresolved_symbols_map, map_from);
                        map_to = (ValaSymbol*) _tmp3_;
                        if (map_to != NULL) {
                              const gchar* _tmp4_ = NULL;
                              vala_unresolved_symbol_set_inner (map_from, NULL);
                              _tmp4_ = vala_symbol_get_name (map_to);
                              vala_symbol_set_name ((ValaSymbol*) map_from, _tmp4_);
                              if (VALA_IS_UNRESOLVED_SYMBOL (map_to)) {
                                    ValaUnresolvedSymbol* _tmp5_;
                                    ValaUnresolvedSymbol* umap_to;
                                    _tmp5_ = _vala_code_node_ref0 (VALA_UNRESOLVED_SYMBOL (map_to));
                                    umap_to = _tmp5_;
                                    while (TRUE) {
                                          ValaUnresolvedSymbol* _tmp6_ = NULL;
                                          ValaUnresolvedSymbol* _tmp7_ = NULL;
                                          ValaUnresolvedSymbol* _tmp8_;
                                          const gchar* _tmp9_ = NULL;
                                          ValaUnresolvedSymbol* _tmp10_ = NULL;
                                          ValaUnresolvedSymbol* _tmp11_;
                                          ValaUnresolvedSymbol* _tmp12_ = NULL;
                                          ValaUnresolvedSymbol* _tmp13_;
                                          _tmp6_ = vala_unresolved_symbol_get_inner (umap_to);
                                          if (!(_tmp6_ != NULL)) {
                                                break;
                                          }
                                          _tmp7_ = vala_unresolved_symbol_get_inner (umap_to);
                                          _tmp8_ = _vala_code_node_ref0 (_tmp7_);
                                          _vala_code_node_unref0 (umap_to);
                                          umap_to = _tmp8_;
                                          _tmp9_ = vala_symbol_get_name ((ValaSymbol*) umap_to);
                                          _tmp10_ = vala_unresolved_symbol_new (NULL, _tmp9_, NULL);
                                          _tmp11_ = _tmp10_;
                                          vala_unresolved_symbol_set_inner (map_from, _tmp11_);
                                          _vala_code_node_unref0 (_tmp11_);
                                          _tmp12_ = vala_unresolved_symbol_get_inner (map_from);
                                          _tmp13_ = _vala_code_node_ref0 (_tmp12_);
                                          _vala_code_node_unref0 (map_from);
                                          map_from = _tmp13_;
                                    }
                                    _vala_code_node_unref0 (umap_to);
                              } else {
                                    while (TRUE) {
                                          gboolean _tmp14_ = FALSE;
                                          ValaSymbol* _tmp15_ = NULL;
                                          ValaSymbol* _tmp18_ = NULL;
                                          ValaSymbol* _tmp19_;
                                          const gchar* _tmp20_ = NULL;
                                          ValaUnresolvedSymbol* _tmp21_ = NULL;
                                          ValaUnresolvedSymbol* _tmp22_;
                                          ValaUnresolvedSymbol* _tmp23_ = NULL;
                                          ValaUnresolvedSymbol* _tmp24_;
                                          _tmp15_ = vala_symbol_get_parent_symbol (map_to);
                                          if (_tmp15_ != NULL) {
                                                ValaSymbol* _tmp16_ = NULL;
                                                ValaNamespace* _tmp17_ = NULL;
                                                _tmp16_ = vala_symbol_get_parent_symbol (map_to);
                                                _tmp17_ = vala_code_context_get_root (self->priv->context);
                                                _tmp14_ = _tmp16_ != VALA_SYMBOL (_tmp17_);
                                          } else {
                                                _tmp14_ = FALSE;
                                          }
                                          if (!_tmp14_) {
                                                break;
                                          }
                                          _tmp18_ = vala_symbol_get_parent_symbol (map_to);
                                          _tmp19_ = _vala_code_node_ref0 (_tmp18_);
                                          _vala_code_node_unref0 (map_to);
                                          map_to = _tmp19_;
                                          _tmp20_ = vala_symbol_get_name (map_to);
                                          _tmp21_ = vala_unresolved_symbol_new (NULL, _tmp20_, NULL);
                                          _tmp22_ = _tmp21_;
                                          vala_unresolved_symbol_set_inner (map_from, _tmp22_);
                                          _vala_code_node_unref0 (_tmp22_);
                                          _tmp23_ = vala_unresolved_symbol_get_inner (map_from);
                                          _tmp24_ = _vala_code_node_ref0 (_tmp23_);
                                          _vala_code_node_unref0 (map_from);
                                          map_from = _tmp24_;
                                    }
                              }
                              _vala_code_node_unref0 (map_to);
                              break;
                        }
                        _tmp25_ = vala_unresolved_symbol_get_inner (map_from);
                        _tmp26_ = _vala_code_node_ref0 (_tmp25_);
                        _vala_code_node_unref0 (map_from);
                        map_from = _tmp26_;
                        _vala_code_node_unref0 (map_to);
                  }
                  _vala_code_node_unref0 (map_from);
            }
            _vala_iterable_unref0 (_map_from_list);
      }
}


static void vala_gir_parser_create_new_namespaces (ValaGirParser* self) {
      g_return_if_fail (self != NULL);
      {
            ValaArrayList* _tmp0_;
            ValaArrayList* _node_list;
            gint _tmp1_;
            gint _node_size;
            gint _node_index;
            _tmp0_ = _vala_iterable_ref0 (vala_gir_parser_node_new_namespaces);
            _node_list = _tmp0_;
            _tmp1_ = vala_collection_get_size ((ValaCollection*) _node_list);
            _node_size = _tmp1_;
            _node_index = -1;
            while (TRUE) {
                  gpointer _tmp2_ = NULL;
                  ValaGirParserNode* node;
                  _node_index = _node_index + 1;
                  if (!(_node_index < _node_size)) {
                        break;
                  }
                  _tmp2_ = vala_list_get ((ValaList*) _node_list, _node_index);
                  node = (ValaGirParserNode*) _tmp2_;
                  if (node->symbol == NULL) {
                        ValaNamespace* _tmp3_ = NULL;
                        _tmp3_ = vala_namespace_new (node->name, node->source_reference);
                        _vala_code_node_unref0 (node->symbol);
                        node->symbol = (ValaSymbol*) _tmp3_;
                  }
                  _vala_gir_parser_node_unref0 (node);
            }
            _vala_iterable_unref0 (_node_list);
      }
}


static void vala_gir_parser_process_interface (ValaGirParser* self, ValaGirParserNode* iface_node) {
      ValaInterface* _tmp0_;
      ValaInterface* iface;
      gboolean has_instantiable_prereq;
      g_return_if_fail (self != NULL);
      g_return_if_fail (iface_node != NULL);
      _tmp0_ = _vala_code_node_ref0 (VALA_INTERFACE (iface_node->symbol));
      iface = _tmp0_;
      has_instantiable_prereq = FALSE;
      {
            ValaList* _tmp1_ = NULL;
            ValaList* _prereq_list;
            gint _tmp2_;
            gint _prereq_size;
            gint _prereq_index;
            _tmp1_ = vala_interface_get_prerequisites (iface);
            _prereq_list = _tmp1_;
            _tmp2_ = vala_collection_get_size ((ValaCollection*) _prereq_list);
            _prereq_size = _tmp2_;
            _prereq_index = -1;
            while (TRUE) {
                  gpointer _tmp3_ = NULL;
                  ValaDataType* prereq;
                  ValaSymbol* sym;
                  _prereq_index = _prereq_index + 1;
                  if (!(_prereq_index < _prereq_size)) {
                        break;
                  }
                  _tmp3_ = vala_list_get (_prereq_list, _prereq_index);
                  prereq = (ValaDataType*) _tmp3_;
                  sym = NULL;
                  if (VALA_IS_UNRESOLVED_TYPE (prereq)) {
                        ValaUnresolvedSymbol* _tmp4_ = NULL;
                        ValaUnresolvedSymbol* _tmp5_;
                        ValaUnresolvedSymbol* unresolved_symbol;
                        ValaSymbol* _tmp6_ = NULL;
                        _tmp4_ = vala_unresolved_type_get_unresolved_symbol (VALA_UNRESOLVED_TYPE (prereq));
                        _tmp5_ = _vala_code_node_ref0 (_tmp4_);
                        unresolved_symbol = _tmp5_;
                        _tmp6_ = vala_gir_parser_resolve_symbol (self, iface_node->parent, unresolved_symbol);
                        _vala_code_node_unref0 (sym);
                        sym = _tmp6_;
                        _vala_code_node_unref0 (unresolved_symbol);
                  } else {
                        ValaTypeSymbol* _tmp7_ = NULL;
                        ValaSymbol* _tmp8_;
                        _tmp7_ = vala_data_type_get_data_type (prereq);
                        _tmp8_ = _vala_code_node_ref0 ((ValaSymbol*) _tmp7_);
                        _vala_code_node_unref0 (sym);
                        sym = _tmp8_;
                  }
                  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* _tmp9_ = NULL;
            ValaSymbol* _tmp10_ = NULL;
            ValaObjectTypeSymbol* _tmp11_;
            ValaObjectType* _tmp12_ = NULL;
            ValaObjectType* _tmp13_;
            _tmp9_ = vala_symbol_get_scope ((ValaSymbol*) self->priv->glib_ns);
            _tmp10_ = vala_scope_lookup (_tmp9_, "Object");
            _tmp11_ = VALA_OBJECT_TYPE_SYMBOL (_tmp10_);
            _tmp12_ = vala_object_type_new (_tmp11_);
            _tmp13_ = _tmp12_;
            vala_interface_add_prerequisite (iface, (ValaDataType*) _tmp13_);
            _vala_code_node_unref0 (_tmp13_);
            _vala_code_node_unref0 (_tmp11_);
      }
      _vala_code_node_unref0 (iface);
}


static void vala_gir_parser_process_alias (ValaGirParser* self, ValaGirParserNode* alias) {
      ValaDataType* base_type;
      ValaSymbol* type_sym;
      gboolean simple_type;
      gboolean _tmp8_ = FALSE;
      gboolean _tmp10_ = FALSE;
      gboolean _tmp11_ = FALSE;
      g_return_if_fail (self != NULL);
      g_return_if_fail (alias != NULL);
      base_type = NULL;
      type_sym = NULL;
      simple_type = FALSE;
      if (VALA_IS_UNRESOLVED_TYPE (alias->base_type)) {
            ValaDataType* _tmp0_;
            ValaUnresolvedSymbol* _tmp1_ = NULL;
            ValaSymbol* _tmp2_ = NULL;
            _tmp0_ = _vala_code_node_ref0 (alias->base_type);
            _vala_code_node_unref0 (base_type);
            base_type = _tmp0_;
            _tmp1_ = vala_unresolved_type_get_unresolved_symbol (VALA_UNRESOLVED_TYPE (base_type));
            _tmp2_ = vala_gir_parser_resolve_symbol (self, alias->parent, _tmp1_);
            _vala_code_node_unref0 (type_sym);
            type_sym = _tmp2_;
      } else {
            gboolean _tmp3_ = FALSE;
            if (VALA_IS_POINTER_TYPE (alias->base_type)) {
                  ValaDataType* _tmp4_ = NULL;
                  _tmp4_ = vala_pointer_type_get_base_type (VALA_POINTER_TYPE (alias->base_type));
                  _tmp3_ = VALA_IS_VOID_TYPE (_tmp4_);
            } else {
                  _tmp3_ = FALSE;
            }
            if (_tmp3_) {
                  simple_type = TRUE;
            } else {
                  ValaDataType* _tmp5_;
                  ValaTypeSymbol* _tmp6_ = NULL;
                  ValaSymbol* _tmp7_;
                  _tmp5_ = _vala_code_node_ref0 (alias->base_type);
                  _vala_code_node_unref0 (base_type);
                  base_type = _tmp5_;
                  _tmp6_ = vala_data_type_get_data_type (base_type);
                  _tmp7_ = _vala_code_node_ref0 ((ValaSymbol*) _tmp6_);
                  _vala_code_node_unref0 (type_sym);
                  type_sym = _tmp7_;
            }
      }
      if (VALA_IS_STRUCT (type_sym)) {
            gboolean _tmp9_;
            _tmp9_ = vala_struct_is_simple_type (VALA_STRUCT (type_sym));
            _tmp8_ = _tmp9_;
      } else {
            _tmp8_ = FALSE;
      }
      if (_tmp8_) {
            simple_type = TRUE;
      }
      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;
            gpointer _tmp13_ = NULL;
            gchar* cname;
            ValaSymbol* _tmp14_;
            _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);
            _tmp13_ = vala_map_get (alias->girdata, "c:type");
            cname = (gchar*) _tmp13_;
            if (cname != NULL) {
                  vala_struct_set_cname (st, cname);
            }
            if (simple_type) {
                  vala_struct_set_simple_type (st, TRUE);
            }
            _tmp14_ = _vala_code_node_ref0 ((ValaSymbol*) st);
            _vala_code_node_unref0 (alias->symbol);
            alias->symbol = _tmp14_;
            _g_free0 (cname);
            _vala_code_node_unref0 (st);
      } else {
            if (VALA_IS_CLASS (type_sym)) {
                  ValaClass* _tmp15_ = NULL;
                  ValaClass* cl;
                  gpointer _tmp16_ = NULL;
                  gchar* cname;
                  ValaSymbol* _tmp17_;
                  _tmp15_ = vala_class_new (alias->name, alias->source_reference, NULL);
                  cl = _tmp15_;
                  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);
                  _tmp16_ = vala_map_get (alias->girdata, "c:type");
                  cname = (gchar*) _tmp16_;
                  if (cname != NULL) {
                        vala_class_set_cname (cl, cname);
                  }
                  _tmp17_ = _vala_code_node_ref0 ((ValaSymbol*) cl);
                  _vala_code_node_unref0 (alias->symbol);
                  alias->symbol = _tmp17_;
                  _g_free0 (cname);
                  _vala_code_node_unref0 (cl);
            }
      }
      _vala_code_node_unref0 (type_sym);
      _vala_code_node_unref0 (base_type);
}


static void vala_gir_parser_process_callable (ValaGirParser* self, ValaGirParserNode* node) {
      ValaSymbol* _tmp0_;
      ValaSymbol* s;
      ValaList* _tmp1_;
      ValaList* parameters;
      ValaDataType* return_type;
      gboolean _tmp8_ = FALSE;
      gint _tmp35_;
      gint i;
      gint j;
      gint last;
      gboolean _tmp77_ = FALSE;
      g_return_if_fail (self != NULL);
      g_return_if_fail (node != NULL);
      _tmp0_ = _vala_code_node_ref0 (node->symbol);
      s = _tmp0_;
      _tmp1_ = _vala_iterable_ref0 (node->parameters);
      parameters = _tmp1_;
      return_type = NULL;
      if (VALA_IS_METHOD (s)) {
            ValaDataType* _tmp2_ = NULL;
            ValaDataType* _tmp3_;
            _tmp2_ = vala_method_get_return_type (VALA_METHOD (s));
            _tmp3_ = _vala_code_node_ref0 (_tmp2_);
            _vala_code_node_unref0 (return_type);
            return_type = _tmp3_;
      } else {
            if (VALA_IS_DELEGATE (s)) {
                  ValaDataType* _tmp4_ = NULL;
                  ValaDataType* _tmp5_;
                  _tmp4_ = vala_delegate_get_return_type (VALA_DELEGATE (s));
                  _tmp5_ = _vala_code_node_ref0 (_tmp4_);
                  _vala_code_node_unref0 (return_type);
                  return_type = _tmp5_;
            } else {
                  if (VALA_IS_SIGNAL (s)) {
                        ValaDataType* _tmp6_ = NULL;
                        ValaDataType* _tmp7_;
                        _tmp6_ = vala_signal_get_return_type (VALA_SIGNAL (s));
                        _tmp7_ = _vala_code_node_ref0 (_tmp6_);
                        _vala_code_node_unref0 (return_type);
                        return_type = _tmp7_;
                  }
            }
      }
      if (VALA_IS_ARRAY_TYPE (return_type)) {
            _tmp8_ = node->return_array_length_idx >= 0;
      } else {
            _tmp8_ = FALSE;
      }
      if (_tmp8_) {
            gint _tmp9_;
            _tmp9_ = vala_collection_get_size ((ValaCollection*) parameters);
            if (node->return_array_length_idx >= _tmp9_) {
                  ValaSourceReference* _tmp10_ = NULL;
                  ValaSourceReference* _tmp11_;
                  _tmp10_ = vala_gir_parser_get_current_src (self);
                  _tmp11_ = _tmp10_;
                  vala_report_error (_tmp11_, "invalid array length index");
                  _vala_source_reference_unref0 (_tmp11_);
            } else {
                  gpointer _tmp12_ = NULL;
                  ValaGirParserParameterInfo* _tmp13_;
                  _tmp12_ = vala_list_get (parameters, node->return_array_length_idx);
                  _tmp13_ = (ValaGirParserParameterInfo*) _tmp12_;
                  _tmp13_->keep = FALSE;
                  _vala_gir_parser_parameter_info_unref0 (_tmp13_);
                  vala_collection_add ((ValaCollection*) node->array_length_parameters, GINT_TO_POINTER (node->return_array_length_idx));
            }
      } else {
            gboolean _tmp14_ = FALSE;
            if (VALA_IS_VOID_TYPE (return_type)) {
                  gint _tmp15_;
                  _tmp15_ = vala_collection_get_size ((ValaCollection*) parameters);
                  _tmp14_ = _tmp15_ > 0;
            } else {
                  _tmp14_ = FALSE;
            }
            if (_tmp14_) {
                  gint n_out_parameters;
                  n_out_parameters = 0;
                  {
                        ValaList* _tmp16_;
                        ValaList* _info_list;
                        gint _tmp17_;
                        gint _info_size;
                        gint _info_index;
                        _tmp16_ = _vala_iterable_ref0 (parameters);
                        _info_list = _tmp16_;
                        _tmp17_ = vala_collection_get_size ((ValaCollection*) _info_list);
                        _info_size = _tmp17_;
                        _info_index = -1;
                        while (TRUE) {
                              gpointer _tmp18_ = NULL;
                              ValaGirParserParameterInfo* info;
                              ValaParameterDirection _tmp19_;
                              _info_index = _info_index + 1;
                              if (!(_info_index < _info_size)) {
                                    break;
                              }
                              _tmp18_ = vala_list_get (_info_list, _info_index);
                              info = (ValaGirParserParameterInfo*) _tmp18_;
                              _tmp19_ = vala_parameter_get_direction (info->param);
                              if (_tmp19_ == VALA_PARAMETER_DIRECTION_OUT) {
                                    n_out_parameters++;
                              }
                              _vala_gir_parser_parameter_info_unref0 (info);
                        }
                        _vala_iterable_unref0 (_info_list);
                  }
                  if (n_out_parameters == 1) {
                        gint _tmp20_;
                        gpointer _tmp21_ = NULL;
                        ValaGirParserParameterInfo* last_param;
                        ValaParameterDirection _tmp22_;
                        _tmp20_ = vala_collection_get_size ((ValaCollection*) parameters);
                        _tmp21_ = vala_list_get (parameters, _tmp20_ - 1);
                        last_param = (ValaGirParserParameterInfo*) _tmp21_;
                        _tmp22_ = vala_parameter_get_direction (last_param->param);
                        if (_tmp22_ == VALA_PARAMETER_DIRECTION_OUT) {
                              ValaDataType* _tmp23_ = NULL;
                              _tmp23_ = vala_variable_get_variable_type ((ValaVariable*) last_param->param);
                              if (VALA_IS_UNRESOLVED_TYPE (_tmp23_)) {
                                    ValaDataType* _tmp24_ = NULL;
                                    ValaUnresolvedSymbol* _tmp25_ = NULL;
                                    ValaSymbol* _tmp26_ = NULL;
                                    ValaSymbol* _tmp27_;
                                    ValaStruct* st;
                                    gboolean _tmp28_ = FALSE;
                                    gboolean _tmp29_ = FALSE;
                                    _tmp24_ = vala_variable_get_variable_type ((ValaVariable*) last_param->param);
                                    _tmp25_ = vala_unresolved_type_get_unresolved_symbol (VALA_UNRESOLVED_TYPE (_tmp24_));
                                    _tmp26_ = vala_gir_parser_resolve_symbol (self, node->parent, _tmp25_);
                                    _tmp27_ = _tmp26_;
                                    st = VALA_IS_STRUCT (_tmp27_) ? ((ValaStruct*) _tmp27_) : NULL;
                                    if (st != NULL) {
                                          gboolean _tmp30_;
                                          _tmp30_ = vala_struct_is_simple_type (st);
                                          _tmp29_ = !_tmp30_;
                                    } else {
                                          _tmp29_ = FALSE;
                                    }
                                    if (_tmp29_) {
                                          ValaDataType* _tmp31_ = NULL;
                                          gboolean _tmp32_;
                                          _tmp31_ = vala_variable_get_variable_type ((ValaVariable*) last_param->param);
                                          _tmp32_ = vala_data_type_get_nullable (_tmp31_);
                                          _tmp28_ = !_tmp32_;
                                    } else {
                                          _tmp28_ = FALSE;
                                    }
                                    if (_tmp28_) {
                                          ValaDataType* _tmp33_ = NULL;
                                          ValaDataType* _tmp34_ = NULL;
                                          last_param->keep = FALSE;
                                          _tmp33_ = vala_variable_get_variable_type ((ValaVariable*) last_param->param);
                                          _tmp34_ = vala_data_type_copy (_tmp33_);
                                          _vala_code_node_unref0 (return_type);
                                          return_type = _tmp34_;
                                    }
                                    _vala_code_node_unref0 (st);
                              }
                        }
                        _vala_gir_parser_parameter_info_unref0 (last_param);
                  }
            }
      }
      _tmp35_ = vala_collection_get_size ((ValaCollection*) parameters);
      if (_tmp35_ > 1) {
            gint _tmp36_;
            gpointer _tmp37_ = NULL;
            ValaGirParserParameterInfo* last_param;
            gboolean _tmp38_;
            _tmp36_ = vala_collection_get_size ((ValaCollection*) parameters);
            _tmp37_ = vala_list_get (parameters, _tmp36_ - 1);
            last_param = (ValaGirParserParameterInfo*) _tmp37_;
            _tmp38_ = vala_parameter_get_ellipsis (last_param->param);
            if (_tmp38_) {
                  gint _tmp39_;
                  gpointer _tmp40_ = NULL;
                  ValaGirParserParameterInfo* first_vararg_param;
                  const gchar* _tmp41_ = NULL;
                  gboolean _tmp42_;
                  _tmp39_ = vala_collection_get_size ((ValaCollection*) parameters);
                  _tmp40_ = vala_list_get (parameters, _tmp39_ - 2);
                  first_vararg_param = (ValaGirParserParameterInfo*) _tmp40_;
                  _tmp41_ = vala_symbol_get_name ((ValaSymbol*) first_vararg_param->param);
                  _tmp42_ = g_str_has_prefix (_tmp41_, "first_");
                  if (_tmp42_) {
                        first_vararg_param->keep = FALSE;
                  }
                  _vala_gir_parser_parameter_info_unref0 (first_vararg_param);
            }
            _vala_gir_parser_parameter_info_unref0 (last_param);
      }
      i = 0;
      j = 1;
      last = -1;
      {
            ValaList* _tmp43_;
            ValaList* _info_list;
            gint _tmp44_;
            gint _info_size;
            gint _info_index;
            _tmp43_ = _vala_iterable_ref0 (parameters);
            _info_list = _tmp43_;
            _tmp44_ = vala_collection_get_size ((ValaCollection*) _info_list);
            _info_size = _tmp44_;
            _info_index = -1;
            while (TRUE) {
                  gpointer _tmp45_ = NULL;
                  ValaGirParserParameterInfo* info;
                  gboolean _tmp46_ = FALSE;
                  _info_index = _info_index + 1;
                  if (!(_info_index < _info_size)) {
                        break;
                  }
                  _tmp45_ = vala_list_get (_info_list, _info_index);
                  info = (ValaGirParserParameterInfo*) _tmp45_;
                  if (VALA_IS_DELEGATE (s)) {
                        _tmp46_ = info->closure_idx == i;
                  } else {
                        _tmp46_ = FALSE;
                  }
                  if (_tmp46_) {
                        ValaDelegate* _tmp47_;
                        ValaDelegate* d;
                        _tmp47_ = _vala_code_node_ref0 (VALA_DELEGATE (s));
                        d = _tmp47_;
                        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 _tmp48_ = FALSE;
                        gboolean _tmp49_ = FALSE;
                        gboolean _tmp50_ = FALSE;
                        if (info->keep) {
                              gboolean _tmp51_;
                              _tmp51_ = vala_collection_contains ((ValaCollection*) node->array_length_parameters, GINT_TO_POINTER (i));
                              _tmp50_ = !_tmp51_;
                        } else {
                              _tmp50_ = FALSE;
                        }
                        if (_tmp50_) {
                              gboolean _tmp52_;
                              _tmp52_ = vala_collection_contains ((ValaCollection*) node->closure_parameters, GINT_TO_POINTER (i));
                              _tmp49_ = !_tmp52_;
                        } else {
                              _tmp49_ = FALSE;
                        }
                        if (_tmp49_) {
                              gboolean _tmp53_;
                              _tmp53_ = vala_collection_contains ((ValaCollection*) node->destroy_parameters, GINT_TO_POINTER (i));
                              _tmp48_ = !_tmp53_;
                        } else {
                              _tmp48_ = FALSE;
                        }
                        if (_tmp48_) {
                              gfloat last_idx;
                              info->vala_idx = (gfloat) j;
                              info->keep = TRUE;
                              last_idx = 0.0F;
                              if (last != (-1)) {
                                    gpointer _tmp54_ = NULL;
                                    ValaGirParserParameterInfo* _tmp55_;
                                    _tmp54_ = vala_list_get (parameters, last);
                                    _tmp55_ = (ValaGirParserParameterInfo*) _tmp54_;
                                    last_idx = _tmp55_->vala_idx;
                                    _vala_gir_parser_parameter_info_unref0 (_tmp55_);
                              }
                              {
                                    gint k;
                                    k = last + 1;
                                    {
                                          gboolean _tmp56_;
                                          _tmp56_ = TRUE;
                                          while (TRUE) {
                                                gpointer _tmp57_ = NULL;
                                                ValaGirParserParameterInfo* _tmp58_;
                                                if (!_tmp56_) {
                                                      k++;
                                                }
                                                _tmp56_ = FALSE;
                                                if (!(k < i)) {
                                                      break;
                                                }
                                                _tmp57_ = vala_list_get (parameters, k);
                                                _tmp58_ = (ValaGirParserParameterInfo*) _tmp57_;
                                                _tmp58_->vala_idx = last_idx + (((j - last_idx) / (i - last)) * (k - last));
                                                _vala_gir_parser_parameter_info_unref0 (_tmp58_);
                                          }
                                    }
                              }
                              last = i;
                              j++;
                        } else {
                              info->keep = FALSE;
                              info->vala_idx = (j - 1) + ((i - last) * 0.1F);
                        }
                  }
                  i++;
                  _vala_gir_parser_parameter_info_unref0 (info);
            }
            _vala_iterable_unref0 (_info_list);
      }
      {
            ValaList* _tmp59_;
            ValaList* _info_list;
            gint _tmp60_;
            gint _info_size;
            gint _info_index;
            _tmp59_ = _vala_iterable_ref0 (parameters);
            _info_list = _tmp59_;
            _tmp60_ = vala_collection_get_size ((ValaCollection*) _info_list);
            _info_size = _tmp60_;
            _info_index = -1;
            while (TRUE) {
                  gpointer _tmp61_ = NULL;
                  ValaGirParserParameterInfo* info;
                  _info_index = _info_index + 1;
                  if (!(_info_index < _info_size)) {
                        break;
                  }
                  _tmp61_ = vala_list_get (_info_list, _info_index);
                  info = (ValaGirParserParameterInfo*) _tmp61_;
                  if (info->keep) {
                        if (VALA_IS_METHOD (s)) {
                              vala_method_add_parameter (VALA_METHOD (s), info->param);
                        } else {
                              if (VALA_IS_DELEGATE (s)) {
                                    vala_delegate_add_parameter (VALA_DELEGATE (s), info->param);
                              } else {
                                    if (VALA_IS_SIGNAL (s)) {
                                          vala_signal_add_parameter (VALA_SIGNAL (s), info->param);
                                    }
                              }
                        }
                        if (info->array_length_idx != (-1)) {
                              gint _tmp62_;
                              gpointer _tmp65_ = NULL;
                              ValaGirParserParameterInfo* _tmp66_;
                              _tmp62_ = vala_collection_get_size ((ValaCollection*) parameters);
                              if (info->array_length_idx >= _tmp62_) {
                                    ValaSourceReference* _tmp63_ = NULL;
                                    ValaSourceReference* _tmp64_;
                                    _tmp63_ = vala_gir_parser_get_current_src (self);
                                    _tmp64_ = _tmp63_;
                                    vala_report_error (_tmp64_, "invalid array_length index");
                                    _vala_source_reference_unref0 (_tmp64_);
                                    _vala_gir_parser_parameter_info_unref0 (info);
                                    continue;
                              }
                              _tmp65_ = vala_list_get (parameters, info->array_length_idx);
                              _tmp66_ = (ValaGirParserParameterInfo*) _tmp65_;
                              vala_gir_parser_set_array_ccode (self, (ValaSymbol*) info->param, _tmp66_);
                              _vala_gir_parser_parameter_info_unref0 (_tmp66_);
                        }
                        if (info->closure_idx != (-1)) {
                              gint _tmp67_;
                              gpointer _tmp70_ = NULL;
                              ValaGirParserParameterInfo* _tmp71_;
                              _tmp67_ = vala_collection_get_size ((ValaCollection*) parameters);
                              if (info->closure_idx >= _tmp67_) {
                                    ValaSourceReference* _tmp68_ = NULL;
                                    ValaSourceReference* _tmp69_;
                                    _tmp68_ = vala_gir_parser_get_current_src (self);
                                    _tmp69_ = _tmp68_;
                                    vala_report_error (_tmp69_, "invalid closure index");
                                    _vala_source_reference_unref0 (_tmp69_);
                                    _vala_gir_parser_parameter_info_unref0 (info);
                                    continue;
                              }
                              _tmp70_ = vala_list_get (parameters, info->closure_idx);
                              _tmp71_ = (ValaGirParserParameterInfo*) _tmp70_;
                              vala_parameter_set_cdelegate_target_parameter_position (info->param, (gdouble) _tmp71_->vala_idx);
                              _vala_gir_parser_parameter_info_unref0 (_tmp71_);
                        }
                        if (info->destroy_idx != (-1)) {
                              gint _tmp72_;
                              gpointer _tmp75_ = NULL;
                              ValaGirParserParameterInfo* _tmp76_;
                              _tmp72_ = vala_collection_get_size ((ValaCollection*) parameters);
                              if (info->destroy_idx >= _tmp72_) {
                                    ValaSourceReference* _tmp73_ = NULL;
                                    ValaSourceReference* _tmp74_;
                                    _tmp73_ = vala_gir_parser_get_current_src (self);
                                    _tmp74_ = _tmp73_;
                                    vala_report_error (_tmp74_, "invalid destroy index");
                                    _vala_source_reference_unref0 (_tmp74_);
                                    _vala_gir_parser_parameter_info_unref0 (info);
                                    continue;
                              }
                              _tmp75_ = vala_list_get (parameters, info->destroy_idx);
                              _tmp76_ = (ValaGirParserParameterInfo*) _tmp75_;
                              vala_parameter_set_cdestroy_notify_parameter_position (info->param, (gdouble) _tmp76_->vala_idx);
                              _vala_gir_parser_parameter_info_unref0 (_tmp76_);
                        }
                  }
                  _vala_gir_parser_parameter_info_unref0 (info);
            }
            _vala_iterable_unref0 (_info_list);
      }
      if (VALA_IS_ARRAY_TYPE (return_type)) {
            _tmp77_ = node->return_array_length_idx >= 0;
      } else {
            _tmp77_ = FALSE;
      }
      if (_tmp77_) {
            gpointer _tmp78_ = NULL;
            ValaGirParserParameterInfo* _tmp79_;
            _tmp78_ = vala_list_get (parameters, node->return_array_length_idx);
            _tmp79_ = (ValaGirParserParameterInfo*) _tmp78_;
            vala_gir_parser_set_array_ccode (self, s, _tmp79_);
            _vala_gir_parser_parameter_info_unref0 (_tmp79_);
      }
      if (VALA_IS_METHOD (s)) {
            vala_method_set_return_type (VALA_METHOD (s), return_type);
      } else {
            if (VALA_IS_DELEGATE (s)) {
                  vala_delegate_set_return_type (VALA_DELEGATE (s), return_type);
            } else {
                  if (VALA_IS_SIGNAL (s)) {
                        vala_signal_set_return_type (VALA_SIGNAL (s), return_type);
                  }
            }
      }
      _vala_code_node_unref0 (return_type);
      _vala_iterable_unref0 (parameters);
      _vala_code_node_unref0 (s);
}


static void vala_gir_parser_find_parent (ValaGirParser* self, const gchar* cname, ValaGirParserNode* current, ValaGirParserNode** best, gint* match) {
      ValaGirParserNode* _tmp0_;
      ValaGirParserNode* old_best;
      gchar* _tmp10_ = NULL;
      gchar* _tmp11_;
      gint _tmp12_;
      gint _tmp13_;
      gint current_match;
      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_gir_parser_node_ref0 (*best);
      old_best = _tmp0_;
      if (VALA_IS_NAMESPACE (current->symbol)) {
            {
                  ValaArrayList* _tmp1_;
                  ValaArrayList* _child_list;
                  gint _tmp2_;
                  gint _child_size;
                  gint _child_index;
                  _tmp1_ = _vala_iterable_ref0 (current->members);
                  _child_list = _tmp1_;
                  _tmp2_ = vala_collection_get_size ((ValaCollection*) _child_list);
                  _child_size = _tmp2_;
                  _child_index = -1;
                  while (TRUE) {
                        gpointer _tmp3_ = NULL;
                        ValaGirParserNode* child;
                        gboolean _tmp4_ = FALSE;
                        gboolean _tmp5_ = FALSE;
                        _child_index = _child_index + 1;
                        if (!(_child_index < _child_size)) {
                              break;
                        }
                        _tmp3_ = vala_list_get ((ValaList*) _child_list, _child_index);
                        child = (ValaGirParserNode*) _tmp3_;
                        if (child->symbol == NULL) {
                              _tmp5_ = TRUE;
                        } else {
                              gboolean _tmp6_;
                              _tmp6_ = vala_gir_parser_is_container (child->symbol);
                              _tmp5_ = _tmp6_;
                        }
                        if (_tmp5_) {
                              gchar* _tmp7_ = NULL;
                              gchar* _tmp8_;
                              gboolean _tmp9_;
                              _tmp7_ = vala_gir_parser_node_get_lower_case_cprefix (child);
                              _tmp8_ = _tmp7_;
                              _tmp9_ = g_str_has_prefix (cname, _tmp8_);
                              _tmp4_ = _tmp9_;
                              _g_free0 (_tmp8_);
                        } else {
                              _tmp4_ = FALSE;
                        }
                        if (_tmp4_) {
                              vala_gir_parser_find_parent (self, cname, child, best, match);
                        }
                        _vala_gir_parser_node_unref0 (child);
                  }
                  _vala_iterable_unref0 (_child_list);
            }
      }
      if ((*best) != old_best) {
            _vala_gir_parser_node_unref0 (old_best);
            return;
      }
      _tmp10_ = vala_gir_parser_node_get_lower_case_cprefix (current);
      _tmp11_ = _tmp10_;
      _tmp12_ = strlen (_tmp11_);
      _tmp13_ = _tmp12_;
      _g_free0 (_tmp11_);
      current_match = _tmp13_;
      if (current_match > (*match)) {
            ValaGirParserNode* _tmp14_;
            *match = current_match;
            _tmp14_ = _vala_gir_parser_node_ref0 (current);
            _vala_gir_parser_node_unref0 (*best);
            *best = _tmp14_;
      }
      _vala_gir_parser_node_unref0 (old_best);
}


static void vala_gir_parser_process_namespace_method (ValaGirParser* self, ValaGirParserNode* ns, ValaGirParserNode* node) {
      gchar* _tmp0_ = NULL;
      gchar* ns_cprefix;
      ValaMethod* _tmp1_;
      ValaMethod* method;
      gchar* _tmp2_ = NULL;
      gchar* cname;
      ValaParameter* first_param;
      ValaList* _tmp3_ = NULL;
      ValaList* _tmp4_;
      gint _tmp5_;
      gboolean _tmp6_;
      gboolean _tmp10_ = FALSE;
      gint match;
      ValaGirParserNode* _tmp36_;
      ValaGirParserNode* parent;
      const gchar* _tmp37_ = NULL;
      gchar* _tmp38_ = NULL;
      gchar* _tmp39_;
      gint _tmp40_;
      gint _tmp41_;
      gchar* _tmp42_ = NULL;
      gchar* _tmp43_;
      gchar* new_name;
      ValaGirParserNode* _tmp44_ = NULL;
      ValaGirParserNode* _tmp45_;
      gboolean _tmp46_;
      g_return_if_fail (self != NULL);
      g_return_if_fail (ns != NULL);
      g_return_if_fail (node != NULL);
      _tmp0_ = vala_gir_parser_node_get_lower_case_cprefix (ns);
      ns_cprefix = _tmp0_;
      _tmp1_ = _vala_code_node_ref0 (VALA_METHOD (node->symbol));
      method = _tmp1_;
      _tmp2_ = vala_gir_parser_node_get_cname (node);
      cname = _tmp2_;
      first_param = NULL;
      _tmp3_ = vala_method_get_parameters (method);
      _tmp4_ = _tmp3_;
      _tmp5_ = vala_collection_get_size ((ValaCollection*) _tmp4_);
      _tmp6_ = _tmp5_ > 0;
      _vala_iterable_unref0 (_tmp4_);
      if (_tmp6_) {
            ValaList* _tmp7_ = NULL;
            ValaList* _tmp8_;
            gpointer _tmp9_ = NULL;
            _tmp7_ = vala_method_get_parameters (method);
            _tmp8_ = _tmp7_;
            _tmp9_ = vala_list_get (_tmp8_, 0);
            _vala_code_node_unref0 (first_param);
            first_param = (ValaParameter*) _tmp9_;
            _vala_iterable_unref0 (_tmp8_);
      }
      if (first_param != NULL) {
            ValaDataType* _tmp11_ = NULL;
            _tmp11_ = vala_variable_get_variable_type ((ValaVariable*) first_param);
            _tmp10_ = VALA_IS_UNRESOLVED_TYPE (_tmp11_);
      } else {
            _tmp10_ = FALSE;
      }
      if (_tmp10_) {
            ValaDataType* _tmp12_ = NULL;
            ValaUnresolvedSymbol* _tmp13_ = NULL;
            ValaUnresolvedSymbol* _tmp14_;
            ValaUnresolvedSymbol* sym;
            ValaGirParserNode* _tmp15_ = NULL;
            ValaGirParserNode* parent;
            gboolean _tmp16_ = FALSE;
            gboolean _tmp17_ = FALSE;
            gboolean _tmp18_ = FALSE;
            _tmp12_ = vala_variable_get_variable_type ((ValaVariable*) first_param);
            _tmp13_ = vala_unresolved_type_get_unresolved_symbol (VALA_UNRESOLVED_TYPE (_tmp12_));
            _tmp14_ = _vala_code_node_ref0 (_tmp13_);
            sym = _tmp14_;
            _tmp15_ = vala_gir_parser_resolve_node (self, ns, sym, FALSE);
            parent = _tmp15_;
            if (parent != NULL) {
                  _tmp18_ = parent->parent == ns;
            } else {
                  _tmp18_ = FALSE;
            }
            if (_tmp18_) {
                  gboolean _tmp19_;
                  _tmp19_ = vala_gir_parser_is_container (parent->symbol);
                  _tmp17_ = _tmp19_;
            } else {
                  _tmp17_ = FALSE;
            }
            if (_tmp17_) {
                  gchar* _tmp20_ = NULL;
                  gchar* _tmp21_;
                  gboolean _tmp22_;
                  _tmp20_ = vala_gir_parser_node_get_lower_case_cprefix (parent);
                  _tmp21_ = _tmp20_;
                  _tmp22_ = g_str_has_prefix (cname, _tmp21_);
                  _tmp16_ = _tmp22_;
                  _g_free0 (_tmp21_);
            } else {
                  _tmp16_ = FALSE;
            }
            if (_tmp16_) {
                  const gchar* _tmp23_ = NULL;
                  gchar* _tmp24_ = NULL;
                  gchar* _tmp25_;
                  gint _tmp26_;
                  gint _tmp27_;
                  gchar* _tmp28_ = NULL;
                  gchar* _tmp29_;
                  gchar* new_name;
                  ValaGirParserNode* _tmp30_ = NULL;
                  ValaGirParserNode* _tmp31_;
                  gboolean _tmp32_;
                  _tmp23_ = vala_symbol_get_name ((ValaSymbol*) method);
                  _tmp24_ = vala_gir_parser_node_get_lower_case_cprefix (parent);
                  _tmp25_ = _tmp24_;
                  _tmp26_ = strlen (_tmp25_);
                  _tmp27_ = strlen (ns_cprefix);
                  _tmp28_ = string_substring (_tmp23_, (glong) (_tmp26_ - _tmp27_), (glong) (-1));
                  _tmp29_ = _tmp28_;
                  _g_free0 (_tmp25_);
                  new_name = _tmp29_;
                  _tmp30_ = vala_gir_parser_node_lookup (parent, new_name, FALSE, NULL);
                  _tmp31_ = _tmp30_;
                  _tmp32_ = _tmp31_ == NULL;
                  _vala_gir_parser_node_unref0 (_tmp31_);
                  if (_tmp32_) {
                        gchar* _tmp33_;
                        ValaList* _tmp34_ = NULL;
                        ValaList* _tmp35_;
                        vala_gir_parser_node_remove_member (ns, node);
                        _tmp33_ = g_strdup (new_name);
                        _g_free0 (node->name);
                        node->name = _tmp33_;
                        vala_symbol_set_name ((ValaSymbol*) method, new_name);
                        _tmp34_ = vala_method_get_parameters (method);
                        _tmp35_ = _tmp34_;
                        vala_list_remove_at (_tmp35_, 0);
                        _vala_iterable_unref0 (_tmp35_);
                        vala_method_set_binding (method, VALA_MEMBER_BINDING_INSTANCE);
                        vala_gir_parser_node_add_member (parent, node);
                  }
                  _g_free0 (new_name);
                  _vala_gir_parser_node_unref0 (parent);
                  _vala_code_node_unref0 (sym);
                  _vala_code_node_unref0 (first_param);
                  _g_free0 (cname);
                  _vala_code_node_unref0 (method);
                  _g_free0 (ns_cprefix);
                  return;
            }
            _vala_gir_parser_node_unref0 (parent);
            _vala_code_node_unref0 (sym);
      }
      match = 0;
      _tmp36_ = _vala_gir_parser_node_ref0 (ns);
      parent = _tmp36_;
      vala_gir_parser_find_parent (self, cname, ns, &parent, &match);
      _tmp37_ = vala_symbol_get_name ((ValaSymbol*) method);
      _tmp38_ = vala_gir_parser_node_get_lower_case_cprefix (parent);
      _tmp39_ = _tmp38_;
      _tmp40_ = strlen (_tmp39_);
      _tmp41_ = strlen (ns_cprefix);
      _tmp42_ = string_substring (_tmp37_, (glong) (_tmp40_ - _tmp41_), (glong) (-1));
      _tmp43_ = _tmp42_;
      _g_free0 (_tmp39_);
      new_name = _tmp43_;
      _tmp44_ = vala_gir_parser_node_lookup (parent, new_name, FALSE, NULL);
      _tmp45_ = _tmp44_;
      _tmp46_ = _tmp45_ == NULL;
      _vala_gir_parser_node_unref0 (_tmp45_);
      if (_tmp46_) {
            gchar* _tmp47_;
            vala_gir_parser_node_remove_member (ns, node);
            _tmp47_ = g_strdup (new_name);
            _g_free0 (node->name);
            node->name = _tmp47_;
            vala_symbol_set_name ((ValaSymbol*) method, new_name);
            vala_gir_parser_node_add_member (parent, node);
      }
      _g_free0 (new_name);
      _vala_gir_parser_node_unref0 (parent);
      _vala_code_node_unref0 (first_param);
      _g_free0 (cname);
      _vala_code_node_unref0 (method);
      _g_free0 (ns_cprefix);
}


static void vala_gir_parser_process_virtual_method_field (ValaGirParser* self, ValaGirParserNode* node, ValaDelegate* d, ValaUnresolvedSymbol* gtype_struct_for) {
      ValaGirParserNode* _tmp0_ = NULL;
      ValaGirParserNode* gtype_node;
      gboolean _tmp1_ = FALSE;
      const gchar* _tmp9_ = NULL;
      ValaArrayList* _tmp10_ = NULL;
      ValaArrayList* nodes;
      g_return_if_fail (self != NULL);
      g_return_if_fail (node != NULL);
      g_return_if_fail (d != NULL);
      g_return_if_fail (gtype_struct_for != NULL);
      _tmp0_ = vala_gir_parser_resolve_node (self, node->parent, gtype_struct_for, FALSE);
      gtype_node = _tmp0_;
      if (gtype_node == NULL) {
            _tmp1_ = TRUE;
      } else {
            _tmp1_ = !VALA_IS_OBJECT_TYPE_SYMBOL (gtype_node->symbol);
      }
      if (_tmp1_) {
            ValaSourceReference* _tmp2_ = NULL;
            gchar* _tmp3_ = NULL;
            gchar* _tmp4_;
            gchar* _tmp5_ = NULL;
            gchar* _tmp6_;
            gchar* _tmp7_ = NULL;
            gchar* _tmp8_;
            _tmp2_ = vala_code_node_get_source_reference ((ValaCodeNode*) gtype_struct_for);
            _tmp3_ = vala_code_node_to_string ((ValaCodeNode*) gtype_struct_for);
            _tmp4_ = _tmp3_;
            _tmp5_ = vala_gir_parser_node_to_string (node);
            _tmp6_ = _tmp5_;
            _tmp7_ = g_strdup_printf ("Unknown symbol `%s' for virtual method field `%s'", _tmp4_, _tmp6_);
            _tmp8_ = _tmp7_;
            vala_report_error (_tmp2_, _tmp8_);
            _g_free0 (_tmp8_);
            _g_free0 (_tmp6_);
            _g_free0 (_tmp4_);
      }
      _tmp9_ = vala_symbol_get_name ((ValaSymbol*) d);
      _tmp10_ = vala_gir_parser_node_lookup_all (gtype_node, _tmp9_);
      nodes = _tmp10_;
      if (nodes == NULL) {
            _vala_iterable_unref0 (nodes);
            _vala_gir_parser_node_unref0 (gtype_node);
            return;
      }
      {
            ValaArrayList* _tmp11_;
            ValaArrayList* _n_list;
            gint _tmp12_;
            gint _n_size;
            gint _n_index;
            _tmp11_ = _vala_iterable_ref0 (nodes);
            _n_list = _tmp11_;
            _tmp12_ = vala_collection_get_size ((ValaCollection*) _n_list);
            _n_size = _tmp12_;
            _n_index = -1;
            while (TRUE) {
                  gpointer _tmp13_ = NULL;
                  ValaGirParserNode* n;
                  _n_index = _n_index + 1;
                  if (!(_n_index < _n_size)) {
                        break;
                  }
                  _tmp13_ = vala_list_get ((ValaList*) _n_list, _n_index);
                  n = (ValaGirParserNode*) _tmp13_;
                  if (node != n) {
                        vala_gir_parser_node_process (n, self);
                  }
                  _vala_gir_parser_node_unref0 (n);
            }
            _vala_iterable_unref0 (_n_list);
      }
      {
            ValaArrayList* _tmp14_;
            ValaArrayList* _n_list;
            gint _tmp15_;
            gint _n_size;
            gint _n_index;
            _tmp14_ = _vala_iterable_ref0 (nodes);
            _n_list = _tmp14_;
            _tmp15_ = vala_collection_get_size ((ValaCollection*) _n_list);
            _n_size = _tmp15_;
            _n_index = -1;
            while (TRUE) {
                  gpointer _tmp16_ = NULL;
                  ValaGirParserNode* n;
                  ValaSymbol* _tmp17_;
                  ValaSymbol* sym;
                  _n_index = _n_index + 1;
                  if (!(_n_index < _n_size)) {
                        break;
                  }
                  _tmp16_ = vala_list_get ((ValaList*) _n_list, _n_index);
                  n = (ValaGirParserNode*) _tmp16_;
                  if (n->merged) {
                        _vala_gir_parser_node_unref0 (n);
                        continue;
                  }
                  _tmp17_ = _vala_code_node_ref0 (n->symbol);
                  sym = _tmp17_;
                  if (VALA_IS_SIGNAL (sym)) {
                        ValaSignal* _tmp18_;
                        ValaSignal* sig;
                        _tmp18_ = _vala_code_node_ref0 (VALA_SIGNAL (sym));
                        sig = _tmp18_;
                        vala_signal_set_is_virtual (sig, TRUE);
                        vala_gir_parser_assume_parameter_names (self, sig, (ValaSymbol*) d, TRUE);
                        _vala_code_node_unref0 (sig);
                  } else {
                        if (VALA_IS_PROPERTY (sym)) {
                              ValaProperty* _tmp19_;
                              ValaProperty* prop;
                              _tmp19_ = _vala_code_node_ref0 (VALA_PROPERTY (sym));
                              prop = _tmp19_;
                              vala_property_set_is_virtual (prop, TRUE);
                              _vala_code_node_unref0 (prop);
                        }
                  }
                  _vala_code_node_unref0 (sym);
                  _vala_gir_parser_node_unref0 (n);
            }
            _vala_iterable_unref0 (_n_list);
      }
      _vala_iterable_unref0 (nodes);
      _vala_gir_parser_node_unref0 (gtype_node);
}


static void vala_gir_parser_process_async_method (ValaGirParser* self, ValaGirParserNode* node) {
      ValaMethod* _tmp0_;
      ValaMethod* m;
      gchar* finish_method_base = NULL;
      const gchar* _tmp1_ = NULL;
      gboolean _tmp2_;
      gchar* _tmp10_;
      gchar* _tmp11_;
      ValaGirParserNode* _tmp12_ = NULL;
      ValaGirParserNode* _tmp13_;
      ValaGirParserNode* finish_method_node;
      ValaMethod* _tmp22_;
      ValaMethod* method;
      ValaParameter* cancellable;
      gboolean is_cancellable_last;
      gdouble cancellable_pos;
      gboolean _tmp50_ = FALSE;
      g_return_if_fail (self != NULL);
      g_return_if_fail (node != NULL);
      _tmp0_ = _vala_code_node_ref0 (VALA_METHOD (node->symbol));
      m = _tmp0_;
      _tmp1_ = vala_symbol_get_name ((ValaSymbol*) m);
      _tmp2_ = g_str_has_suffix (_tmp1_, "_async");
      if (_tmp2_) {
            const gchar* _tmp3_ = NULL;
            const gchar* _tmp4_ = NULL;
            gint _tmp5_;
            gint _tmp6_;
            gchar* _tmp7_ = NULL;
            _tmp3_ = vala_symbol_get_name ((ValaSymbol*) m);
            _tmp4_ = vala_symbol_get_name ((ValaSymbol*) m);
            _tmp5_ = strlen (_tmp4_);
            _tmp6_ = strlen ("_async");
            _tmp7_ = string_substring (_tmp3_, (glong) 0, (glong) (_tmp5_ - _tmp6_));
            _g_free0 (finish_method_base);
            finish_method_base = _tmp7_;
      } else {
            const gchar* _tmp8_ = NULL;
            gchar* _tmp9_;
            _tmp8_ = vala_symbol_get_name ((ValaSymbol*) m);
            _tmp9_ = g_strdup (_tmp8_);
            _g_free0 (finish_method_base);
            finish_method_base = _tmp9_;
      }
      _tmp10_ = g_strconcat (finish_method_base, "_finish", NULL);
      _tmp11_ = _tmp10_;
      _tmp12_ = vala_gir_parser_node_lookup (node->parent, _tmp11_, FALSE, NULL);
      _tmp13_ = _tmp12_;
      _g_free0 (_tmp11_);
      finish_method_node = _tmp13_;
      if (finish_method_node == NULL) {
            gchar* _tmp14_ = NULL;
            gchar* method_cname;
            _tmp14_ = vala_method_get_finish_cname (m);
            method_cname = _tmp14_;
            {
                  ValaArrayList* _tmp15_;
                  ValaArrayList* _n_list;
                  gint _tmp16_;
                  gint _n_size;
                  gint _n_index;
                  _tmp15_ = _vala_iterable_ref0 (node->parent->members);
                  _n_list = _tmp15_;
                  _tmp16_ = vala_collection_get_size ((ValaCollection*) _n_list);
                  _n_size = _tmp16_;
                  _n_index = -1;
                  while (TRUE) {
                        gpointer _tmp17_ = NULL;
                        ValaGirParserNode* n;
                        gboolean _tmp18_ = FALSE;
                        _n_index = _n_index + 1;
                        if (!(_n_index < _n_size)) {
                              break;
                        }
                        _tmp17_ = vala_list_get ((ValaList*) _n_list, _n_index);
                        n = (ValaGirParserNode*) _tmp17_;
                        if (VALA_IS_METHOD (n->symbol)) {
                              gchar* _tmp19_ = NULL;
                              gchar* _tmp20_;
                              _tmp19_ = vala_gir_parser_node_get_cname (n);
                              _tmp20_ = _tmp19_;
                              _tmp18_ = g_strcmp0 (_tmp20_, method_cname) == 0;
                              _g_free0 (_tmp20_);
                        } else {
                              _tmp18_ = FALSE;
                        }
                        if (_tmp18_) {
                              ValaGirParserNode* _tmp21_;
                              _tmp21_ = _vala_gir_parser_node_ref0 (n);
                              _vala_gir_parser_node_unref0 (finish_method_node);
                              finish_method_node = _tmp21_;
                              _vala_gir_parser_node_unref0 (n);
                              break;
                        }
                        _vala_gir_parser_node_unref0 (n);
                  }
                  _vala_iterable_unref0 (_n_list);
            }
            _g_free0 (method_cname);
      }
      _tmp22_ = _vala_code_node_ref0 (m);
      method = _tmp22_;
      cancellable = NULL;
      is_cancellable_last = FALSE;
      cancellable_pos = (gdouble) (-1);
      {
            ValaList* _tmp23_ = NULL;
            ValaList* _param_list;
            gint _tmp24_;
            gint _param_size;
            gint _param_index;
            _tmp23_ = vala_method_get_parameters (method);
            _param_list = _tmp23_;
            _tmp24_ = vala_collection_get_size ((ValaCollection*) _param_list);
            _param_size = _tmp24_;
            _param_index = -1;
            while (TRUE) {
                  gpointer _tmp25_ = NULL;
                  ValaParameter* param;
                  gboolean _tmp26_ = FALSE;
                  gboolean _tmp27_ = FALSE;
                  const gchar* _tmp28_ = NULL;
                  _param_index = _param_index + 1;
                  if (!(_param_index < _param_size)) {
                        break;
                  }
                  _tmp25_ = vala_list_get (_param_list, _param_index);
                  param = (ValaParameter*) _tmp25_;
                  _tmp28_ = vala_symbol_get_name ((ValaSymbol*) param);
                  if (g_strcmp0 (_tmp28_, "cancellable") == 0) {
                        ValaDataType* _tmp29_ = NULL;
                        gchar* _tmp30_ = NULL;
                        gchar* _tmp31_;
                        _tmp29_ = vala_variable_get_variable_type ((ValaVariable*) param);
                        _tmp30_ = vala_data_type_to_qualified_string (_tmp29_, NULL);
                        _tmp31_ = _tmp30_;
                        _tmp27_ = g_strcmp0 (_tmp31_, "GLib.Cancellable?") == 0;
                        _g_free0 (_tmp31_);
                  } else {
                        _tmp27_ = FALSE;
                  }
                  if (_tmp27_) {
                        ValaParameterDirection _tmp32_;
                        _tmp32_ = vala_parameter_get_direction (param);
                        _tmp26_ = _tmp32_ == VALA_PARAMETER_DIRECTION_IN;
                  } else {
                        _tmp26_ = FALSE;
                  }
                  if (_tmp26_) {
                        ValaParameter* _tmp33_;
                        ValaSourceReference* _tmp34_ = NULL;
                        ValaNullLiteral* _tmp35_ = NULL;
                        ValaNullLiteral* _tmp36_;
                        gdouble _tmp37_;
                        _tmp33_ = _vala_code_node_ref0 (param);
                        _vala_code_node_unref0 (cancellable);
                        cancellable = _tmp33_;
                        _tmp34_ = vala_code_node_get_source_reference ((ValaCodeNode*) param);
                        _tmp35_ = vala_null_literal_new (_tmp34_);
                        _tmp36_ = _tmp35_;
                        vala_variable_set_initializer ((ValaVariable*) cancellable, (ValaExpression*) _tmp36_);
                        _vala_code_node_unref0 (_tmp36_);
                        _tmp37_ = vala_parameter_get_cparameter_position (cancellable);
                        cancellable_pos = _tmp37_;
                  }
                  _vala_code_node_unref0 (param);
            }
            _vala_iterable_unref0 (_param_list);
      }
      if (cancellable != NULL) {
            ValaList* _tmp38_ = NULL;
            ValaList* _tmp39_;
            ValaList* _tmp40_ = NULL;
            ValaList* _tmp41_;
            gint _tmp42_;
            gpointer _tmp43_ = NULL;
            ValaParameter* _tmp44_;
            gboolean _tmp45_;
            ValaList* _tmp46_ = NULL;
            ValaList* _tmp47_;
            ValaScope* _tmp48_ = NULL;
            const gchar* _tmp49_ = NULL;
            _tmp38_ = vala_method_get_parameters (method);
            _tmp39_ = _tmp38_;
            _tmp40_ = vala_method_get_parameters (method);
            _tmp41_ = _tmp40_;
            _tmp42_ = vala_collection_get_size ((ValaCollection*) _tmp41_);
            _tmp43_ = vala_list_get (_tmp39_, _tmp42_ - 1);
            _tmp44_ = (ValaParameter*) _tmp43_;
            _tmp45_ = _tmp44_ == cancellable;
            _vala_code_node_unref0 (_tmp44_);
            _vala_iterable_unref0 (_tmp41_);
            _vala_iterable_unref0 (_tmp39_);
            if (_tmp45_) {
                  is_cancellable_last = TRUE;
            }
            _tmp46_ = vala_method_get_parameters (method);
            _tmp47_ = _tmp46_;
            vala_collection_remove ((ValaCollection*) _tmp47_, cancellable);
            _vala_iterable_unref0 (_tmp47_);
            _tmp48_ = vala_symbol_get_scope ((ValaSymbol*) method);
            _tmp49_ = vala_symbol_get_name ((ValaSymbol*) cancellable);
            vala_scope_remove (_tmp48_, _tmp49_);
      }
      if (finish_method_node != NULL) {
            _tmp50_ = VALA_IS_METHOD (finish_method_node->symbol);
      } else {
            _tmp50_ = FALSE;
      }
      if (_tmp50_) {
            ValaMethod* _tmp51_;
            ValaMethod* finish_method;
            vala_gir_parser_node_process (finish_method_node, self);
            _tmp51_ = _vala_code_node_ref0 (VALA_METHOD (finish_method_node->symbol));
            finish_method = _tmp51_;
            if (VALA_IS_CREATION_METHOD (finish_method)) {
                  const gchar* _tmp52_ = NULL;
                  ValaSourceReference* _tmp53_ = NULL;
                  ValaCreationMethod* _tmp54_ = NULL;
                  ValaSymbolAccessibility _tmp55_;
                  ValaMemberBinding _tmp56_;
                  gboolean _tmp57_;
                  GList* _tmp58_ = NULL;
                  gchar* _tmp59_ = NULL;
                  gchar* _tmp60_;
                  ValaSymbol* _tmp69_;
                  _tmp52_ = vala_creation_method_get_class_name (VALA_CREATION_METHOD (finish_method));
                  _tmp53_ = vala_code_node_get_source_reference ((ValaCodeNode*) m);
                  _tmp54_ = vala_creation_method_new (_tmp52_, NULL, _tmp53_, NULL);
                  _vala_code_node_unref0 (method);
                  method = (ValaMethod*) _tmp54_;
                  _tmp55_ = vala_symbol_get_access ((ValaSymbol*) m);
                  vala_symbol_set_access ((ValaSymbol*) method, _tmp55_);
                  _tmp56_ = vala_method_get_binding (m);
                  vala_method_set_binding (method, _tmp56_);
                  vala_symbol_set_external ((ValaSymbol*) method, TRUE);
                  vala_method_set_coroutine (method, TRUE);
                  _tmp57_ = vala_method_get_has_construct_function (finish_method);
                  vala_method_set_has_construct_function (method, _tmp57_);
                  _tmp58_ = g_list_copy (((ValaCodeNode*) m)->attributes);
                  __g_list_free__vala_code_node_unref0_0 (((ValaCodeNode*) method)->attributes);
                  ((ValaCodeNode*) method)->attributes = _tmp58_;
                  _tmp59_ = vala_gir_parser_node_get_cname (node);
                  _tmp60_ = _tmp59_;
                  vala_method_set_cname (method, _tmp60_);
                  _g_free0 (_tmp60_);
                  if (g_strcmp0 (finish_method_base, "new") == 0) {
                        vala_symbol_set_name ((ValaSymbol*) method, NULL);
                  } else {
                        gboolean _tmp61_;
                        _tmp61_ = g_str_has_prefix (finish_method_base, "new_");
                        if (_tmp61_) {
                              const gchar* _tmp62_ = NULL;
                              gint _tmp63_;
                              gchar* _tmp64_ = NULL;
                              gchar* _tmp65_;
                              _tmp62_ = vala_symbol_get_name ((ValaSymbol*) m);
                              _tmp63_ = strlen ("new_");
                              _tmp64_ = string_substring (_tmp62_, (glong) _tmp63_, (glong) (-1));
                              _tmp65_ = _tmp64_;
                              vala_symbol_set_name ((ValaSymbol*) method, _tmp65_);
                              _g_free0 (_tmp65_);
                        }
                  }
                  {
                        ValaList* _tmp66_ = NULL;
                        ValaList* _param_list;
                        gint _tmp67_;
                        gint _param_size;
                        gint _param_index;
                        _tmp66_ = vala_method_get_parameters (m);
                        _param_list = _tmp66_;
                        _tmp67_ = vala_collection_get_size ((ValaCollection*) _param_list);
                        _param_size = _tmp67_;
                        _param_index = -1;
                        while (TRUE) {
                              gpointer _tmp68_ = NULL;
                              ValaParameter* param;
                              _param_index = _param_index + 1;
                              if (!(_param_index < _param_size)) {
                                    break;
                              }
                              _tmp68_ = vala_list_get (_param_list, _param_index);
                              param = (ValaParameter*) _tmp68_;
                              vala_method_add_parameter (method, param);
                              _vala_code_node_unref0 (param);
                        }
                        _vala_iterable_unref0 (_param_list);
                  }
                  _tmp69_ = _vala_code_node_ref0 ((ValaSymbol*) method);
                  _vala_code_node_unref0 (node->symbol);
                  node->symbol = _tmp69_;
            } else {
                  ValaDataType* _tmp70_ = NULL;
                  ValaDataType* _tmp71_ = NULL;
                  ValaDataType* _tmp72_;
                  gboolean _tmp73_;
                  gboolean _tmp74_;
                  _tmp70_ = vala_method_get_return_type (finish_method);
                  _tmp71_ = vala_data_type_copy (_tmp70_);
                  _tmp72_ = _tmp71_;
                  vala_method_set_return_type (method, _tmp72_);
                  _vala_code_node_unref0 (_tmp72_);
                  _tmp73_ = vala_method_get_no_array_length (finish_method);
                  vala_method_set_no_array_length (method, _tmp73_);
                  _tmp74_ = vala_method_get_array_null_terminated (finish_method);
                  vala_method_set_array_null_terminated (method, _tmp74_);
                  {
                        ValaList* _tmp75_ = NULL;
                        ValaList* _param_list;
                        gint _tmp76_;
                        gint _param_size;
                        gint _param_index;
                        _tmp75_ = vala_method_get_parameters (finish_method);
                        _param_list = _tmp75_;
                        _tmp76_ = vala_collection_get_size ((ValaCollection*) _param_list);
                        _param_size = _tmp76_;
                        _param_index = -1;
                        while (TRUE) {
                              gpointer _tmp77_ = NULL;
                              ValaParameter* param;
                              ValaParameterDirection _tmp78_;
                              _param_index = _param_index + 1;
                              if (!(_param_index < _param_size)) {
                                    break;
                              }
                              _tmp77_ = vala_list_get (_param_list, _param_index);
                              param = (ValaParameter*) _tmp77_;
                              _tmp78_ = vala_parameter_get_direction (param);
                              if (_tmp78_ == VALA_PARAMETER_DIRECTION_OUT) {
                                    ValaParameter* _tmp79_ = NULL;
                                    ValaParameter* async_param;
                                    ValaScope* _tmp80_ = NULL;
                                    const gchar* _tmp81_ = NULL;
                                    ValaSymbol* _tmp82_ = NULL;
                                    ValaSymbol* _tmp83_;
                                    gboolean _tmp84_;
                                    _tmp79_ = vala_parameter_copy (param);
                                    async_param = _tmp79_;
                                    _tmp80_ = vala_symbol_get_scope ((ValaSymbol*) method);
                                    _tmp81_ = vala_symbol_get_name ((ValaSymbol*) param);
                                    _tmp82_ = vala_scope_lookup (_tmp80_, _tmp81_);
                                    _tmp83_ = _tmp82_;
                                    _tmp84_ = _tmp83_ != NULL;
                                    _vala_code_node_unref0 (_tmp83_);
                                    if (_tmp84_) {
                                          const gchar* _tmp85_ = NULL;
                                          gchar* _tmp86_;
                                          gchar* _tmp87_;
                                          _tmp85_ = vala_symbol_get_name ((ValaSymbol*) async_param);
                                          _tmp86_ = g_strconcat (_tmp85_, "_out", NULL);
                                          _tmp87_ = _tmp86_;
                                          vala_symbol_set_name ((ValaSymbol*) async_param, _tmp87_);
                                          _g_free0 (_tmp87_);
                                    }
                                    vala_method_add_parameter (method, async_param);
                                    _vala_code_node_unref0 (async_param);
                              }
                              _vala_code_node_unref0 (param);
                        }
                        _vala_iterable_unref0 (_param_list);
                  }
                  {
                        ValaList* _tmp88_ = NULL;
                        ValaList* _error_type_list;
                        gint _tmp89_;
                        gint _error_type_size;
                        gint _error_type_index;
                        _tmp88_ = vala_code_node_get_error_types ((ValaCodeNode*) finish_method);
                        _error_type_list = _tmp88_;
                        _tmp89_ = vala_collection_get_size ((ValaCollection*) _error_type_list);
                        _error_type_size = _tmp89_;
                        _error_type_index = -1;
                        while (TRUE) {
                              gpointer _tmp90_ = NULL;
                              ValaDataType* error_type;
                              ValaDataType* _tmp91_ = NULL;
                              ValaDataType* _tmp92_;
                              _error_type_index = _error_type_index + 1;
                              if (!(_error_type_index < _error_type_size)) {
                                    break;
                              }
                              _tmp90_ = vala_list_get (_error_type_list, _error_type_index);
                              error_type = (ValaDataType*) _tmp90_;
                              _tmp91_ = vala_data_type_copy (error_type);
                              _tmp92_ = _tmp91_;
                              vala_code_node_add_error_type ((ValaCodeNode*) method, _tmp92_);
                              _vala_code_node_unref0 (_tmp92_);
                              _vala_code_node_unref0 (error_type);
                        }
                        _vala_iterable_unref0 (_error_type_list);
                  }
                  finish_method_node->processed = TRUE;
                  finish_method_node->merged = TRUE;
            }
            _vala_code_node_unref0 (finish_method);
      }
      if (cancellable != NULL) {
            vala_method_add_parameter (method, cancellable);
            if (!is_cancellable_last) {
                  vala_parameter_set_cparameter_position (cancellable, cancellable_pos);
            } else {
            }
      }
      _vala_code_node_unref0 (cancellable);
      _vala_code_node_unref0 (method);
      _vala_gir_parser_node_unref0 (finish_method_node);
      _g_free0 (finish_method_base);
      _vala_code_node_unref0 (m);
}


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;
}


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, const gchar* selector) {
      ValaGirParserMetadataSet* self = NULL;
      self = (ValaGirParserMetadataSet*) vala_gir_parser_metadata_construct (object_type, "", selector, NULL);
      return self;
}


static ValaGirParserMetadataSet* vala_gir_parser_metadata_set_new (const gchar* selector) {
      return vala_gir_parser_metadata_set_construct (VALA_GIR_PARSER_TYPE_METADATA_SET, selector);
}


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, const gchar* selector, ValaSourceReference* source_reference) {
      ValaGirParserMetadata* self = NULL;
      GPatternSpec* _tmp0_ = NULL;
      gchar* _tmp1_;
      ValaSourceReference* _tmp2_;
      g_return_val_if_fail (pattern != NULL, NULL);
      self = (ValaGirParserMetadata*) g_type_create_instance (object_type);
      _tmp0_ = g_pattern_spec_new (pattern);
      _g_pattern_spec_free0 (self->pattern_spec);
      self->pattern_spec = _tmp0_;
      _tmp1_ = g_strdup (selector);
      _g_free0 (self->selector);
      self->selector = _tmp1_;
      _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, const gchar* selector, ValaSourceReference* source_reference) {
      return vala_gir_parser_metadata_construct (VALA_GIR_PARSER_TYPE_METADATA, pattern, selector, 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_match_child (ValaGirParserMetadata* self, const gchar* name, const gchar* selector) {
      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;
                  gboolean _tmp6_ = FALSE;
                  gboolean _tmp7_ = 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 (selector == NULL) {
                        _tmp7_ = TRUE;
                  } else {
                        _tmp7_ = metadata->selector == NULL;
                  }
                  if (_tmp7_) {
                        _tmp6_ = TRUE;
                  } else {
                        _tmp6_ = g_strcmp0 (metadata->selector, selector) == 0;
                  }
                  if (_tmp6_) {
                        gboolean _tmp8_;
                        _tmp8_ = g_pattern_match_string (metadata->pattern_spec, name);
                        _tmp5_ = _tmp8_;
                  } else {
                        _tmp5_ = FALSE;
                  }
                  if (_tmp5_) {
                        ValaGirParserMetadata* _tmp9_ = NULL;
                        metadata->used = TRUE;
                        _tmp9_ = vala_gir_parser_metadata_get_empty ();
                        if (_result_ == _tmp9_) {
                              ValaGirParserMetadata* _tmp10_;
                              _tmp10_ = _vala_gir_parser_metadata_ref0 (metadata);
                              _vala_gir_parser_metadata_unref0 (_result_);
                              _result_ = _tmp10_;
                        } else {
                              ValaGirParserMetadata* _tmp11_;
                              ValaGirParserMetadataSet* _tmp12_;
                              ValaGirParserMetadataSet* ms;
                              ValaGirParserMetadata* _tmp14_;
                              _tmp11_ = _result_;
                              _tmp12_ = _vala_gir_parser_metadata_ref0 (VALA_GIR_PARSER_IS_METADATA_SET (_tmp11_) ? ((ValaGirParserMetadataSet*) _tmp11_) : NULL);
                              ms = _tmp12_;
                              if (ms == NULL) {
                                    ValaGirParserMetadataSet* _tmp13_ = NULL;
                                    _tmp13_ = vala_gir_parser_metadata_set_new (selector);
                                    _vala_gir_parser_metadata_unref0 (ms);
                                    ms = _tmp13_;
                                    vala_gir_parser_metadata_set_add_sibling (ms, _result_);
                              }
                              vala_gir_parser_metadata_set_add_sibling (ms, metadata);
                              _tmp14_ = _vala_gir_parser_metadata_ref0 ((ValaGirParserMetadata*) ms);
                              _vala_gir_parser_metadata_unref0 (_result_);
                              _result_ = _tmp14_;
                              _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_;
      ValaUnaryExpression* unary;
      gboolean _tmp2_ = FALSE;
      g_return_val_if_fail (self != NULL, 0);
      _tmp0_ = vala_gir_parser_metadata_get_expression (self, arg);
      _tmp1_ = _tmp0_;
      unary = VALA_IS_UNARY_EXPRESSION (_tmp1_) ? ((ValaUnaryExpression*) _tmp1_) : NULL;
      if (unary != NULL) {
            ValaUnaryOperator _tmp3_;
            _tmp3_ = vala_unary_expression_get_operator (unary);
            _tmp2_ = _tmp3_ == VALA_UNARY_OPERATOR_MINUS;
      } else {
            _tmp2_ = FALSE;
      }
      if (_tmp2_) {
            ValaExpression* _tmp4_ = NULL;
            ValaExpression* _tmp5_;
            ValaIntegerLiteral* _tmp6_;
            ValaIntegerLiteral* lit;
            _tmp4_ = vala_unary_expression_get_inner (unary);
            _tmp5_ = _tmp4_;
            _tmp6_ = _vala_code_node_ref0 (VALA_IS_INTEGER_LITERAL (_tmp5_) ? ((ValaIntegerLiteral*) _tmp5_) : NULL);
            lit = _tmp6_;
            if (lit != NULL) {
                  const gchar* _tmp7_ = NULL;
                  gint _tmp8_;
                  _tmp7_ = vala_integer_literal_get_value (lit);
                  _tmp8_ = atoi (_tmp7_);
                  result = -_tmp8_;
                  _vala_code_node_unref0 (lit);
                  _vala_code_node_unref0 (unary);
                  return result;
            }
            _vala_code_node_unref0 (lit);
      } else {
            ValaExpression* _tmp9_ = NULL;
            ValaExpression* _tmp10_;
            ValaIntegerLiteral* lit;
            _tmp9_ = vala_gir_parser_metadata_get_expression (self, arg);
            _tmp10_ = _tmp9_;
            lit = VALA_IS_INTEGER_LITERAL (_tmp10_) ? ((ValaIntegerLiteral*) _tmp10_) : NULL;
            if (lit != NULL) {
                  const gchar* _tmp11_ = NULL;
                  gint _tmp12_;
                  _tmp11_ = vala_integer_literal_get_value (lit);
                  _tmp12_ = atoi (_tmp11_);
                  result = _tmp12_;
                  _vala_code_node_unref0 (lit);
                  _vala_code_node_unref0 (unary);
                  return result;
            }
            _vala_code_node_unref0 (lit);
      }
      result = 0;
      _vala_code_node_unref0 (unary);
      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 ("", NULL, 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_pattern_spec_free0 (self->pattern_spec);
      _g_free0 (self->selector);
      _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, ValaSourceLocation* end) {
      ValaSourceReference* result = NULL;
      ValaSourceFile* _tmp0_ = NULL;
      ValaSourceReference* _tmp1_ = NULL;
      g_return_val_if_fail (self != NULL, NULL);
      if (end == NULL) {
            end = &self->priv->end;
      }
      _tmp0_ = vala_scanner_get_source_file (self->priv->scanner);
      _tmp1_ = vala_source_reference_new (_tmp0_, (*begin).line, (*begin).column, (*end).line, (*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, ValaSourceLocation* begin, ValaSourceLocation* end) {
      gchar* result = NULL;
      gchar* _tmp0_ = NULL;
      g_return_val_if_fail (self != NULL, NULL);
      if (begin == NULL) {
            begin = &self->priv->begin;
      }
      if (end == NULL) {
            end = &self->priv->end;
      }
      _tmp0_ = string_substring ((const gchar*) (*begin).pos, (glong) 0, (glong) ((gint) ((*end).pos - (*begin).pos)));
      result = _tmp0_;
      return result;
}


static gchar* vala_gir_parser_metadata_parser_parse_identifier (ValaGirParserMetadataParser* self, gboolean is_glob) {
      gchar* result = NULL;
      ValaSourceLocation begin;
      gboolean _tmp0_ = FALSE;
      gchar* _tmp8_ = NULL;
      g_return_val_if_fail (self != NULL, NULL);
      begin = self->priv->begin;
      if (self->priv->current == VALA_TOKEN_TYPE_DOT) {
            _tmp0_ = TRUE;
      } else {
            _tmp0_ = self->priv->current == VALA_TOKEN_TYPE_HASH;
      }
      if (_tmp0_) {
            if (is_glob) {
                  ValaSourceReference* _tmp1_ = NULL;
                  ValaSourceReference* _tmp2_;
                  _tmp1_ = vala_gir_parser_metadata_parser_get_src (self, &begin, NULL);
                  _tmp2_ = _tmp1_;
                  vala_report_error (_tmp2_, "expected glob-style pattern");
                  _vala_source_reference_unref0 (_tmp2_);
            } else {
                  ValaSourceReference* _tmp3_ = NULL;
                  ValaSourceReference* _tmp4_;
                  _tmp3_ = vala_gir_parser_metadata_parser_get_src (self, &begin, NULL);
                  _tmp4_ = _tmp3_;
                  vala_report_error (_tmp4_, "expected identifier");
                  _vala_source_reference_unref0 (_tmp4_);
            }
            result = NULL;
            return result;
      }
      if (is_glob) {
            while (TRUE) {
                  gboolean _tmp5_ = FALSE;
                  gboolean _tmp6_ = FALSE;
                  gboolean _tmp7_;
                  if (self->priv->current != VALA_TOKEN_TYPE_EOF) {
                        _tmp6_ = self->priv->current != VALA_TOKEN_TYPE_DOT;
                  } else {
                        _tmp6_ = FALSE;
                  }
                  if (_tmp6_) {
                        _tmp5_ = self->priv->current != VALA_TOKEN_TYPE_HASH;
                  } else {
                        _tmp5_ = FALSE;
                  }
                  if (!_tmp5_) {
                        break;
                  }
                  vala_gir_parser_metadata_parser_next (self);
                  _tmp7_ = vala_gir_parser_metadata_parser_has_space (self);
                  if (_tmp7_) {
                        break;
                  }
            }
      } else {
            vala_gir_parser_metadata_parser_next (self);
      }
      _tmp8_ = vala_gir_parser_metadata_parser_get_string (self, &begin, &self->priv->old_end);
      result = _tmp8_;
      return result;
}


static gchar* vala_gir_parser_metadata_parser_parse_selector (ValaGirParserMetadataParser* self) {
      gchar* result = NULL;
      gboolean _tmp0_ = FALSE;
      gchar* _tmp2_ = NULL;
      g_return_val_if_fail (self != NULL, NULL);
      if (self->priv->current != VALA_TOKEN_TYPE_HASH) {
            _tmp0_ = TRUE;
      } else {
            gboolean _tmp1_;
            _tmp1_ = vala_gir_parser_metadata_parser_has_space (self);
            _tmp0_ = _tmp1_;
      }
      if (_tmp0_) {
            result = NULL;
            return result;
      }
      vala_gir_parser_metadata_parser_next (self);
      _tmp2_ = vala_gir_parser_metadata_parser_parse_identifier (self, FALSE);
      result = _tmp2_;
      return result;
}


static ValaGirParserMetadata* vala_gir_parser_metadata_parser_parse_pattern (ValaGirParserMetadataParser* self) {
      ValaGirParserMetadata* result = NULL;
      ValaGirParserMetadata* metadata = NULL;
      gboolean is_relative;
      gboolean _tmp0_ = FALSE;
      ValaSourceLocation begin;
      gchar* _tmp9_ = NULL;
      gchar* pattern;
      gchar* _tmp10_ = NULL;
      gchar* _tmp11_;
      ValaSourceReference* _tmp12_ = NULL;
      ValaSourceReference* _tmp13_;
      ValaGirParserMetadata* _tmp14_ = NULL;
      g_return_val_if_fail (self != NULL, NULL);
      is_relative = FALSE;
      if (self->priv->current == VALA_TOKEN_TYPE_IDENTIFIER) {
            _tmp0_ = TRUE;
      } else {
            _tmp0_ = self->priv->current == VALA_TOKEN_TYPE_STAR;
      }
      if (_tmp0_) {
            ValaGirParserMetadata* _tmp1_;
            _tmp1_ = _vala_gir_parser_metadata_ref0 (self->priv->tree);
            _vala_gir_parser_metadata_unref0 (self->priv->parent_metadata);
            self->priv->parent_metadata = _tmp1_;
      } else {
            if (self->priv->current != VALA_TOKEN_TYPE_DOT) {
                  ValaSourceReference* _tmp2_ = NULL;
                  ValaSourceReference* _tmp3_;
                  const gchar* _tmp4_ = NULL;
                  gchar* _tmp5_ = NULL;
                  gchar* _tmp6_;
                  _tmp2_ = vala_gir_parser_metadata_parser_get_current_src (self);
                  _tmp3_ = _tmp2_;
                  _tmp4_ = vala_token_type_to_string (self->priv->current);
                  _tmp5_ = g_strdup_printf ("expected pattern or `.', got %s", _tmp4_);
                  _tmp6_ = _tmp5_;
                  vala_report_error (_tmp3_, _tmp6_);
                  _g_free0 (_tmp6_);
                  _vala_source_reference_unref0 (_tmp3_);
                  result = NULL;
                  _vala_gir_parser_metadata_unref0 (metadata);
                  return result;
            }
            vala_gir_parser_metadata_parser_next (self);
            is_relative = TRUE;
      }
      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;
            _vala_gir_parser_metadata_unref0 (metadata);
            return result;
      }
      begin = self->priv->begin;
      _tmp9_ = vala_gir_parser_metadata_parser_parse_identifier (self, TRUE);
      pattern = _tmp9_;
      if (pattern == NULL) {
            result = NULL;
            _g_free0 (pattern);
            _vala_gir_parser_metadata_unref0 (metadata);
            return result;
      }
      _tmp10_ = vala_gir_parser_metadata_parser_parse_selector (self);
      _tmp11_ = _tmp10_;
      _tmp12_ = vala_gir_parser_metadata_parser_get_src (self, &begin, NULL);
      _tmp13_ = _tmp12_;
      _tmp14_ = vala_gir_parser_metadata_new (pattern, _tmp11_, _tmp13_);
      _vala_gir_parser_metadata_unref0 (metadata);
      metadata = _tmp14_;
      _vala_source_reference_unref0 (_tmp13_);
      _g_free0 (_tmp11_);
      vala_gir_parser_metadata_add_child (self->priv->parent_metadata, metadata);
      while (TRUE) {
            gboolean _tmp15_ = FALSE;
            gchar* _tmp22_ = NULL;
            gchar* _tmp23_ = NULL;
            gchar* _tmp24_;
            ValaSourceReference* _tmp25_ = NULL;
            ValaSourceReference* _tmp26_;
            ValaGirParserMetadata* _tmp27_ = NULL;
            ValaGirParserMetadata* _tmp28_;
            ValaGirParserMetadata* child;
            ValaGirParserMetadata* _tmp29_;
            if (self->priv->current != VALA_TOKEN_TYPE_EOF) {
                  gboolean _tmp16_;
                  _tmp16_ = vala_gir_parser_metadata_parser_has_space (self);
                  _tmp15_ = !_tmp16_;
            } else {
                  _tmp15_ = FALSE;
            }
            if (!_tmp15_) {
                  break;
            }
            if (self->priv->current != VALA_TOKEN_TYPE_DOT) {
                  ValaSourceReference* _tmp17_ = NULL;
                  ValaSourceReference* _tmp18_;
                  const gchar* _tmp19_ = NULL;
                  gchar* _tmp20_ = NULL;
                  gchar* _tmp21_;
                  _tmp17_ = vala_gir_parser_metadata_parser_get_current_src (self);
                  _tmp18_ = _tmp17_;
                  _tmp19_ = vala_token_type_to_string (self->priv->current);
                  _tmp20_ = g_strdup_printf ("expected `.' got %s", _tmp19_);
                  _tmp21_ = _tmp20_;
                  vala_report_error (_tmp18_, _tmp21_);
                  _g_free0 (_tmp21_);
                  _vala_source_reference_unref0 (_tmp18_);
                  break;
            }
            vala_gir_parser_metadata_parser_next (self);
            begin = self->priv->begin;
            _tmp22_ = vala_gir_parser_metadata_parser_parse_identifier (self, TRUE);
            _g_free0 (pattern);
            pattern = _tmp22_;
            if (pattern == NULL) {
                  result = NULL;
                  _g_free0 (pattern);
                  _vala_gir_parser_metadata_unref0 (metadata);
                  return result;
            }
            _tmp23_ = vala_gir_parser_metadata_parser_parse_selector (self);
            _tmp24_ = _tmp23_;
            _tmp25_ = vala_gir_parser_metadata_parser_get_src (self, &begin, &self->priv->old_end);
            _tmp26_ = _tmp25_;
            _tmp27_ = vala_gir_parser_metadata_new (pattern, _tmp24_, _tmp26_);
            _tmp28_ = _tmp27_;
            _vala_source_reference_unref0 (_tmp26_);
            _g_free0 (_tmp24_);
            child = _tmp28_;
            vala_gir_parser_metadata_add_child (metadata, child);
            _tmp29_ = _vala_gir_parser_metadata_ref0 (child);
            _vala_gir_parser_metadata_unref0 (metadata);
            metadata = _tmp29_;
            _vala_gir_parser_metadata_unref0 (child);
      }
      if (!is_relative) {
            ValaGirParserMetadata* _tmp30_;
            _tmp30_ = _vala_gir_parser_metadata_ref0 (metadata);
            _vala_gir_parser_metadata_unref0 (self->priv->parent_metadata);
            self->priv->parent_metadata = _tmp30_;
      }
      result = metadata;
      _g_free0 (pattern);
      return result;
}


static ValaExpression* vala_gir_parser_metadata_parser_parse_expression (ValaGirParserMetadataParser* self) {
      ValaExpression* result = NULL;
      ValaSourceLocation begin;
      ValaSourceReference* _tmp0_ = NULL;
      ValaSourceReference* src;
      ValaExpression* expr;
      g_return_val_if_fail (self != NULL, NULL);
      begin = self->priv->begin;
      _tmp0_ = vala_gir_parser_metadata_parser_get_current_src (self);
      src = _tmp0_;
      expr = NULL;
      switch (self->priv->current) {
            case VALA_TOKEN_TYPE_NULL:
            {
                  ValaNullLiteral* _tmp1_ = NULL;
                  _tmp1_ = vala_null_literal_new (src);
                  _vala_code_node_unref0 (expr);
                  expr = (ValaExpression*) _tmp1_;
                  break;
            }
            case VALA_TOKEN_TYPE_TRUE:
            {
                  ValaBooleanLiteral* _tmp2_ = NULL;
                  _tmp2_ = vala_boolean_literal_new (TRUE, src);
                  _vala_code_node_unref0 (expr);
                  expr = (ValaExpression*) _tmp2_;
                  break;
            }
            case VALA_TOKEN_TYPE_FALSE:
            {
                  ValaBooleanLiteral* _tmp3_ = NULL;
                  _tmp3_ = vala_boolean_literal_new (FALSE, src);
                  _vala_code_node_unref0 (expr);
                  expr = (ValaExpression*) _tmp3_;
                  break;
            }
            case VALA_TOKEN_TYPE_MINUS:
            {
                  ValaExpression* _tmp4_ = NULL;
                  ValaExpression* inner;
                  vala_gir_parser_metadata_parser_next (self);
                  _tmp4_ = vala_gir_parser_metadata_parser_parse_expression (self);
                  inner = _tmp4_;
                  if (inner == NULL) {
                        const gchar* _tmp5_ = NULL;
                        gchar* _tmp6_ = NULL;
                        gchar* _tmp7_;
                        _tmp5_ = vala_token_type_to_string (self->priv->current);
                        _tmp6_ = g_strdup_printf ("expected expression after `-', got %s", _tmp5_);
                        _tmp7_ = _tmp6_;
                        vala_report_error (src, _tmp7_);
                        _g_free0 (_tmp7_);
                  } else {
                        ValaSourceReference* _tmp8_ = NULL;
                        ValaSourceReference* _tmp9_;
                        ValaUnaryExpression* _tmp10_ = NULL;
                        _tmp8_ = vala_gir_parser_metadata_parser_get_src (self, &begin, NULL);
                        _tmp9_ = _tmp8_;
                        _tmp10_ = vala_unary_expression_new (VALA_UNARY_OPERATOR_MINUS, inner, _tmp9_);
                        _vala_code_node_unref0 (expr);
                        expr = (ValaExpression*) _tmp10_;
                        _vala_source_reference_unref0 (_tmp9_);
                  }
                  result = expr;
                  _vala_code_node_unref0 (inner);
                  _vala_source_reference_unref0 (src);
                  return result;
            }
            case VALA_TOKEN_TYPE_INTEGER_LITERAL:
            {
                  gchar* _tmp11_ = NULL;
                  gchar* _tmp12_;
                  ValaIntegerLiteral* _tmp13_ = NULL;
                  _tmp11_ = vala_gir_parser_metadata_parser_get_string (self, NULL, NULL);
                  _tmp12_ = _tmp11_;
                  _tmp13_ = vala_integer_literal_new (_tmp12_, src);
                  _vala_code_node_unref0 (expr);
                  expr = (ValaExpression*) _tmp13_;
                  _g_free0 (_tmp12_);
                  break;
            }
            case VALA_TOKEN_TYPE_REAL_LITERAL:
            {
                  gchar* _tmp14_ = NULL;
                  gchar* _tmp15_;
                  ValaRealLiteral* _tmp16_ = NULL;
                  _tmp14_ = vala_gir_parser_metadata_parser_get_string (self, NULL, NULL);
                  _tmp15_ = _tmp14_;
                  _tmp16_ = vala_real_literal_new (_tmp15_, src);
                  _vala_code_node_unref0 (expr);
                  expr = (ValaExpression*) _tmp16_;
                  _g_free0 (_tmp15_);
                  break;
            }
            case VALA_TOKEN_TYPE_STRING_LITERAL:
            {
                  gchar* _tmp17_ = NULL;
                  gchar* _tmp18_;
                  ValaStringLiteral* _tmp19_ = NULL;
                  _tmp17_ = vala_gir_parser_metadata_parser_get_string (self, NULL, NULL);
                  _tmp18_ = _tmp17_;
                  _tmp19_ = vala_string_literal_new (_tmp18_, src);
                  _vala_code_node_unref0 (expr);
                  expr = (ValaExpression*) _tmp19_;
                  _g_free0 (_tmp18_);
                  break;
            }
            case VALA_TOKEN_TYPE_IDENTIFIER:
            {
                  gchar* _tmp20_ = NULL;
                  gchar* _tmp21_;
                  ValaMemberAccess* _tmp22_ = NULL;
                  _tmp20_ = vala_gir_parser_metadata_parser_get_string (self, NULL, NULL);
                  _tmp21_ = _tmp20_;
                  _tmp22_ = vala_member_access_new (NULL, _tmp21_, src);
                  _vala_code_node_unref0 (expr);
                  expr = (ValaExpression*) _tmp22_;
                  _g_free0 (_tmp21_);
                  while (TRUE) {
                        ValaTokenType _tmp23_;
                        ValaTokenType _tmp24_;
                        gchar* _tmp30_ = NULL;
                        gchar* _tmp31_;
                        ValaSourceReference* _tmp32_ = NULL;
                        ValaSourceReference* _tmp33_;
                        ValaMemberAccess* _tmp34_ = NULL;
                        _tmp23_ = vala_gir_parser_metadata_parser_next (self);
                        if (!(_tmp23_ == VALA_TOKEN_TYPE_DOT)) {
                              break;
                        }
                        _tmp24_ = vala_gir_parser_metadata_parser_next (self);
                        if (_tmp24_ != VALA_TOKEN_TYPE_IDENTIFIER) {
                              ValaSourceReference* _tmp25_ = NULL;
                              ValaSourceReference* _tmp26_;
                              const gchar* _tmp27_ = NULL;
                              gchar* _tmp28_ = NULL;
                              gchar* _tmp29_;
                              _tmp25_ = vala_gir_parser_metadata_parser_get_current_src (self);
                              _tmp26_ = _tmp25_;
                              _tmp27_ = vala_token_type_to_string (self->priv->current);
                              _tmp28_ = g_strdup_printf ("expected identifier got %s", _tmp27_);
                              _tmp29_ = _tmp28_;
                              vala_report_error (_tmp26_, _tmp29_);
                              _g_free0 (_tmp29_);
                              _vala_source_reference_unref0 (_tmp26_);
                              break;
                        }
                        _tmp30_ = vala_gir_parser_metadata_parser_get_string (self, NULL, NULL);
                        _tmp31_ = _tmp30_;
                        _tmp32_ = vala_gir_parser_metadata_parser_get_current_src (self);
                        _tmp33_ = _tmp32_;
                        _tmp34_ = vala_member_access_new (expr, _tmp31_, _tmp33_);
                        _vala_code_node_unref0 (expr);
                        expr = (ValaExpression*) _tmp34_;
                        _vala_source_reference_unref0 (_tmp33_);
                        _g_free0 (_tmp31_);
                  }
                  result = expr;
                  _vala_source_reference_unref0 (src);
                  return result;
            }
            default:
            {
                  const gchar* _tmp35_ = NULL;
                  gchar* _tmp36_ = NULL;
                  gchar* _tmp37_;
                  _tmp35_ = vala_token_type_to_string (self->priv->current);
                  _tmp36_ = g_strdup_printf ("expected literal or symbol got %s", _tmp35_);
                  _tmp37_ = _tmp36_;
                  vala_report_error (src, _tmp37_);
                  _g_free0 (_tmp37_);
                  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;
            ValaSourceLocation begin;
            gchar* _tmp4_ = NULL;
            gchar* id;
            ValaGirParserArgumentType* _tmp5_ = NULL;
            ValaGirParserArgumentType* arg_type;
            ValaExpression* _tmp16_ = NULL;
            ValaExpression* expr;
            ValaSourceReference* _tmp17_ = NULL;
            ValaSourceReference* _tmp18_;
            ValaGirParserArgument* _tmp19_ = NULL;
            ValaGirParserArgument* _tmp20_;
            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;
            }
            begin = self->priv->begin;
            _tmp4_ = vala_gir_parser_metadata_parser_parse_identifier (self, FALSE);
            id = _tmp4_;
            if (id == NULL) {
                  result = FALSE;
                  _g_free0 (id);
                  return result;
            }
            _tmp5_ = vala_gir_parser_argument_type_from_string (id);
            arg_type = _tmp5_;
            if (arg_type == NULL) {
                  ValaSourceReference* _tmp6_ = NULL;
                  ValaSourceReference* _tmp7_;
                  _tmp6_ = vala_gir_parser_metadata_parser_get_src (self, &begin, &self->priv->old_end);
                  _tmp7_ = _tmp6_;
                  vala_report_error (_tmp7_, "unknown argument");
                  _vala_source_reference_unref0 (_tmp7_);
                  result = FALSE;
                  _g_free0 (arg_type);
                  _g_free0 (id);
                  return result;
            }
            if (self->priv->current != VALA_TOKEN_TYPE_ASSIGN) {
                  ValaSourceReference* _tmp8_ = NULL;
                  ValaSourceReference* _tmp9_;
                  ValaBooleanLiteral* _tmp10_ = NULL;
                  ValaBooleanLiteral* _tmp11_;
                  ValaSourceReference* _tmp12_ = NULL;
                  ValaSourceReference* _tmp13_;
                  ValaGirParserArgument* _tmp14_ = NULL;
                  ValaGirParserArgument* _tmp15_;
                  _tmp8_ = vala_gir_parser_metadata_parser_get_src (self, &begin, NULL);
                  _tmp9_ = _tmp8_;
                  _tmp10_ = vala_boolean_literal_new (TRUE, _tmp9_);
                  _tmp11_ = _tmp10_;
                  _tmp12_ = vala_gir_parser_metadata_parser_get_src (self, &begin, NULL);
                  _tmp13_ = _tmp12_;
                  _tmp14_ = vala_gir_parser_argument_new ((ValaExpression*) _tmp11_, _tmp13_);
                  _tmp15_ = _tmp14_;
                  vala_gir_parser_metadata_add_argument (metadata, *arg_type, _tmp15_);
                  _vala_gir_parser_argument_unref0 (_tmp15_);
                  _vala_source_reference_unref0 (_tmp13_);
                  _vala_code_node_unref0 (_tmp11_);
                  _vala_source_reference_unref0 (_tmp9_);
                  _g_free0 (arg_type);
                  _g_free0 (id);
                  continue;
            }
            vala_gir_parser_metadata_parser_next (self);
            _tmp16_ = vala_gir_parser_metadata_parser_parse_expression (self);
            expr = _tmp16_;
            if (expr == NULL) {
                  result = FALSE;
                  _vala_code_node_unref0 (expr);
                  _g_free0 (arg_type);
                  _g_free0 (id);
                  return result;
            }
            _tmp17_ = vala_gir_parser_metadata_parser_get_src (self, &begin, NULL);
            _tmp18_ = _tmp17_;
            _tmp19_ = vala_gir_parser_argument_new (expr, _tmp18_);
            _tmp20_ = _tmp19_;
            vala_gir_parser_metadata_add_argument (metadata, *arg_type, _tmp20_);
            _vala_gir_parser_argument_unref0 (_tmp20_);
            _vala_source_reference_unref0 (_tmp18_);
            _vala_code_node_unref0 (expr);
            _g_free0 (arg_type);
            _g_free0 (id);
      }
      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 ("", NULL, 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 ValaGirParserNode* vala_gir_parser_node_construct (GType object_type, const gchar* name) {
      ValaGirParserNode* self = NULL;
      gchar* _tmp0_;
      self = (ValaGirParserNode*) g_type_create_instance (object_type);
      _tmp0_ = g_strdup (name);
      _g_free0 (self->name);
      self->name = _tmp0_;
      return self;
}


static ValaGirParserNode* vala_gir_parser_node_new (const gchar* name) {
      return vala_gir_parser_node_construct (VALA_GIR_PARSER_TYPE_NODE, name);
}


static void vala_gir_parser_node_add_member (ValaGirParserNode* self, ValaGirParserNode* node) {
      gpointer _tmp0_ = NULL;
      ValaArrayList* nodes;
      g_return_if_fail (self != NULL);
      g_return_if_fail (node != NULL);
      _tmp0_ = vala_map_get ((ValaMap*) self->scope, node->name);
      nodes = (ValaArrayList*) _tmp0_;
      if (nodes == NULL) {
            ValaArrayList* _tmp1_ = NULL;
            _tmp1_ = vala_array_list_new (VALA_GIR_PARSER_TYPE_NODE, (GBoxedCopyFunc) vala_gir_parser_node_ref, vala_gir_parser_node_unref, g_direct_equal);
            _vala_iterable_unref0 (nodes);
            nodes = _tmp1_;
            vala_map_set ((ValaMap*) self->scope, node->name, nodes);
      }
      vala_collection_add ((ValaCollection*) nodes, node);
      vala_collection_add ((ValaCollection*) self->members, node);
      node->parent = self;
      _vala_iterable_unref0 (nodes);
}


static void vala_gir_parser_node_remove_member (ValaGirParserNode* self, ValaGirParserNode* node) {
      gpointer _tmp0_ = NULL;
      ValaArrayList* nodes;
      gint _tmp1_;
      g_return_if_fail (self != NULL);
      g_return_if_fail (node != NULL);
      _tmp0_ = vala_map_get ((ValaMap*) self->scope, node->name);
      nodes = (ValaArrayList*) _tmp0_;
      vala_collection_remove ((ValaCollection*) nodes, node);
      _tmp1_ = vala_collection_get_size ((ValaCollection*) nodes);
      if (_tmp1_ == 0) {
            vala_map_remove ((ValaMap*) self->scope, node->name);
      }
      vala_collection_remove ((ValaCollection*) self->members, node);
      node->parent = NULL;
      _vala_iterable_unref0 (nodes);
}


static ValaGirParserNode* vala_gir_parser_node_lookup (ValaGirParserNode* self, const gchar* name, gboolean create_namespace, ValaSourceReference* source_reference) {
      ValaGirParserNode* result = NULL;
      gpointer _tmp0_ = NULL;
      ValaArrayList* nodes;
      ValaGirParserNode* node;
      g_return_val_if_fail (self != NULL, NULL);
      g_return_val_if_fail (name != NULL, NULL);
      _tmp0_ = vala_map_get ((ValaMap*) self->scope, name);
      nodes = (ValaArrayList*) _tmp0_;
      node = NULL;
      if (nodes != NULL) {
            gpointer _tmp1_ = NULL;
            _tmp1_ = vala_list_get ((ValaList*) nodes, 0);
            _vala_gir_parser_node_unref0 (node);
            node = (ValaGirParserNode*) _tmp1_;
      }
      if (node == NULL) {
            ValaSymbol* sym;
            gboolean _tmp4_ = FALSE;
            sym = NULL;
            if (self->symbol != NULL) {
                  ValaScope* _tmp2_ = NULL;
                  ValaSymbol* _tmp3_ = NULL;
                  _tmp2_ = vala_symbol_get_scope (self->symbol);
                  _tmp3_ = vala_scope_lookup (_tmp2_, name);
                  _vala_code_node_unref0 (sym);
                  sym = _tmp3_;
            }
            if (sym != NULL) {
                  _tmp4_ = TRUE;
            } else {
                  _tmp4_ = create_namespace;
            }
            if (_tmp4_) {
                  ValaGirParserNode* _tmp5_ = NULL;
                  ValaSymbol* _tmp6_;
                  ValaSourceReference* _tmp7_;
                  _tmp5_ = vala_gir_parser_node_new (name);
                  _vala_gir_parser_node_unref0 (node);
                  node = _tmp5_;
                  _tmp6_ = _vala_code_node_ref0 (sym);
                  _vala_code_node_unref0 (node->symbol);
                  node->symbol = _tmp6_;
                  node->new_symbol = node->symbol == NULL;
                  _tmp7_ = _vala_source_reference_ref0 (source_reference);
                  _vala_source_reference_unref0 (node->source_reference);
                  node->source_reference = _tmp7_;
                  vala_gir_parser_node_add_member (self, node);
                  if (sym == NULL) {
                        vala_collection_add ((ValaCollection*) vala_gir_parser_node_new_namespaces, node);
                  }
            }
            _vala_code_node_unref0 (sym);
      }
      result = node;
      _vala_iterable_unref0 (nodes);
      return result;
}


static ValaArrayList* vala_gir_parser_node_lookup_all (ValaGirParserNode* self, const gchar* name) {
      ValaArrayList* result = NULL;
      gpointer _tmp0_ = NULL;
      g_return_val_if_fail (self != NULL, NULL);
      g_return_val_if_fail (name != NULL, NULL);
      _tmp0_ = vala_map_get ((ValaMap*) self->scope, name);
      result = (ValaArrayList*) _tmp0_;
      return result;
}


static ValaUnresolvedSymbol* vala_gir_parser_node_get_unresolved_symbol (ValaGirParserNode* self) {
      ValaUnresolvedSymbol* result = NULL;
      g_return_val_if_fail (self != NULL, NULL);
      if (self->parent->name == NULL) {
            ValaUnresolvedSymbol* _tmp0_ = NULL;
            _tmp0_ = vala_unresolved_symbol_new (NULL, self->name, NULL);
            result = _tmp0_;
            return result;
      } else {
            ValaUnresolvedSymbol* _tmp1_ = NULL;
            ValaUnresolvedSymbol* _tmp2_;
            ValaUnresolvedSymbol* _tmp3_ = NULL;
            ValaUnresolvedSymbol* _tmp4_;
            _tmp1_ = vala_gir_parser_node_get_unresolved_symbol (self->parent);
            _tmp2_ = _tmp1_;
            _tmp3_ = vala_unresolved_symbol_new (_tmp2_, self->name, NULL);
            _tmp4_ = _tmp3_;
            _vala_code_node_unref0 (_tmp2_);
            result = _tmp4_;
            return result;
      }
}


static gchar* vala_gir_parser_node_get_lower_case_cprefix (ValaGirParserNode* self) {
      gchar* result = NULL;
      g_return_val_if_fail (self != NULL, NULL);
      if (self->name == NULL) {
            gchar* _tmp0_;
            _tmp0_ = g_strdup ("");
            result = _tmp0_;
            return result;
      }
      if (self->new_symbol) {
            gboolean _tmp1_;
            gchar* _tmp3_ = NULL;
            gchar* _tmp4_;
            gchar* _tmp5_ = NULL;
            gchar* _tmp6_;
            gchar* _tmp7_ = NULL;
            gchar* _tmp8_;
            _tmp1_ = vala_gir_parser_metadata_has_argument (self->metadata, VALA_GIR_PARSER_ARGUMENT_TYPE_CPREFIX);
            if (_tmp1_) {
                  gchar* _tmp2_ = NULL;
                  _tmp2_ = vala_gir_parser_metadata_get_string (self->metadata, VALA_GIR_PARSER_ARGUMENT_TYPE_CPREFIX);
                  result = _tmp2_;
                  return result;
            }
            _tmp3_ = vala_gir_parser_node_get_lower_case_cprefix (self->parent);
            _tmp4_ = _tmp3_;
            _tmp5_ = vala_symbol_camel_case_to_lower_case (self->name);
            _tmp6_ = _tmp5_;
            _tmp7_ = g_strdup_printf ("%s%s_", _tmp4_, _tmp6_);
            _tmp8_ = _tmp7_;
            _g_free0 (_tmp6_);
            _g_free0 (_tmp4_);
            result = _tmp8_;
            return result;
      } else {
            gchar* _tmp9_ = NULL;
            _tmp9_ = vala_symbol_get_lower_case_cprefix (self->symbol);
            result = _tmp9_;
            return result;
      }
}


static gchar* vala_gir_parser_node_get_cprefix (ValaGirParserNode* self) {
      gchar* result = NULL;
      g_return_val_if_fail (self != NULL, NULL);
      if (self->name == NULL) {
            gchar* _tmp0_;
            _tmp0_ = g_strdup ("");
            result = _tmp0_;
            return result;
      }
      if (self->new_symbol) {
            gpointer _tmp1_ = NULL;
            gchar* cprefix;
            _tmp1_ = vala_map_get (self->girdata, "c:identifier-prefixes");
            cprefix = (gchar*) _tmp1_;
            if (cprefix != NULL) {
                  result = cprefix;
                  return result;
            } else {
                  gchar* _tmp2_ = NULL;
                  _tmp2_ = vala_gir_parser_node_get_cname (self);
                  result = _tmp2_;
                  _g_free0 (cprefix);
                  return result;
            }
            _g_free0 (cprefix);
      } else {
            gchar* _tmp3_ = NULL;
            _tmp3_ = vala_symbol_get_cprefix (self->symbol);
            result = _tmp3_;
            return result;
      }
}


static gchar* vala_gir_parser_node_get_cname (ValaGirParserNode* self) {
      gchar* result = NULL;
      g_return_val_if_fail (self != NULL, NULL);
      if (self->name == NULL) {
            gchar* _tmp0_;
            _tmp0_ = g_strdup ("");
            result = _tmp0_;
            return result;
      }
      if (self->new_symbol) {
            gpointer _tmp1_ = NULL;
            gchar* cname;
            _tmp1_ = vala_map_get (self->girdata, "c:identifier");
            cname = (gchar*) _tmp1_;
            if (cname == NULL) {
                  gpointer _tmp2_ = NULL;
                  _tmp2_ = vala_map_get (self->girdata, "c:type");
                  _g_free0 (cname);
                  cname = (gchar*) _tmp2_;
            }
            if (cname == NULL) {
                  if (VALA_IS_FIELD (self->symbol)) {
                        ValaMemberBinding _tmp3_;
                        _tmp3_ = vala_field_get_binding (VALA_FIELD (self->symbol));
                        if (_tmp3_ == VALA_MEMBER_BINDING_STATIC) {
                              gchar* _tmp4_ = NULL;
                              gchar* _tmp5_;
                              gchar* _tmp6_;
                              _tmp4_ = vala_gir_parser_node_get_lower_case_cprefix (self->parent);
                              _tmp5_ = _tmp4_;
                              _tmp6_ = g_strconcat (_tmp5_, self->name, NULL);
                              _g_free0 (cname);
                              cname = _tmp6_;
                              _g_free0 (_tmp5_);
                        } else {
                              gchar* _tmp7_;
                              _tmp7_ = g_strdup (self->name);
                              _g_free0 (cname);
                              cname = _tmp7_;
                        }
                  } else {
                        gchar* _tmp8_ = NULL;
                        gchar* _tmp9_;
                        gchar* _tmp10_ = NULL;
                        _tmp8_ = vala_gir_parser_node_get_cprefix (self->parent);
                        _tmp9_ = _tmp8_;
                        _tmp10_ = g_strdup_printf ("%s%s", _tmp9_, self->name);
                        _g_free0 (cname);
                        cname = _tmp10_;
                        _g_free0 (_tmp9_);
                  }
            }
            result = cname;
            return result;
      } else {
            if (VALA_IS_TYPESYMBOL (self->symbol)) {
                  gchar* _tmp11_ = NULL;
                  _tmp11_ = vala_typesymbol_get_cname (VALA_TYPESYMBOL (self->symbol), FALSE);
                  result = _tmp11_;
                  return result;
            } else {
                  if (VALA_IS_CONSTANT (self->symbol)) {
                        gchar* _tmp12_ = NULL;
                        _tmp12_ = vala_constant_get_cname (VALA_CONSTANT (self->symbol));
                        result = _tmp12_;
                        return result;
                  } else {
                        if (VALA_IS_METHOD (self->symbol)) {
                              gchar* _tmp13_ = NULL;
                              _tmp13_ = vala_method_get_cname (VALA_METHOD (self->symbol));
                              result = _tmp13_;
                              return result;
                        } else {
                              if (VALA_IS_PROPERTY_ACCESSOR (self->symbol)) {
                                    gchar* _tmp14_ = NULL;
                                    _tmp14_ = vala_property_accessor_get_cname (VALA_PROPERTY_ACCESSOR (self->symbol));
                                    result = _tmp14_;
                                    return result;
                              } else {
                                    if (VALA_IS_FIELD (self->symbol)) {
                                          gchar* _tmp15_ = NULL;
                                          _tmp15_ = vala_field_get_cname (VALA_FIELD (self->symbol));
                                          result = _tmp15_;
                                          return result;
                                    } else {
                                          g_assert_not_reached ();
                                    }
                              }
                        }
                  }
            }
      }
}


static void vala_gir_parser_node_process (ValaGirParserNode* self, ValaGirParser* parser) {
      gboolean _tmp0_ = FALSE;
      gboolean _tmp187_ = FALSE;
      gboolean _tmp188_ = FALSE;
      g_return_if_fail (self != NULL);
      g_return_if_fail (parser != NULL);
      if (self->processed) {
            return;
      }
      if (VALA_IS_NAMESPACE (self->symbol)) {
            _tmp0_ = self->parent == parser->priv->root;
      } else {
            _tmp0_ = FALSE;
      }
      if (_tmp0_) {
            {
                  gint i;
                  i = 0;
                  {
                        gboolean _tmp1_;
                        _tmp1_ = TRUE;
                        while (TRUE) {
                              gint _tmp2_;
                              gpointer _tmp3_ = NULL;
                              ValaGirParserNode* node;
                              gboolean _tmp4_ = FALSE;
                              if (!_tmp1_) {
                                    i++;
                              }
                              _tmp1_ = FALSE;
                              _tmp2_ = vala_collection_get_size ((ValaCollection*) self->members);
                              if (!(i < _tmp2_)) {
                                    break;
                              }
                              _tmp3_ = vala_list_get ((ValaList*) self->members, i);
                              node = (ValaGirParserNode*) _tmp3_;
                              if (VALA_IS_METHOD (node->symbol)) {
                                    _tmp4_ = node->new_symbol;
                              } else {
                                    _tmp4_ = FALSE;
                              }
                              if (_tmp4_) {
                                    gboolean _tmp5_ = FALSE;
                                    gint _tmp6_;
                                    vala_gir_parser_process_namespace_method (parser, self, node);
                                    _tmp6_ = vala_collection_get_size ((ValaCollection*) self->members);
                                    if (i < _tmp6_) {
                                          gpointer _tmp7_ = NULL;
                                          ValaGirParserNode* _tmp8_;
                                          _tmp7_ = vala_list_get ((ValaList*) self->members, i);
                                          _tmp8_ = (ValaGirParserNode*) _tmp7_;
                                          _tmp5_ = _tmp8_ != node;
                                          _vala_gir_parser_node_unref0 (_tmp8_);
                                    } else {
                                          _tmp5_ = FALSE;
                                    }
                                    if (_tmp5_) {
                                          i--;
                                    }
                              }
                              _vala_gir_parser_node_unref0 (node);
                        }
                  }
            }
      }
      {
            ValaArrayList* _tmp9_;
            ValaArrayList* _node_list;
            gint _tmp10_;
            gint _node_size;
            gint _node_index;
            _tmp9_ = _vala_iterable_ref0 (self->members);
            _node_list = _tmp9_;
            _tmp10_ = vala_collection_get_size ((ValaCollection*) _node_list);
            _node_size = _tmp10_;
            _node_index = -1;
            while (TRUE) {
                  gpointer _tmp11_ = NULL;
                  ValaGirParserNode* node;
                  _node_index = _node_index + 1;
                  if (!(_node_index < _node_size)) {
                        break;
                  }
                  _tmp11_ = vala_list_get ((ValaList*) _node_list, _node_index);
                  node = (ValaGirParserNode*) _tmp11_;
                  vala_gir_parser_node_process (node, parser);
                  _vala_gir_parser_node_unref0 (node);
            }
            _vala_iterable_unref0 (_node_list);
      }
      if (self->girdata != NULL) {
            gchar* _tmp171_ = NULL;
            gchar* _tmp172_;
            gchar* _tmp173_ = NULL;
            gchar* _tmp174_;
            const gchar* _tmp175_ = NULL;
            gboolean _tmp178_ = FALSE;
            gboolean _tmp179_ = FALSE;
            gboolean _tmp180_;
            gchar* _tmp183_ = NULL;
            gchar* cheader_filename;
            if (VALA_IS_METHOD (self->symbol)) {
                  ValaMethod* _tmp12_;
                  ValaMethod* m;
                  ValaArrayList* _tmp13_ = NULL;
                  ValaArrayList* colliding;
                  gboolean _tmp42_;
                  _tmp12_ = _vala_code_node_ref0 (VALA_METHOD (self->symbol));
                  m = _tmp12_;
                  vala_gir_parser_process_callable (parser, self);
                  _tmp13_ = vala_gir_parser_node_lookup_all (self->parent, self->name);
                  colliding = _tmp13_;
                  {
                        ValaArrayList* _tmp14_;
                        ValaArrayList* _node_list;
                        gint _tmp15_;
                        gint _node_size;
                        gint _node_index;
                        _tmp14_ = _vala_iterable_ref0 (colliding);
                        _node_list = _tmp14_;
                        _tmp15_ = vala_collection_get_size ((ValaCollection*) _node_list);
                        _node_size = _tmp15_;
                        _node_index = -1;
                        while (TRUE) {
                              gpointer _tmp16_ = NULL;
                              ValaGirParserNode* node;
                              ValaSymbol* _tmp17_;
                              ValaSymbol* sym;
                              gboolean _tmp18_ = FALSE;
                              gboolean _tmp19_ = FALSE;
                              _node_index = _node_index + 1;
                              if (!(_node_index < _node_size)) {
                                    break;
                              }
                              _tmp16_ = vala_list_get ((ValaList*) _node_list, _node_index);
                              node = (ValaGirParserNode*) _tmp16_;
                              _tmp17_ = _vala_code_node_ref0 (node->symbol);
                              sym = _tmp17_;
                              if (VALA_IS_FIELD (sym)) {
                                    ValaDataType* _tmp20_ = NULL;
                                    _tmp20_ = vala_method_get_return_type (m);
                                    _tmp19_ = !VALA_IS_VOID_TYPE (_tmp20_);
                              } else {
                                    _tmp19_ = FALSE;
                              }
                              if (_tmp19_) {
                                    ValaList* _tmp21_ = NULL;
                                    ValaList* _tmp22_;
                                    gint _tmp23_;
                                    _tmp21_ = vala_method_get_parameters (m);
                                    _tmp22_ = _tmp21_;
                                    _tmp23_ = vala_collection_get_size ((ValaCollection*) _tmp22_);
                                    _tmp18_ = _tmp23_ == 0;
                                    _vala_iterable_unref0 (_tmp22_);
                              } else {
                                    _tmp18_ = FALSE;
                              }
                              if (_tmp18_) {
                                    self->merged = TRUE;
                              } else {
                                    if (VALA_IS_SIGNAL (sym)) {
                                          ValaSignal* _tmp24_;
                                          ValaSignal* sig;
                                          gboolean _tmp25_;
                                          _tmp24_ = _vala_code_node_ref0 (VALA_SIGNAL (sym));
                                          sig = _tmp24_;
                                          _tmp25_ = vala_method_get_is_virtual (m);
                                          if (_tmp25_) {
                                                vala_signal_set_is_virtual (sig, TRUE);
                                          } else {
                                                vala_signal_set_has_emitter (sig, TRUE);
                                          }
                                          vala_gir_parser_assume_parameter_names (parser, sig, (ValaSymbol*) m, FALSE);
                                          self->merged = TRUE;
                                          _vala_code_node_unref0 (sig);
                                    } else {
                                          gboolean _tmp26_ = FALSE;
                                          gboolean _tmp27_ = FALSE;
                                          if (VALA_IS_METHOD (sym)) {
                                                _tmp27_ = !VALA_IS_CREATION_METHOD (sym);
                                          } else {
                                                _tmp27_ = FALSE;
                                          }
                                          if (_tmp27_) {
                                                _tmp26_ = node != self;
                                          } else {
                                                _tmp26_ = FALSE;
                                          }
                                          if (_tmp26_) {
                                                gboolean _tmp28_ = FALSE;
                                                gboolean _tmp29_;
                                                _tmp29_ = vala_method_get_is_virtual (m);
                                                if (_tmp29_) {
                                                      _tmp28_ = TRUE;
                                                } else {
                                                      gboolean _tmp30_;
                                                      _tmp30_ = vala_method_get_is_abstract (m);
                                                      _tmp28_ = _tmp30_;
                                                }
                                                if (_tmp28_) {
                                                      gboolean different_invoker;
                                                      different_invoker = FALSE;
                                                      {
                                                            GList* attr_collection = NULL;
                                                            GList* attr_it = NULL;
                                                            attr_collection = ((ValaCodeNode*) m)->attributes;
                                                            for (attr_it = attr_collection; attr_it != NULL; attr_it = attr_it->next) {
                                                                  ValaAttribute* _tmp31_;
                                                                  ValaAttribute* attr = NULL;
                                                                  _tmp31_ = _vala_code_node_ref0 ((ValaAttribute*) attr_it->data);
                                                                  attr = _tmp31_;
                                                                  {
                                                                        const gchar* _tmp32_ = NULL;
                                                                        _tmp32_ = vala_attribute_get_name (attr);
                                                                        if (g_strcmp0 (_tmp32_, "NoWrapper") == 0) {
                                                                              ValaGirParserNode* _tmp33_ = NULL;
                                                                              ValaGirParserNode* invoker;
                                                                              _tmp33_ = vala_gir_parser_find_invoker (parser, self);
                                                                              invoker = _tmp33_;
                                                                              if (invoker != NULL) {
                                                                                    const gchar* _tmp34_ = NULL;
                                                                                    const gchar* _tmp35_ = NULL;
                                                                                    _tmp34_ = vala_symbol_get_name ((ValaSymbol*) m);
                                                                                    vala_method_set_vfunc_name (m, _tmp34_);
                                                                                    _tmp35_ = vala_symbol_get_name (invoker->symbol);
                                                                                    vala_symbol_set_name ((ValaSymbol*) m, _tmp35_);
                                                                                    ((ValaCodeNode*) m)->attributes = g_list_remove (((ValaCodeNode*) m)->attributes, attr);
                                                                                    invoker->merged = TRUE;
                                                                                    different_invoker = TRUE;
                                                                              }
                                                                              _vala_gir_parser_node_unref0 (invoker);
                                                                        }
                                                                        _vala_code_node_unref0 (attr);
                                                                  }
                                                            }
                                                      }
                                                      if (!different_invoker) {
                                                            node->merged = TRUE;
                                                      }
                                                }
                                          }
                                    }
                              }
                              _vala_code_node_unref0 (sym);
                              _vala_gir_parser_node_unref0 (node);
                        }
                        _vala_iterable_unref0 (_node_list);
                  }
                  if (!VALA_IS_CREATION_METHOD (m)) {
                        gboolean _tmp36_;
                        _tmp36_ = vala_gir_parser_metadata_has_argument (self->metadata, VALA_GIR_PARSER_ARGUMENT_TYPE_VFUNC_NAME);
                        if (_tmp36_) {
                              gchar* _tmp37_ = NULL;
                              gchar* _tmp38_;
                              ValaGirParserNode* _tmp39_ = NULL;
                              ValaGirParserNode* _tmp40_;
                              ValaGirParserNode* vfunc;
                              gboolean _tmp41_ = FALSE;
                              _tmp37_ = vala_gir_parser_metadata_get_string (self->metadata, VALA_GIR_PARSER_ARGUMENT_TYPE_VFUNC_NAME);
                              _tmp38_ = _tmp37_;
                              _tmp39_ = vala_gir_parser_node_lookup (self->parent, _tmp38_, FALSE, NULL);
                              _tmp40_ = _tmp39_;
                              _g_free0 (_tmp38_);
                              vfunc = _tmp40_;
                              if (vfunc != NULL) {
                                    _tmp41_ = vfunc != self;
                              } else {
                                    _tmp41_ = FALSE;
                              }
                              if (_tmp41_) {
                                    vfunc->processed = TRUE;
                                    vfunc->merged = TRUE;
                              }
                              _vala_gir_parser_node_unref0 (vfunc);
                        }
                  }
                  _tmp42_ = vala_method_get_coroutine (m);
                  if (_tmp42_) {
                        vala_gir_parser_process_async_method (parser, self);
                  }
                  _vala_iterable_unref0 (colliding);
                  _vala_code_node_unref0 (m);
            } else {
                  if (VALA_IS_PROPERTY (self->symbol)) {
                        ValaArrayList* _tmp43_ = NULL;
                        ValaArrayList* colliding;
                        gchar* _tmp47_ = NULL;
                        gchar* _tmp48_;
                        ValaGirParserNode* _tmp49_ = NULL;
                        ValaGirParserNode* _tmp50_;
                        ValaGirParserNode* getter;
                        gboolean _tmp51_ = FALSE;
                        gchar* _tmp60_ = NULL;
                        gchar* _tmp61_;
                        ValaGirParserNode* _tmp62_ = NULL;
                        ValaGirParserNode* _tmp63_;
                        ValaGirParserNode* setter;
                        gboolean _tmp64_ = FALSE;
                        ValaProperty* _tmp73_;
                        ValaProperty* prop;
                        gboolean _tmp74_;
                        _tmp43_ = vala_gir_parser_node_lookup_all (self->parent, self->name);
                        colliding = _tmp43_;
                        {
                              ValaArrayList* _tmp44_;
                              ValaArrayList* _node_list;
                              gint _tmp45_;
                              gint _node_size;
                              gint _node_index;
                              _tmp44_ = _vala_iterable_ref0 (colliding);
                              _node_list = _tmp44_;
                              _tmp45_ = vala_collection_get_size ((ValaCollection*) _node_list);
                              _node_size = _tmp45_;
                              _node_index = -1;
                              while (TRUE) {
                                    gpointer _tmp46_ = NULL;
                                    ValaGirParserNode* node;
                                    _node_index = _node_index + 1;
                                    if (!(_node_index < _node_size)) {
                                          break;
                                    }
                                    _tmp46_ = vala_list_get ((ValaList*) _node_list, _node_index);
                                    node = (ValaGirParserNode*) _tmp46_;
                                    if (VALA_IS_SIGNAL (node->symbol)) {
                                          node->processed = TRUE;
                                          node->merged = TRUE;
                                    } else {
                                          if (VALA_IS_METHOD (node->symbol)) {
                                                node->merged = TRUE;
                                          }
                                    }
                                    _vala_gir_parser_node_unref0 (node);
                              }
                              _vala_iterable_unref0 (_node_list);
                        }
                        _tmp47_ = g_strdup_printf ("get_%s", self->name);
                        _tmp48_ = _tmp47_;
                        _tmp49_ = vala_gir_parser_node_lookup (self->parent, _tmp48_, FALSE, NULL);
                        _tmp50_ = _tmp49_;
                        _g_free0 (_tmp48_);
                        getter = _tmp50_;
                        if (getter != NULL) {
                              gchar* _tmp52_ = NULL;
                              gchar* _tmp53_;
                              gchar* _tmp54_ = NULL;
                              gchar* _tmp55_;
                              gchar* _tmp56_;
                              gchar* _tmp57_;
                              gchar* _tmp58_;
                              gchar* _tmp59_;
                              _tmp52_ = vala_gir_parser_node_get_cname (getter);
                              _tmp53_ = _tmp52_;
                              _tmp54_ = vala_gir_parser_node_get_lower_case_cprefix (self->parent);
                              _tmp55_ = _tmp54_;
                              _tmp56_ = g_strconcat (_tmp55_, "get_", NULL);
                              _tmp57_ = _tmp56_;
                              _tmp58_ = g_strconcat (_tmp57_, self->name, NULL);
                              _tmp59_ = _tmp58_;
                              _tmp51_ = g_strcmp0 (_tmp53_, _tmp59_) != 0;
                              _g_free0 (_tmp59_);
                              _g_free0 (_tmp57_);
                              _g_free0 (_tmp55_);
                              _g_free0 (_tmp53_);
                        } else {
                              _tmp51_ = FALSE;
                        }
                        if (_tmp51_) {
                              _vala_gir_parser_node_unref0 (getter);
                              getter = NULL;
                        }
                        _tmp60_ = g_strdup_printf ("set_%s", self->name);
                        _tmp61_ = _tmp60_;
                        _tmp62_ = vala_gir_parser_node_lookup (self->parent, _tmp61_, FALSE, NULL);
                        _tmp63_ = _tmp62_;
                        _g_free0 (_tmp61_);
                        setter = _tmp63_;
                        if (setter != NULL) {
                              gchar* _tmp65_ = NULL;
                              gchar* _tmp66_;
                              gchar* _tmp67_ = NULL;
                              gchar* _tmp68_;
                              gchar* _tmp69_;
                              gchar* _tmp70_;
                              gchar* _tmp71_;
                              gchar* _tmp72_;
                              _tmp65_ = vala_gir_parser_node_get_cname (setter);
                              _tmp66_ = _tmp65_;
                              _tmp67_ = vala_gir_parser_node_get_lower_case_cprefix (self->parent);
                              _tmp68_ = _tmp67_;
                              _tmp69_ = g_strconcat (_tmp68_, "set_", NULL);
                              _tmp70_ = _tmp69_;
                              _tmp71_ = g_strconcat (_tmp70_, self->name, NULL);
                              _tmp72_ = _tmp71_;
                              _tmp64_ = g_strcmp0 (_tmp66_, _tmp72_) != 0;
                              _g_free0 (_tmp72_);
                              _g_free0 (_tmp70_);
                              _g_free0 (_tmp68_);
                              _g_free0 (_tmp66_);
                        } else {
                              _tmp64_ = FALSE;
                        }
                        if (_tmp64_) {
                              _vala_gir_parser_node_unref0 (setter);
                              setter = NULL;
                        }
                        _tmp73_ = _vala_code_node_ref0 (VALA_PROPERTY (self->symbol));
                        prop = _tmp73_;
                        _tmp74_ = vala_property_get_no_accessor_method (prop);
                        if (_tmp74_) {
                              ValaPropertyAccessor* _tmp75_ = NULL;
                              gboolean _tmp91_ = FALSE;
                              gboolean _tmp92_ = FALSE;
                              gboolean _tmp93_;
                              vala_property_set_no_accessor_method (prop, FALSE);
                              _tmp75_ = vala_property_get_get_accessor (prop);
                              if (_tmp75_ != NULL) {
                                    ValaMethod* _tmp76_ = NULL;
                                    ValaMethod* _tmp78_;
                                    ValaMethod* m;
                                    if (getter != NULL) {
                                          ValaSymbol* _tmp77_;
                                          _tmp77_ = getter->symbol;
                                          _tmp76_ = VALA_IS_METHOD (_tmp77_) ? ((ValaMethod*) _tmp77_) : NULL;
                                    } else {
                                          _tmp76_ = NULL;
                                    }
                                    _tmp78_ = _vala_code_node_ref0 (_tmp76_);
                                    m = _tmp78_;
                                    if (m != NULL) {
                                          gboolean _tmp79_ = FALSE;
                                          ValaDataType* _tmp80_ = NULL;
                                          vala_gir_parser_node_process (getter, parser);
                                          _tmp80_ = vala_method_get_return_type (m);
                                          if (VALA_IS_VOID_TYPE (_tmp80_)) {
                                                _tmp79_ = TRUE;
                                          } else {
                                                ValaList* _tmp81_ = NULL;
                                                ValaList* _tmp82_;
                                                gint _tmp83_;
                                                _tmp81_ = vala_method_get_parameters (m);
                                                _tmp82_ = _tmp81_;
                                                _tmp83_ = vala_collection_get_size ((ValaCollection*) _tmp82_);
                                                _tmp79_ = _tmp83_ != 0;
                                                _vala_iterable_unref0 (_tmp82_);
                                          }
                                          if (_tmp79_) {
                                                vala_property_set_no_accessor_method (prop, TRUE);
                                          } else {
                                                ValaPropertyAccessor* _tmp87_ = NULL;
                                                ValaDataType* _tmp88_ = NULL;
                                                ValaDataType* _tmp89_ = NULL;
                                                gboolean _tmp90_;
                                                if (g_strcmp0 (getter->name, self->name) == 0) {
                                                      {
                                                            ValaArrayList* _tmp84_;
                                                            ValaArrayList* _node_list;
                                                            gint _tmp85_;
                                                            gint _node_size;
                                                            gint _node_index;
                                                            _tmp84_ = _vala_iterable_ref0 (colliding);
                                                            _node_list = _tmp84_;
                                                            _tmp85_ = vala_collection_get_size ((ValaCollection*) _node_list);
                                                            _node_size = _tmp85_;
                                                            _node_index = -1;
                                                            while (TRUE) {
                                                                  gpointer _tmp86_ = NULL;
                                                                  ValaGirParserNode* node;
                                                                  _node_index = _node_index + 1;
                                                                  if (!(_node_index < _node_size)) {
                                                                        break;
                                                                  }
                                                                  _tmp86_ = vala_list_get ((ValaList*) _node_list, _node_index);
                                                                  node = (ValaGirParserNode*) _tmp86_;
                                                                  if (VALA_IS_METHOD (node->symbol)) {
                                                                        node->merged = TRUE;
                                                                  }
                                                                  _vala_gir_parser_node_unref0 (node);
                                                            }
                                                            _vala_iterable_unref0 (_node_list);
                                                      }
                                                }
                                                _tmp87_ = vala_property_get_get_accessor (prop);
                                                _tmp88_ = vala_property_accessor_get_value_type (_tmp87_);
                                                _tmp89_ = vala_method_get_return_type (m);
                                                _tmp90_ = vala_data_type_get_value_owned (_tmp89_);
                                                vala_data_type_set_value_owned (_tmp88_, _tmp90_);
                                          }
                                    } else {
                                          vala_property_set_no_accessor_method (prop, TRUE);
                                    }
                                    _vala_code_node_unref0 (m);
                              }
                              _tmp93_ = vala_property_get_no_accessor_method (prop);
                              if (!_tmp93_) {
                                    ValaPropertyAccessor* _tmp94_ = NULL;
                                    _tmp94_ = vala_property_get_set_accessor (prop);
                                    _tmp92_ = _tmp94_ != NULL;
                              } else {
                                    _tmp92_ = FALSE;
                              }
                              if (_tmp92_) {
                                    ValaPropertyAccessor* _tmp95_ = NULL;
                                    gboolean _tmp96_;
                                    _tmp95_ = vala_property_get_set_accessor (prop);
                                    _tmp96_ = vala_property_accessor_get_writable (_tmp95_);
                                    _tmp91_ = _tmp96_;
                              } else {
                                    _tmp91_ = FALSE;
                              }
                              if (_tmp91_) {
                                    ValaMethod* _tmp97_ = NULL;
                                    ValaMethod* _tmp99_;
                                    ValaMethod* m;
                                    if (setter != NULL) {
                                          ValaSymbol* _tmp98_;
                                          _tmp98_ = setter->symbol;
                                          _tmp97_ = VALA_IS_METHOD (_tmp98_) ? ((ValaMethod*) _tmp98_) : NULL;
                                    } else {
                                          _tmp97_ = NULL;
                                    }
                                    _tmp99_ = _vala_code_node_ref0 (_tmp97_);
                                    m = _tmp99_;
                                    if (m != NULL) {
                                          gboolean _tmp100_ = FALSE;
                                          ValaDataType* _tmp101_ = NULL;
                                          vala_gir_parser_node_process (setter, parser);
                                          _tmp101_ = vala_method_get_return_type (m);
                                          if (!VALA_IS_VOID_TYPE (_tmp101_)) {
                                                _tmp100_ = TRUE;
                                          } else {
                                                ValaList* _tmp102_ = NULL;
                                                ValaList* _tmp103_;
                                                gint _tmp104_;
                                                _tmp102_ = vala_method_get_parameters (m);
                                                _tmp103_ = _tmp102_;
                                                _tmp104_ = vala_collection_get_size ((ValaCollection*) _tmp103_);
                                                _tmp100_ = _tmp104_ != 1;
                                                _vala_iterable_unref0 (_tmp103_);
                                          }
                                          if (_tmp100_) {
                                                vala_property_set_no_accessor_method (prop, TRUE);
                                          }
                                    } else {
                                          vala_property_set_no_accessor_method (prop, TRUE);
                                    }
                                    _vala_code_node_unref0 (m);
                              }
                        }
                        _vala_code_node_unref0 (prop);
                        _vala_gir_parser_node_unref0 (setter);
                        _vala_gir_parser_node_unref0 (getter);
                        _vala_iterable_unref0 (colliding);
                  } else {
                        if (VALA_IS_FIELD (self->symbol)) {
                              ValaField* _tmp105_;
                              ValaField* field;
                              ValaArrayList* _tmp106_ = NULL;
                              ValaArrayList* colliding;
                              gint _tmp107_;
                              gpointer _tmp108_ = NULL;
                              gchar* gtype_struct_for;
                              gboolean _tmp109_ = FALSE;
                              ValaDataType* _tmp110_ = NULL;
                              _tmp105_ = _vala_code_node_ref0 (VALA_FIELD (self->symbol));
                              field = _tmp105_;
                              _tmp106_ = vala_gir_parser_node_lookup_all (self->parent, self->name);
                              colliding = _tmp106_;
                              _tmp107_ = vala_collection_get_size ((ValaCollection*) colliding);
                              if (_tmp107_ > 1) {
                                    self->merged = TRUE;
                              }
                              _tmp108_ = vala_map_get (self->parent->girdata, "glib:is-gtype-struct-for");
                              gtype_struct_for = (gchar*) _tmp108_;
                              _tmp110_ = vala_variable_get_variable_type ((ValaVariable*) field);
                              if (VALA_IS_DELEGATE_TYPE (_tmp110_)) {
                                    _tmp109_ = gtype_struct_for != NULL;
                              } else {
                                    _tmp109_ = FALSE;
                              }
                              if (_tmp109_) {
                                    ValaDataType* _tmp111_ = NULL;
                                    ValaDelegate* _tmp112_ = NULL;
                                    ValaDelegate* _tmp113_;
                                    ValaDelegate* d;
                                    ValaSourceReference* _tmp114_ = NULL;
                                    ValaUnresolvedSymbol* _tmp115_ = NULL;
                                    ValaUnresolvedSymbol* _tmp116_;
                                    _tmp111_ = vala_variable_get_variable_type ((ValaVariable*) field);
                                    _tmp112_ = vala_delegate_type_get_delegate_symbol (VALA_DELEGATE_TYPE (_tmp111_));
                                    _tmp113_ = _vala_code_node_ref0 (_tmp112_);
                                    d = _tmp113_;
                                    _tmp114_ = vala_code_node_get_source_reference ((ValaCodeNode*) d);
                                    _tmp115_ = vala_gir_parser_parse_symbol_from_string (parser, gtype_struct_for, _tmp114_);
                                    _tmp116_ = _tmp115_;
                                    vala_gir_parser_process_virtual_method_field (parser, self, d, _tmp116_);
                                    _vala_code_node_unref0 (_tmp116_);
                                    self->merged = TRUE;
                                    _vala_code_node_unref0 (d);
                              } else {
                                    ValaDataType* _tmp117_ = NULL;
                                    _tmp117_ = vala_variable_get_variable_type ((ValaVariable*) field);
                                    if (VALA_IS_ARRAY_TYPE (_tmp117_)) {
                                          ValaGirParserNode* array_length = NULL;
                                          gboolean _tmp118_;
                                          gboolean _tmp130_ = FALSE;
                                          _tmp118_ = vala_gir_parser_metadata_has_argument (self->metadata, VALA_GIR_PARSER_ARGUMENT_TYPE_ARRAY_LENGTH_FIELD);
                                          if (_tmp118_) {
                                                gchar* _tmp119_ = NULL;
                                                gchar* _tmp120_;
                                                ValaGirParserNode* _tmp121_ = NULL;
                                                _tmp119_ = vala_gir_parser_metadata_get_string (self->metadata, VALA_GIR_PARSER_ARGUMENT_TYPE_ARRAY_LENGTH_FIELD);
                                                _tmp120_ = _tmp119_;
                                                _tmp121_ = vala_gir_parser_node_lookup (self->parent, _tmp120_, FALSE, NULL);
                                                _vala_gir_parser_node_unref0 (array_length);
                                                array_length = _tmp121_;
                                                _g_free0 (_tmp120_);
                                          } else {
                                                const gchar* _tmp122_ = NULL;
                                                gchar* _tmp123_ = NULL;
                                                gchar* _tmp124_;
                                                ValaGirParserNode* _tmp125_ = NULL;
                                                _tmp122_ = vala_symbol_get_name ((ValaSymbol*) field);
                                                _tmp123_ = g_strdup_printf ("n_%s", _tmp122_);
                                                _tmp124_ = _tmp123_;
                                                _tmp125_ = vala_gir_parser_node_lookup (self->parent, _tmp124_, FALSE, NULL);
                                                _vala_gir_parser_node_unref0 (array_length);
                                                array_length = _tmp125_;
                                                _g_free0 (_tmp124_);
                                                if (array_length == NULL) {
                                                      const gchar* _tmp126_ = NULL;
                                                      gchar* _tmp127_ = NULL;
                                                      gchar* _tmp128_;
                                                      ValaGirParserNode* _tmp129_ = NULL;
                                                      _tmp126_ = vala_symbol_get_name ((ValaSymbol*) field);
                                                      _tmp127_ = g_strdup_printf ("%s_length", _tmp126_);
                                                      _tmp128_ = _tmp127_;
                                                      _tmp129_ = vala_gir_parser_node_lookup (self->parent, _tmp128_, FALSE, NULL);
                                                      _vala_gir_parser_node_unref0 (array_length);
                                                      array_length = _tmp129_;
                                                      _g_free0 (_tmp128_);
                                                }
                                          }
                                          if (array_length != NULL) {
                                                _tmp130_ = VALA_IS_FIELD (array_length->symbol);
                                          } else {
                                                _tmp130_ = FALSE;
                                          }
                                          if (_tmp130_) {
                                                ValaField* _tmp131_;
                                                ValaField* length_field;
                                                const gchar* _tmp132_ = NULL;
                                                ValaDataType* _tmp133_ = NULL;
                                                gchar* _tmp134_ = NULL;
                                                gchar* length_type;
                                                _tmp131_ = _vala_code_node_ref0 (VALA_FIELD (array_length->symbol));
                                                length_field = _tmp131_;
                                                _tmp132_ = vala_symbol_get_name ((ValaSymbol*) length_field);
                                                vala_variable_set_array_length_cname ((ValaVariable*) field, _tmp132_);
                                                _tmp133_ = vala_variable_get_variable_type ((ValaVariable*) length_field);
                                                _tmp134_ = vala_data_type_to_qualified_string (_tmp133_, NULL);
                                                length_type = _tmp134_;
                                                if (g_strcmp0 (length_type, "int") != 0) {
                                                      ValaNamespace* _tmp135_ = NULL;
                                                      ValaScope* _tmp136_ = NULL;
                                                      ValaSymbol* _tmp137_ = NULL;
                                                      ValaSymbol* _tmp138_;
                                                      ValaStruct* st;
                                                      _tmp135_ = vala_code_context_get_root (parser->priv->context);
                                                      _tmp136_ = vala_symbol_get_scope ((ValaSymbol*) _tmp135_);
                                                      _tmp137_ = vala_scope_lookup (_tmp136_, length_type);
                                                      _tmp138_ = _tmp137_;
                                                      st = VALA_IS_STRUCT (_tmp138_) ? ((ValaStruct*) _tmp138_) : NULL;
                                                      if (st != NULL) {
                                                            gchar* _tmp139_ = NULL;
                                                            gchar* _tmp140_;
                                                            _tmp139_ = vala_typesymbol_get_cname ((ValaTypeSymbol*) st, FALSE);
                                                            _tmp140_ = _tmp139_;
                                                            vala_variable_set_array_length_type ((ValaVariable*) field, _tmp140_);
                                                            _g_free0 (_tmp140_);
                                                      }
                                                      _vala_code_node_unref0 (st);
                                                }
                                                vala_variable_set_no_array_length ((ValaVariable*) field, FALSE);
                                                vala_variable_set_array_null_terminated ((ValaVariable*) field, FALSE);
                                                _g_free0 (length_type);
                                                _vala_code_node_unref0 (length_field);
                                          }
                                          _vala_gir_parser_node_unref0 (array_length);
                                    }
                              }
                              _g_free0 (gtype_struct_for);
                              _vala_iterable_unref0 (colliding);
                              _vala_code_node_unref0 (field);
                        } else {
                              gboolean _tmp141_ = FALSE;
                              if (VALA_IS_SIGNAL (self->symbol)) {
                                    _tmp141_ = TRUE;
                              } else {
                                    _tmp141_ = VALA_IS_DELEGATE (self->symbol);
                              }
                              if (_tmp141_) {
                                    vala_gir_parser_process_callable (parser, self);
                              } else {
                                    if (VALA_IS_INTERFACE (self->symbol)) {
                                          vala_gir_parser_process_interface (parser, self);
                                    } else {
                                          if (g_strcmp0 (self->element_type, "alias") == 0) {
                                                vala_gir_parser_process_alias (parser, self);
                                          } else {
                                                if (VALA_IS_STRUCT (self->symbol)) {
                                                      gboolean _tmp142_ = FALSE;
                                                      if (VALA_IS_OBJECT_TYPE_SYMBOL (self->parent->symbol)) {
                                                            _tmp142_ = TRUE;
                                                      } else {
                                                            _tmp142_ = VALA_IS_STRUCT (self->parent->symbol);
                                                      }
                                                      if (_tmp142_) {
                                                            {
                                                                  ValaArrayList* _tmp143_;
                                                                  ValaArrayList* _fn_list;
                                                                  gint _tmp144_;
                                                                  gint _fn_size;
                                                                  gint _fn_index;
                                                                  _tmp143_ = _vala_iterable_ref0 (self->members);
                                                                  _fn_list = _tmp143_;
                                                                  _tmp144_ = vala_collection_get_size ((ValaCollection*) _fn_list);
                                                                  _fn_size = _tmp144_;
                                                                  _fn_index = -1;
                                                                  while (TRUE) {
                                                                        gpointer _tmp145_ = NULL;
                                                                        ValaGirParserNode* fn;
                                                                        ValaSymbol* _tmp146_;
                                                                        ValaField* _tmp147_;
                                                                        ValaField* f;
                                                                        _fn_index = _fn_index + 1;
                                                                        if (!(_fn_index < _fn_size)) {
                                                                              break;
                                                                        }
                                                                        _tmp145_ = vala_list_get ((ValaList*) _fn_list, _fn_index);
                                                                        fn = (ValaGirParserNode*) _tmp145_;
                                                                        _tmp146_ = fn->symbol;
                                                                        _tmp147_ = _vala_code_node_ref0 (VALA_IS_FIELD (_tmp146_) ? ((ValaField*) _tmp146_) : NULL);
                                                                        f = _tmp147_;
                                                                        if (f != NULL) {
                                                                              ValaMemberBinding _tmp148_;
                                                                              const gchar* _tmp155_ = NULL;
                                                                              gchar* _tmp156_;
                                                                              gchar* _tmp157_;
                                                                              const gchar* _tmp158_ = NULL;
                                                                              gchar* _tmp159_;
                                                                              gchar* _tmp160_;
                                                                              const gchar* _tmp161_ = NULL;
                                                                              gchar* _tmp162_;
                                                                              _tmp148_ = vala_field_get_binding (f);
                                                                              if (_tmp148_ == VALA_MEMBER_BINDING_INSTANCE) {
                                                                                    gchar* _tmp149_;
                                                                                    gchar* _tmp150_;
                                                                                    gchar* _tmp151_ = NULL;
                                                                                    gchar* _tmp152_;
                                                                                    gchar* _tmp153_;
                                                                                    gchar* _tmp154_;
                                                                                    _tmp149_ = g_strconcat (self->name, ".", NULL);
                                                                                    _tmp150_ = _tmp149_;
                                                                                    _tmp151_ = vala_field_get_cname (f);
                                                                                    _tmp152_ = _tmp151_;
                                                                                    _tmp153_ = g_strconcat (_tmp150_, _tmp152_, NULL);
                                                                                    _tmp154_ = _tmp153_;
                                                                                    vala_field_set_cname (f, _tmp154_);
                                                                                    _g_free0 (_tmp154_);
                                                                                    _g_free0 (_tmp152_);
                                                                                    _g_free0 (_tmp150_);
                                                                              }
                                                                              _tmp155_ = vala_symbol_get_name (self->symbol);
                                                                              _tmp156_ = g_strconcat (_tmp155_, "_", NULL);
                                                                              _tmp157_ = _tmp156_;
                                                                              _tmp158_ = vala_symbol_get_name ((ValaSymbol*) f);
                                                                              _tmp159_ = g_strconcat (_tmp157_, _tmp158_, NULL);
                                                                              _tmp160_ = _tmp159_;
                                                                              vala_symbol_set_name ((ValaSymbol*) f, _tmp160_);
                                                                              _g_free0 (_tmp160_);
                                                                              _g_free0 (_tmp157_);
                                                                              _tmp161_ = vala_symbol_get_name ((ValaSymbol*) f);
                                                                              _tmp162_ = g_strdup (_tmp161_);
                                                                              _g_free0 (fn->name);
                                                                              fn->name = _tmp162_;
                                                                              vala_gir_parser_node_add_member (self->parent, fn);
                                                                        }
                                                                        _vala_code_node_unref0 (f);
                                                                        _vala_gir_parser_node_unref0 (fn);
                                                                  }
                                                                  _vala_iterable_unref0 (_fn_list);
                                                            }
                                                            self->merged = TRUE;
                                                      } else {
                                                            gpointer _tmp163_ = NULL;
                                                            gchar* gtype_struct_for;
                                                            _tmp163_ = vala_map_get (self->girdata, "glib:is-gtype-struct-for");
                                                            gtype_struct_for = (gchar*) _tmp163_;
                                                            if (gtype_struct_for != NULL) {
                                                                  ValaUnresolvedSymbol* _tmp164_ = NULL;
                                                                  ValaUnresolvedSymbol* _tmp165_;
                                                                  ValaSymbol* _tmp166_ = NULL;
                                                                  ValaSymbol* _tmp167_;
                                                                  ValaInterface* _tmp168_;
                                                                  ValaInterface* iface;
                                                                  _tmp164_ = vala_gir_parser_parse_symbol_from_string (parser, gtype_struct_for, self->source_reference);
                                                                  _tmp165_ = _tmp164_;
                                                                  _tmp166_ = vala_gir_parser_resolve_symbol (parser, self->parent, _tmp165_);
                                                                  _tmp167_ = _tmp166_;
                                                                  _tmp168_ = VALA_IS_INTERFACE (_tmp167_) ? ((ValaInterface*) _tmp167_) : NULL;
                                                                  _vala_code_node_unref0 (_tmp165_);
                                                                  iface = _tmp168_;
                                                                  if (iface != NULL) {
                                                                        gchar* _tmp169_ = NULL;
                                                                        gchar* _tmp170_;
                                                                        _tmp169_ = vala_typesymbol_get_cname ((ValaTypeSymbol*) VALA_STRUCT (self->symbol), FALSE);
                                                                        _tmp170_ = _tmp169_;
                                                                        vala_interface_set_type_cname (iface, _tmp170_);
                                                                        _g_free0 (_tmp170_);
                                                                  }
                                                                  self->merged = TRUE;
                                                                  _vala_code_node_unref0 (iface);
                                                            }
                                                            _g_free0 (gtype_struct_for);
                                                      }
                                                }
                                          }
                                    }
                              }
                        }
                  }
            }
            _tmp171_ = vala_gir_parser_metadata_get_string (self->metadata, VALA_GIR_PARSER_ARGUMENT_TYPE_REPLACEMENT);
            _tmp172_ = _tmp171_;
            vala_symbol_set_replacement (self->symbol, _tmp172_);
            _g_free0 (_tmp172_);
            _tmp173_ = vala_gir_parser_metadata_get_string (self->metadata, VALA_GIR_PARSER_ARGUMENT_TYPE_DEPRECATED_SINCE);
            _tmp174_ = _tmp173_;
            vala_symbol_set_deprecated_since (self->symbol, _tmp174_);
            _g_free0 (_tmp174_);
            _tmp175_ = vala_symbol_get_deprecated_since (self->symbol);
            if (_tmp175_ == NULL) {
                  gpointer _tmp176_ = NULL;
                  gchar* _tmp177_;
                  _tmp176_ = vala_map_get (self->girdata, "deprecated-version");
                  _tmp177_ = (gchar*) _tmp176_;
                  vala_symbol_set_deprecated_since (self->symbol, _tmp177_);
                  _g_free0 (_tmp177_);
            }
            _tmp180_ = vala_gir_parser_metadata_get_bool (self->metadata, VALA_GIR_PARSER_ARGUMENT_TYPE_DEPRECATED);
            if (_tmp180_) {
                  _tmp179_ = TRUE;
            } else {
                  const gchar* _tmp181_ = NULL;
                  _tmp181_ = vala_symbol_get_replacement (self->symbol);
                  _tmp179_ = _tmp181_ != NULL;
            }
            if (_tmp179_) {
                  _tmp178_ = TRUE;
            } else {
                  const gchar* _tmp182_ = NULL;
                  _tmp182_ = vala_symbol_get_deprecated_since (self->symbol);
                  _tmp178_ = _tmp182_ != NULL;
            }
            vala_symbol_set_deprecated (self->symbol, _tmp178_);
            _tmp183_ = vala_gir_parser_metadata_get_string (self->metadata, VALA_GIR_PARSER_ARGUMENT_TYPE_CHEADER_FILENAME);
            cheader_filename = _tmp183_;
            if (cheader_filename != NULL) {
                  gchar** _tmp184_;
                  gchar** _tmp185_ = NULL;
                  _tmp185_ = _tmp184_ = g_strsplit (cheader_filename, ",", 0);
                  {
                        gchar** filename_collection = NULL;
                        gint filename_collection_length1 = 0;
                        gint _filename_collection_size_ = 0;
                        gint filename_it;
                        filename_collection = _tmp185_;
                        filename_collection_length1 = _vala_array_length (_tmp184_);
                        for (filename_it = 0; filename_it < _vala_array_length (_tmp184_); filename_it = filename_it + 1) {
                              gchar* _tmp186_;
                              gchar* filename = NULL;
                              _tmp186_ = g_strdup (filename_collection[filename_it]);
                              filename = _tmp186_;
                              {
                                    vala_symbol_add_cheader_filename (self->symbol, filename);
                                    _g_free0 (filename);
                              }
                        }
                        filename_collection = (_vala_array_free (filename_collection, filename_collection_length1, (GDestroyNotify) g_free), NULL);
                  }
            }
            _g_free0 (cheader_filename);
      }
      if (self->new_symbol) {
            _tmp188_ = self->merged;
      } else {
            _tmp188_ = FALSE;
      }
      if (!_tmp188_) {
            gboolean _tmp189_;
            _tmp189_ = vala_gir_parser_is_container (self->symbol);
            _tmp187_ = _tmp189_;
      } else {
            _tmp187_ = FALSE;
      }
      if (_tmp187_) {
            ValaSymbol* _tmp196_;
            ValaClass* _tmp197_;
            ValaClass* cl;
            gboolean _tmp198_ = FALSE;
            gboolean _tmp199_ = FALSE;
            {
                  ValaArrayList* _tmp190_;
                  ValaArrayList* _node_list;
                  gint _tmp191_;
                  gint _node_size;
                  gint _node_index;
                  _tmp190_ = _vala_iterable_ref0 (self->members);
                  _node_list = _tmp190_;
                  _tmp191_ = vala_collection_get_size ((ValaCollection*) _node_list);
                  _node_size = _tmp191_;
                  _node_index = -1;
                  while (TRUE) {
                        gpointer _tmp192_ = NULL;
                        ValaGirParserNode* node;
                        gboolean _tmp193_ = FALSE;
                        gboolean _tmp194_ = FALSE;
                        _node_index = _node_index + 1;
                        if (!(_node_index < _node_size)) {
                              break;
                        }
                        _tmp192_ = vala_list_get ((ValaList*) _node_list, _node_index);
                        node = (ValaGirParserNode*) _tmp192_;
                        if (node->new_symbol) {
                              _tmp194_ = !node->merged;
                        } else {
                              _tmp194_ = FALSE;
                        }
                        if (_tmp194_) {
                              gboolean _tmp195_;
                              _tmp195_ = vala_gir_parser_metadata_get_bool (self->metadata, VALA_GIR_PARSER_ARGUMENT_TYPE_HIDDEN);
                              _tmp193_ = !_tmp195_;
                        } else {
                              _tmp193_ = FALSE;
                        }
                        if (_tmp193_) {
                              vala_gir_parser_add_symbol_to_container (self->symbol, node->symbol);
                        }
                        _vala_gir_parser_node_unref0 (node);
                  }
                  _vala_iterable_unref0 (_node_list);
            }
            _tmp196_ = self->symbol;
            _tmp197_ = _vala_code_node_ref0 (VALA_IS_CLASS (_tmp196_) ? ((ValaClass*) _tmp196_) : NULL);
            cl = _tmp197_;
            if (cl != NULL) {
                  gboolean _tmp200_;
                  _tmp200_ = vala_class_get_is_compact (cl);
                  _tmp199_ = !_tmp200_;
            } else {
                  _tmp199_ = FALSE;
            }
            if (_tmp199_) {
                  ValaMethod* _tmp201_ = NULL;
                  _tmp201_ = vala_class_get_default_construction_method (cl);
                  _tmp198_ = _tmp201_ == NULL;
            } else {
                  _tmp198_ = FALSE;
            }
            if (_tmp198_) {
                  ValaSourceReference* _tmp202_ = NULL;
                  ValaCreationMethod* _tmp203_ = NULL;
                  ValaCreationMethod* cm;
                  _tmp202_ = vala_code_node_get_source_reference ((ValaCodeNode*) cl);
                  _tmp203_ = vala_creation_method_new (NULL, NULL, _tmp202_, NULL);
                  cm = _tmp203_;
                  vala_method_set_has_construct_function ((ValaMethod*) cm, FALSE);
                  vala_symbol_set_access ((ValaSymbol*) cm, VALA_SYMBOL_ACCESSIBILITY_PROTECTED);
                  vala_symbol_add_method ((ValaSymbol*) cl, (ValaMethod*) cm);
                  _vala_code_node_unref0 (cm);
            }
            _vala_code_node_unref0 (cl);
      }
      self->processed = TRUE;
}


static gchar* vala_gir_parser_node_to_string (ValaGirParserNode* self) {
      gchar* result = NULL;
      g_return_val_if_fail (self != NULL, NULL);
      if (self->parent->name == NULL) {
            gchar* _tmp0_;
            _tmp0_ = g_strdup (self->name);
            result = _tmp0_;
            return result;
      } else {
            gchar* _tmp1_ = NULL;
            gchar* _tmp2_;
            gchar* _tmp3_ = NULL;
            gchar* _tmp4_;
            _tmp1_ = vala_gir_parser_node_to_string (self->parent);
            _tmp2_ = _tmp1_;
            _tmp3_ = g_strdup_printf ("%s.%s", _tmp2_, self->name);
            _tmp4_ = _tmp3_;
            _g_free0 (_tmp2_);
            result = _tmp4_;
            return result;
      }
}


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


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


static void vala_gir_parser_value_node_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_node_ref (src_value->data[0].v_pointer);
      } else {
            dest_value->data[0].v_pointer = NULL;
      }
}


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


static gchar* vala_gir_parser_value_node_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
      if (collect_values[0].v_pointer) {
            ValaGirParserNode* 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_node_ref (object);
      } else {
            value->data[0].v_pointer = NULL;
      }
      return NULL;
}


static gchar* vala_gir_parser_value_node_lcopy_value (const GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
      ValaGirParserNode** 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_node_ref (value->data[0].v_pointer);
      }
      return NULL;
}


static GParamSpec* vala_gir_parser_param_spec_node (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) {
      ValaGirParserParamSpecNode* spec;
      g_return_val_if_fail (g_type_is_a (object_type, VALA_GIR_PARSER_TYPE_NODE), 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_node (const GValue* value) {
      g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, VALA_GIR_PARSER_TYPE_NODE), NULL);
      return value->data[0].v_pointer;
}


static void vala_gir_parser_value_set_node (GValue* value, gpointer v_object) {
      ValaGirParserNode* old;
      g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, VALA_GIR_PARSER_TYPE_NODE));
      old = value->data[0].v_pointer;
      if (v_object) {
            g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, VALA_GIR_PARSER_TYPE_NODE));
            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_node_ref (value->data[0].v_pointer);
      } else {
            value->data[0].v_pointer = NULL;
      }
      if (old) {
            vala_gir_parser_node_unref (old);
      }
}


static void vala_gir_parser_value_take_node (GValue* value, gpointer v_object) {
      ValaGirParserNode* old;
      g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, VALA_GIR_PARSER_TYPE_NODE));
      old = value->data[0].v_pointer;
      if (v_object) {
            g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, VALA_GIR_PARSER_TYPE_NODE));
            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_node_unref (old);
      }
}


static void vala_gir_parser_node_class_init (ValaGirParserNodeClass * klass) {
      ValaArrayList* _tmp0_ = NULL;
      vala_gir_parser_node_parent_class = g_type_class_peek_parent (klass);
      VALA_GIR_PARSER_NODE_CLASS (klass)->finalize = vala_gir_parser_node_finalize;
      _tmp0_ = vala_array_list_new (VALA_GIR_PARSER_TYPE_NODE, (GBoxedCopyFunc) vala_gir_parser_node_ref, vala_gir_parser_node_unref, g_direct_equal);
      vala_gir_parser_node_new_namespaces = _tmp0_;
}


static void vala_gir_parser_node_instance_init (ValaGirParserNode * self) {
      ValaGirParserMetadata* _tmp0_ = NULL;
      ValaGirParserMetadata* _tmp1_;
      ValaArrayList* _tmp2_ = NULL;
      ValaHashMap* _tmp3_ = NULL;
      self->girdata = NULL;
      _tmp0_ = vala_gir_parser_metadata_get_empty ();
      _tmp1_ = _vala_gir_parser_metadata_ref0 (_tmp0_);
      self->metadata = _tmp1_;
      self->source_reference = NULL;
      _tmp2_ = vala_array_list_new (VALA_GIR_PARSER_TYPE_NODE, (GBoxedCopyFunc) vala_gir_parser_node_ref, vala_gir_parser_node_unref, g_direct_equal);
      self->members = _tmp2_;
      _tmp3_ = 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);
      self->scope = _tmp3_;
      self->return_array_length_idx = -1;
      self->ref_count = 1;
}


static void vala_gir_parser_node_finalize (ValaGirParserNode* obj) {
      ValaGirParserNode * self;
      self = VALA_GIR_PARSER_NODE (obj);
      _g_free0 (self->element_type);
      _g_free0 (self->name);
      _vala_map_unref0 (self->girdata);
      _vala_gir_parser_metadata_unref0 (self->metadata);
      _vala_source_reference_unref0 (self->source_reference);
      _vala_iterable_unref0 (self->members);
      _vala_map_unref0 (self->scope);
      _vala_code_node_unref0 (self->symbol);
      _vala_iterable_unref0 (self->parameters);
      _vala_iterable_unref0 (self->array_length_parameters);
      _vala_iterable_unref0 (self->closure_parameters);
      _vala_iterable_unref0 (self->destroy_parameters);
      _vala_code_node_unref0 (self->base_type);
}


static GType vala_gir_parser_node_get_type (void) {
      static volatile gsize vala_gir_parser_node_type_id__volatile = 0;
      if (g_once_init_enter (&vala_gir_parser_node_type_id__volatile)) {
            static const GTypeValueTable g_define_type_value_table = { vala_gir_parser_value_node_init, vala_gir_parser_value_node_free_value, vala_gir_parser_value_node_copy_value, vala_gir_parser_value_node_peek_pointer, "p", vala_gir_parser_value_node_collect_value, "p", vala_gir_parser_value_node_lcopy_value };
            static const GTypeInfo g_define_type_info = { sizeof (ValaGirParserNodeClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) vala_gir_parser_node_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ValaGirParserNode), 0, (GInstanceInitFunc) vala_gir_parser_node_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_node_type_id;
            vala_gir_parser_node_type_id = g_type_register_fundamental (g_type_fundamental_next (), "ValaGirParserNode", &g_define_type_info, &g_define_type_fundamental_info, 0);
            g_once_init_leave (&vala_gir_parser_node_type_id__volatile, vala_gir_parser_node_type_id);
      }
      return vala_gir_parser_node_type_id__volatile;
}


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


static void vala_gir_parser_node_unref (gpointer instance) {
      ValaGirParserNode* self;
      self = instance;
      if (g_atomic_int_dec_and_test (&self->ref_count)) {
            VALA_GIR_PARSER_NODE_GET_CLASS (self)->finalize (self);
            g_type_free_instance ((GTypeInstance *) self);
      }
}


static ValaGirParserParameterInfo* vala_gir_parser_parameter_info_construct (GType object_type, ValaParameter* param, gint array_length_idx, gint closure_idx, gint destroy_idx) {
      ValaGirParserParameterInfo* self = NULL;
      ValaParameter* _tmp0_;
      g_return_val_if_fail (param != NULL, NULL);
      self = (ValaGirParserParameterInfo*) 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 ValaGirParserParameterInfo* vala_gir_parser_parameter_info_new (ValaParameter* param, gint array_length_idx, gint closure_idx, gint destroy_idx) {
      return vala_gir_parser_parameter_info_construct (VALA_GIR_PARSER_TYPE_PARAMETER_INFO, param, array_length_idx, closure_idx, destroy_idx);
}


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


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


static void vala_gir_parser_value_parameter_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_parameter_info_ref (src_value->data[0].v_pointer);
      } else {
            dest_value->data[0].v_pointer = NULL;
      }
}


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


static gchar* vala_gir_parser_value_parameter_info_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
      if (collect_values[0].v_pointer) {
            ValaGirParserParameterInfo* 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_parameter_info_ref (object);
      } else {
            value->data[0].v_pointer = NULL;
      }
      return NULL;
}


static gchar* vala_gir_parser_value_parameter_info_lcopy_value (const GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
      ValaGirParserParameterInfo** 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_parameter_info_ref (value->data[0].v_pointer);
      }
      return NULL;
}


static GParamSpec* vala_gir_parser_param_spec_parameter_info (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) {
      ValaGirParserParamSpecParameterInfo* spec;
      g_return_val_if_fail (g_type_is_a (object_type, VALA_GIR_PARSER_TYPE_PARAMETER_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_parameter_info (const GValue* value) {
      g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, VALA_GIR_PARSER_TYPE_PARAMETER_INFO), NULL);
      return value->data[0].v_pointer;
}


static void vala_gir_parser_value_set_parameter_info (GValue* value, gpointer v_object) {
      ValaGirParserParameterInfo* old;
      g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, VALA_GIR_PARSER_TYPE_PARAMETER_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_PARAMETER_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_parameter_info_ref (value->data[0].v_pointer);
      } else {
            value->data[0].v_pointer = NULL;
      }
      if (old) {
            vala_gir_parser_parameter_info_unref (old);
      }
}


static void vala_gir_parser_value_take_parameter_info (GValue* value, gpointer v_object) {
      ValaGirParserParameterInfo* old;
      g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, VALA_GIR_PARSER_TYPE_PARAMETER_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_PARAMETER_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_parameter_info_unref (old);
      }
}


static void vala_gir_parser_parameter_info_class_init (ValaGirParserParameterInfoClass * klass) {
      vala_gir_parser_parameter_info_parent_class = g_type_class_peek_parent (klass);
      VALA_GIR_PARSER_PARAMETER_INFO_CLASS (klass)->finalize = vala_gir_parser_parameter_info_finalize;
}


static void vala_gir_parser_parameter_info_instance_init (ValaGirParserParameterInfo * self) {
      self->ref_count = 1;
}


static void vala_gir_parser_parameter_info_finalize (ValaGirParserParameterInfo* obj) {
      ValaGirParserParameterInfo * self;
      self = VALA_GIR_PARSER_PARAMETER_INFO (obj);
      _vala_code_node_unref0 (self->param);
}


static GType vala_gir_parser_parameter_info_get_type (void) {
      static volatile gsize vala_gir_parser_parameter_info_type_id__volatile = 0;
      if (g_once_init_enter (&vala_gir_parser_parameter_info_type_id__volatile)) {
            static const GTypeValueTable g_define_type_value_table = { vala_gir_parser_value_parameter_info_init, vala_gir_parser_value_parameter_info_free_value, vala_gir_parser_value_parameter_info_copy_value, vala_gir_parser_value_parameter_info_peek_pointer, "p", vala_gir_parser_value_parameter_info_collect_value, "p", vala_gir_parser_value_parameter_info_lcopy_value };
            static const GTypeInfo g_define_type_info = { sizeof (ValaGirParserParameterInfoClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) vala_gir_parser_parameter_info_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ValaGirParserParameterInfo), 0, (GInstanceInitFunc) vala_gir_parser_parameter_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_parameter_info_type_id;
            vala_gir_parser_parameter_info_type_id = g_type_register_fundamental (g_type_fundamental_next (), "ValaGirParserParameterInfo", &g_define_type_info, &g_define_type_fundamental_info, 0);
            g_once_init_leave (&vala_gir_parser_parameter_info_type_id__volatile, vala_gir_parser_parameter_info_type_id);
      }
      return vala_gir_parser_parameter_info_type_id__volatile;
}


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


static void vala_gir_parser_parameter_info_unref (gpointer instance) {
      ValaGirParserParameterInfo* self;
      self = instance;
      if (g_atomic_int_dec_and_test (&self->ref_count)) {
            VALA_GIR_PARSER_PARAMETER_INFO_GET_CLASS (self)->finalize (self);
            g_type_free_instance ((GTypeInstance *) self);
      }
}


static void vala_gir_parser_class_init (ValaGirParserClass * klass) {
      vala_gir_parser_parent_class = g_type_class_peek_parent (klass);
      VALA_CODE_VISITOR_CLASS (klass)->finalize = vala_gir_parser_finalize;
      g_type_class_add_private (klass, sizeof (ValaGirParserPrivate));
      VALA_CODE_VISITOR_CLASS (klass)->visit_source_file = vala_gir_parser_real_visit_source_file;
}


static void vala_gir_parser_instance_init (ValaGirParser * self) {
      ValaHashMap* _tmp0_ = NULL;
      ValaArrayList* _tmp1_ = NULL;
      self->priv = VALA_GIR_PARSER_GET_PRIVATE (self);
      _tmp0_ = vala_hash_map_new (VALA_TYPE_UNRESOLVED_SYMBOL, (GBoxedCopyFunc) vala_code_node_ref, vala_code_node_unref, VALA_TYPE_SYMBOL, (GBoxedCopyFunc) vala_code_node_ref, vala_code_node_unref, _vala_gir_parser_unresolved_symbol_hash_ghash_func, _vala_gir_parser_unresolved_symbol_equal_gequal_func, g_direct_equal);
      self->priv->unresolved_symbols_map = _tmp0_;
      _tmp1_ = vala_array_list_new (VALA_TYPE_UNRESOLVED_SYMBOL, (GBoxedCopyFunc) vala_code_node_ref, vala_code_node_unref, g_direct_equal);
      self->priv->unresolved_gir_symbols = _tmp1_;
}


static void vala_gir_parser_finalize (ValaCodeVisitor* obj) {
      ValaGirParser * self;
      self = VALA_GIR_PARSER (obj);
      _g_object_unref0 (self->priv->reader);
      _vala_code_context_unref0 (self->priv->context);
      _vala_code_node_unref0 (self->priv->glib_ns);
      _vala_source_file_unref0 (self->priv->current_source_file);
      _vala_gir_parser_node_unref0 (self->priv->root);
      self->priv->cheader_filenames = (_vala_array_free (self->priv->cheader_filenames, self->priv->cheader_filenames_length1, (GDestroyNotify) g_free), NULL);
      _vala_iterable_unref0 (self->priv->metadata_stack);
      _vala_gir_parser_metadata_unref0 (self->priv->metadata);
      _vala_iterable_unref0 (self->priv->tree_stack);
      _vala_gir_parser_node_unref0 (self->priv->current);
      _vala_gir_parser_node_unref0 (self->priv->old_current);
      _vala_map_unref0 (self->priv->unresolved_symbols_map);
      _vala_iterable_unref0 (self->priv->unresolved_gir_symbols);
      VALA_CODE_VISITOR_CLASS (vala_gir_parser_parent_class)->finalize (obj);
}


/**
 * Code visitor parsing all GIR source files.
 *
 * Pipeline:
 * 1) Parse metadata
 * 2) Parse GIR with metadata, track unresolved GIR symbols, create Vala symbols
 * 3) Reconciliate the tree by mapping tracked symbols
 * 4) Process the tree
 */
GType vala_gir_parser_get_type (void) {
      static volatile gsize vala_gir_parser_type_id__volatile = 0;
      if (g_once_init_enter (&vala_gir_parser_type_id__volatile)) {
            static const GTypeInfo g_define_type_info = { sizeof (ValaGirParserClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) vala_gir_parser_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ValaGirParser), 0, (GInstanceInitFunc) vala_gir_parser_instance_init, NULL };
            GType vala_gir_parser_type_id;
            vala_gir_parser_type_id = g_type_register_static (VALA_TYPE_CODE_VISITOR, "ValaGirParser", &g_define_type_info, 0);
            g_once_init_leave (&vala_gir_parser_type_id__volatile, vala_gir_parser_type_id);
      }
      return vala_gir_parser_type_id__volatile;
}


static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func) {
      if ((array != NULL) && (destroy_func != NULL)) {
            int i;
            for (i = 0; i < array_length; i = i + 1) {
                  if (((gpointer*) array)[i] != NULL) {
                        destroy_func (((gpointer*) array)[i]);
                  }
            }
      }
}


static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func) {
      _vala_array_destroy (array, array_length, destroy_func);
      g_free (array);
}


static gint _vala_array_length (gpointer array) {
      int length;
      length = 0;
      if (array) {
            while (((gpointer*) array)[length]) {
                  length++;
            }
      }
      return length;
}




Generated by  Doxygen 1.6.0   Back to index