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

/* valawithtatement.vala
 *
 * Copyright (C) 2020 Nick Schrader
 *
 * 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
 *
 * Authors:
 * 	Nick Schrader <nick.schrader@mailbox.org>
 */

#include "vala.h"
#include <glib.h>
#include <valagee.h>
#include <glib-object.h>
#include <stdlib.h>
#include <string.h>

#define _vala_code_node_unref0(var) ((var == NULL) ? NULL : (var = (vala_code_node_unref (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))

struct _ValaWithStatementPrivate {
	ValaLocalVariable* _with_variable;
	ValaExpression* _expression;
	ValaBlock* _body;
};

static gint ValaWithStatement_private_offset;
static gpointer vala_with_statement_parent_class = NULL;

static void vala_with_statement_set_expression (ValaWithStatement* self,
                                         ValaExpression* value);
static void vala_with_statement_set_with_variable (ValaWithStatement* self,
                                            ValaLocalVariable* value);
static void vala_with_statement_set_body (ValaWithStatement* self,
                                   ValaBlock* value);
static void vala_with_statement_real_accept (ValaCodeNode* base,
                                      ValaCodeVisitor* visitor);
static void vala_with_statement_real_accept_children (ValaCodeNode* base,
                                               ValaCodeVisitor* visitor);
static gboolean vala_with_statement_is_object_or_value_type (ValaWithStatement* self,
                                                      ValaDataType* type);
static gboolean vala_with_statement_real_check (ValaCodeNode* base,
                                         ValaCodeContext* context);
static void vala_with_statement_real_emit (ValaCodeNode* base,
                                    ValaCodeGenerator* codegen);
static void vala_with_statement_real_get_error_types (ValaCodeNode* base,
                                               ValaCollection* collection,
                                               ValaSourceReference* source_reference);
static void vala_with_statement_real_get_defined_variables (ValaCodeNode* base,
                                                     ValaCollection* collection);
static void vala_with_statement_finalize (ValaCodeNode * obj);
static GType vala_with_statement_get_type_once (void);

static inline gpointer
vala_with_statement_get_instance_private (ValaWithStatement* self)
{
	return G_STRUCT_MEMBER_P (self, ValaWithStatement_private_offset);
}

ValaExpression*
vala_with_statement_get_expression (ValaWithStatement* self)
{
	ValaExpression* result;
	ValaExpression* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_expression;
	result = _tmp0_;
	return result;
}

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

static void
vala_with_statement_set_expression (ValaWithStatement* self,
                                    ValaExpression* value)
{
	ValaExpression* _tmp0_;
	ValaExpression* _tmp1_;
	g_return_if_fail (self != NULL);
	_tmp0_ = _vala_code_node_ref0 (value);
	_vala_code_node_unref0 (self->priv->_expression);
	self->priv->_expression = _tmp0_;
	_tmp1_ = self->priv->_expression;
	vala_code_node_set_parent_node ((ValaCodeNode*) _tmp1_, (ValaCodeNode*) self);
}

ValaLocalVariable*
vala_with_statement_get_with_variable (ValaWithStatement* self)
{
	ValaLocalVariable* result;
	ValaLocalVariable* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_with_variable;
	result = _tmp0_;
	return result;
}

static void
vala_with_statement_set_with_variable (ValaWithStatement* self,
                                       ValaLocalVariable* value)
{
	ValaLocalVariable* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = _vala_code_node_ref0 (value);
	_vala_code_node_unref0 (self->priv->_with_variable);
	self->priv->_with_variable = _tmp0_;
}

ValaBlock*
vala_with_statement_get_body (ValaWithStatement* self)
{
	ValaBlock* result;
	ValaBlock* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_body;
	result = _tmp0_;
	return result;
}

static void
vala_with_statement_set_body (ValaWithStatement* self,
                              ValaBlock* value)
{
	ValaBlock* _tmp0_;
	ValaBlock* _tmp1_;
	g_return_if_fail (self != NULL);
	_tmp0_ = _vala_code_node_ref0 (value);
	_vala_code_node_unref0 (self->priv->_body);
	self->priv->_body = _tmp0_;
	_tmp1_ = self->priv->_body;
	vala_code_node_set_parent_node ((ValaCodeNode*) _tmp1_, (ValaCodeNode*) self);
}

ValaWithStatement*
vala_with_statement_construct (GType object_type,
                               ValaLocalVariable* variable,
                               ValaExpression* expression,
                               ValaBlock* body,
                               ValaSourceReference* source_reference)
{
	ValaWithStatement* self = NULL;
	g_return_val_if_fail (expression != NULL, NULL);
	g_return_val_if_fail (body != NULL, NULL);
	self = (ValaWithStatement*) vala_block_construct (object_type, source_reference);
	vala_with_statement_set_with_variable (self, variable);
	vala_with_statement_set_expression (self, expression);
	vala_with_statement_set_body (self, body);
	return self;
}

ValaWithStatement*
vala_with_statement_new (ValaLocalVariable* variable,
                         ValaExpression* expression,
                         ValaBlock* body,
                         ValaSourceReference* source_reference)
{
	return vala_with_statement_construct (VALA_TYPE_WITH_STATEMENT, variable, expression, body, source_reference);
}

static void
vala_with_statement_real_accept (ValaCodeNode* base,
                                 ValaCodeVisitor* visitor)
{
	ValaWithStatement * self;
	self = (ValaWithStatement*) base;
	g_return_if_fail (visitor != NULL);
	vala_code_visitor_visit_with_statement (visitor, self);
}

static void
vala_with_statement_real_accept_children (ValaCodeNode* base,
                                          ValaCodeVisitor* visitor)
{
	ValaWithStatement * self;
	ValaExpression* _tmp0_;
	ValaExpression* _tmp1_;
	ValaSymbol* _tmp2_;
	ValaSymbol* _tmp3_;
	ValaLocalVariable* _tmp4_;
	ValaLocalVariable* _tmp7_;
	ValaBlock* _tmp9_;
	ValaBlock* _tmp10_;
	self = (ValaWithStatement*) base;
	g_return_if_fail (visitor != NULL);
	_tmp0_ = vala_with_statement_get_expression (self);
	_tmp1_ = _tmp0_;
	_tmp2_ = vala_expression_get_symbol_reference (_tmp1_);
	_tmp3_ = _tmp2_;
	_tmp4_ = self->priv->_with_variable;
	if (_tmp3_ == G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, VALA_TYPE_SYMBOL, ValaSymbol)) {
		ValaExpression* _tmp5_;
		ValaExpression* _tmp6_;
		_tmp5_ = vala_with_statement_get_expression (self);
		_tmp6_ = _tmp5_;
		vala_code_node_accept ((ValaCodeNode*) _tmp6_, visitor);
	}
	_tmp7_ = self->priv->_with_variable;
	if (_tmp7_ != NULL) {
		ValaLocalVariable* _tmp8_;
		_tmp8_ = self->priv->_with_variable;
		vala_code_node_accept ((ValaCodeNode*) _tmp8_, visitor);
	}
	_tmp9_ = vala_with_statement_get_body (self);
	_tmp10_ = _tmp9_;
	vala_code_node_accept ((ValaCodeNode*) _tmp10_, visitor);
}

static gboolean
vala_with_statement_is_object_or_value_type (ValaWithStatement* self,
                                             ValaDataType* type)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	if (type == NULL) {
		result = FALSE;
		return result;
	} else {
		if (VALA_IS_POINTER_TYPE (type)) {
			ValaPointerType* pointer_type = NULL;
			ValaPointerType* _tmp0_;
			gboolean _tmp1_ = FALSE;
			ValaPointerType* _tmp2_;
			ValaDataType* _tmp3_;
			ValaDataType* _tmp4_;
			_tmp0_ = _vala_code_node_ref0 (G_TYPE_CHECK_INSTANCE_CAST (type, VALA_TYPE_POINTER_TYPE, ValaPointerType));
			pointer_type = _tmp0_;
			_tmp2_ = pointer_type;
			_tmp3_ = vala_pointer_type_get_base_type (_tmp2_);
			_tmp4_ = _tmp3_;
			if (vala_with_statement_is_object_or_value_type (self, _tmp4_)) {
				ValaExpression* _tmp5_;
				ValaExpression* _tmp6_;
				_tmp5_ = vala_with_statement_get_expression (self);
				_tmp6_ = _tmp5_;
				_tmp1_ = VALA_IS_POINTER_INDIRECTION (_tmp6_);
			} else {
				_tmp1_ = FALSE;
			}
			result = _tmp1_;
			_vala_code_node_unref0 (pointer_type);
			return result;
		} else {
			gboolean _tmp7_ = FALSE;
			if (VALA_IS_OBJECT_TYPE (type)) {
				_tmp7_ = TRUE;
			} else {
				_tmp7_ = VALA_IS_VALUE_TYPE (type);
			}
			result = _tmp7_;
			return result;
		}
	}
}

static gboolean
vala_with_statement_real_check (ValaCodeNode* base,
                                ValaCodeContext* context)
{
	ValaWithStatement * self;
	gboolean _tmp0_;
	gboolean _tmp1_;
	ValaExpression* _tmp4_;
	ValaExpression* _tmp5_;
	ValaExpression* _tmp6_;
	ValaExpression* _tmp7_;
	ValaDataType* _tmp8_;
	ValaDataType* _tmp9_;
	ValaLocalVariable* local_var = NULL;
	ValaExpression* _tmp14_;
	ValaExpression* _tmp15_;
	ValaSymbol* _tmp16_;
	ValaSymbol* _tmp17_;
	ValaLocalVariable* _tmp18_;
	gboolean _tmp19_ = FALSE;
	ValaLocalVariable* _tmp20_;
	ValaLocalVariable* _tmp45_;
	ValaSymbol* old_symbol = NULL;
	ValaSemanticAnalyzer* _tmp46_;
	ValaSemanticAnalyzer* _tmp47_;
	ValaSymbol* _tmp48_;
	ValaSymbol* _tmp49_;
	ValaSymbol* _tmp50_;
	ValaSemanticAnalyzer* _tmp51_;
	ValaSemanticAnalyzer* _tmp52_;
	ValaSymbol* _tmp53_;
	ValaSymbol* _tmp54_;
	ValaScope* _tmp55_;
	ValaScope* _tmp56_;
	ValaSemanticAnalyzer* _tmp57_;
	ValaSemanticAnalyzer* _tmp58_;
	ValaBlock* _tmp59_;
	ValaBlock* _tmp60_;
	ValaSemanticAnalyzer* _tmp61_;
	ValaSemanticAnalyzer* _tmp62_;
	ValaSymbol* _tmp63_;
	gboolean _tmp64_;
	gboolean _tmp65_;
	gboolean result;
	self = (ValaWithStatement*) base;
	g_return_val_if_fail (context != NULL, FALSE);
	_tmp0_ = vala_code_node_get_checked ((ValaCodeNode*) self);
	_tmp1_ = _tmp0_;
	if (_tmp1_) {
		gboolean _tmp2_;
		gboolean _tmp3_;
		_tmp2_ = vala_code_node_get_error ((ValaCodeNode*) self);
		_tmp3_ = _tmp2_;
		result = !_tmp3_;
		return result;
	}
	vala_code_node_set_checked ((ValaCodeNode*) self, TRUE);
	_tmp4_ = vala_with_statement_get_expression (self);
	_tmp5_ = _tmp4_;
	if (!vala_code_node_check ((ValaCodeNode*) _tmp5_, context)) {
		vala_code_node_set_error ((ValaCodeNode*) self, TRUE);
		result = FALSE;
		return result;
	}
	_tmp6_ = vala_with_statement_get_expression (self);
	_tmp7_ = _tmp6_;
	_tmp8_ = vala_expression_get_value_type (_tmp7_);
	_tmp9_ = _tmp8_;
	if (!vala_with_statement_is_object_or_value_type (self, _tmp9_)) {
		ValaExpression* _tmp10_;
		ValaExpression* _tmp11_;
		ValaSourceReference* _tmp12_;
		ValaSourceReference* _tmp13_;
		vala_code_node_set_error ((ValaCodeNode*) self, TRUE);
		_tmp10_ = vala_with_statement_get_expression (self);
		_tmp11_ = _tmp10_;
		_tmp12_ = vala_code_node_get_source_reference ((ValaCodeNode*) _tmp11_);
		_tmp13_ = _tmp12_;
		vala_report_error (_tmp13_, "with statement expects an object or basic type");
		result = FALSE;
		return result;
	}
	_tmp14_ = vala_with_statement_get_expression (self);
	_tmp15_ = _tmp14_;
	_tmp16_ = vala_expression_get_symbol_reference (_tmp15_);
	_tmp17_ = _tmp16_;
	_tmp18_ = _vala_code_node_ref0 (VALA_IS_LOCAL_VARIABLE (_tmp17_) ? ((ValaLocalVariable*) _tmp17_) : NULL);
	local_var = _tmp18_;
	_tmp20_ = self->priv->_with_variable;
	if (_tmp20_ != NULL) {
		_tmp19_ = TRUE;
	} else {
		ValaLocalVariable* _tmp21_;
		_tmp21_ = local_var;
		_tmp19_ = _tmp21_ == NULL;
	}
	if (_tmp19_) {
		ValaLocalVariable* _tmp22_;
		ValaBlock* _tmp38_;
		ValaBlock* _tmp39_;
		ValaLocalVariable* _tmp40_;
		ValaSourceReference* _tmp41_;
		ValaSourceReference* _tmp42_;
		ValaDeclarationStatement* _tmp43_;
		ValaDeclarationStatement* _tmp44_;
		_tmp22_ = self->priv->_with_variable;
		if (_tmp22_ != NULL) {
			ValaLocalVariable* _tmp23_;
			ValaLocalVariable* _tmp24_;
			_tmp23_ = self->priv->_with_variable;
			_tmp24_ = _vala_code_node_ref0 (_tmp23_);
			_vala_code_node_unref0 (local_var);
			local_var = _tmp24_;
		} else {
			ValaExpression* _tmp25_;
			ValaExpression* _tmp26_;
			ValaDataType* _tmp27_;
			ValaDataType* _tmp28_;
			ValaDataType* _tmp29_;
			ValaDataType* _tmp30_;
			gchar* _tmp31_;
			gchar* _tmp32_;
			ValaExpression* _tmp33_;
			ValaExpression* _tmp34_;
			ValaSourceReference* _tmp35_;
			ValaSourceReference* _tmp36_;
			ValaLocalVariable* _tmp37_;
			_tmp25_ = vala_with_statement_get_expression (self);
			_tmp26_ = _tmp25_;
			_tmp27_ = vala_expression_get_value_type (_tmp26_);
			_tmp28_ = _tmp27_;
			_tmp29_ = vala_data_type_copy (_tmp28_);
			_tmp30_ = _tmp29_;
			_tmp31_ = vala_code_node_get_temp_name ();
			_tmp32_ = _tmp31_;
			_tmp33_ = vala_with_statement_get_expression (self);
			_tmp34_ = _tmp33_;
			_tmp35_ = vala_code_node_get_source_reference ((ValaCodeNode*) self);
			_tmp36_ = _tmp35_;
			_tmp37_ = vala_local_variable_new (_tmp30_, _tmp32_, _tmp34_, _tmp36_);
			_vala_code_node_unref0 (local_var);
			local_var = _tmp37_;
			_g_free0 (_tmp32_);
			_vala_code_node_unref0 (_tmp30_);
		}
		_tmp38_ = vala_with_statement_get_body (self);
		_tmp39_ = _tmp38_;
		_tmp40_ = local_var;
		_tmp41_ = vala_code_node_get_source_reference ((ValaCodeNode*) self);
		_tmp42_ = _tmp41_;
		_tmp43_ = vala_declaration_statement_new ((ValaSymbol*) _tmp40_, _tmp42_);
		_tmp44_ = _tmp43_;
		vala_block_insert_statement (_tmp39_, 0, (ValaStatement*) _tmp44_);
		_vala_code_node_unref0 (_tmp44_);
	}
	_tmp45_ = local_var;
	vala_with_statement_set_with_variable (self, _tmp45_);
	_tmp46_ = vala_code_context_get_analyzer (context);
	_tmp47_ = _tmp46_;
	_tmp48_ = vala_semantic_analyzer_get_current_symbol (_tmp47_);
	_tmp49_ = _tmp48_;
	_tmp50_ = _vala_code_node_ref0 (_tmp49_);
	old_symbol = _tmp50_;
	_tmp51_ = vala_code_context_get_analyzer (context);
	_tmp52_ = _tmp51_;
	_tmp53_ = vala_semantic_analyzer_get_current_symbol (_tmp52_);
	_tmp54_ = _tmp53_;
	_tmp55_ = vala_symbol_get_scope (_tmp54_);
	_tmp56_ = _tmp55_;
	vala_symbol_set_owner ((ValaSymbol*) self, _tmp56_);
	_tmp57_ = vala_code_context_get_analyzer (context);
	_tmp58_ = _tmp57_;
	vala_semantic_analyzer_set_current_symbol (_tmp58_, (ValaSymbol*) self);
	_tmp59_ = vala_with_statement_get_body (self);
	_tmp60_ = _tmp59_;
	if (!vala_code_node_check ((ValaCodeNode*) _tmp60_, context)) {
		vala_code_node_set_error ((ValaCodeNode*) self, TRUE);
	}
	_tmp61_ = vala_code_context_get_analyzer (context);
	_tmp62_ = _tmp61_;
	_tmp63_ = old_symbol;
	vala_semantic_analyzer_set_current_symbol (_tmp62_, _tmp63_);
	_tmp64_ = vala_code_node_get_error ((ValaCodeNode*) self);
	_tmp65_ = _tmp64_;
	result = !_tmp65_;
	_vala_code_node_unref0 (old_symbol);
	_vala_code_node_unref0 (local_var);
	return result;
}

static void
vala_with_statement_real_emit (ValaCodeNode* base,
                               ValaCodeGenerator* codegen)
{
	ValaWithStatement * self;
	ValaExpression* _tmp0_;
	ValaExpression* _tmp1_;
	ValaSymbol* _tmp2_;
	ValaSymbol* _tmp3_;
	ValaLocalVariable* _tmp4_;
	ValaBlock* _tmp7_;
	ValaBlock* _tmp8_;
	self = (ValaWithStatement*) base;
	g_return_if_fail (codegen != NULL);
	_tmp0_ = vala_with_statement_get_expression (self);
	_tmp1_ = _tmp0_;
	_tmp2_ = vala_expression_get_symbol_reference (_tmp1_);
	_tmp3_ = _tmp2_;
	_tmp4_ = self->priv->_with_variable;
	if (_tmp3_ == G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, VALA_TYPE_SYMBOL, ValaSymbol)) {
		ValaExpression* _tmp5_;
		ValaExpression* _tmp6_;
		_tmp5_ = vala_with_statement_get_expression (self);
		_tmp6_ = _tmp5_;
		vala_code_node_emit ((ValaCodeNode*) _tmp6_, codegen);
	}
	_tmp7_ = vala_with_statement_get_body (self);
	_tmp8_ = _tmp7_;
	vala_code_node_emit ((ValaCodeNode*) _tmp8_, codegen);
}

static void
vala_with_statement_real_get_error_types (ValaCodeNode* base,
                                          ValaCollection* collection,
                                          ValaSourceReference* source_reference)
{
	ValaWithStatement * self;
	ValaExpression* _tmp2_;
	ValaExpression* _tmp3_;
	ValaBlock* _tmp4_;
	ValaBlock* _tmp5_;
	self = (ValaWithStatement*) base;
	g_return_if_fail (collection != NULL);
	if (source_reference == NULL) {
		ValaSourceReference* _tmp0_;
		ValaSourceReference* _tmp1_;
		_tmp0_ = vala_code_node_get_source_reference ((ValaCodeNode*) self);
		_tmp1_ = _tmp0_;
		source_reference = _tmp1_;
	}
	_tmp2_ = vala_with_statement_get_expression (self);
	_tmp3_ = _tmp2_;
	vala_code_node_get_error_types ((ValaCodeNode*) _tmp3_, collection, source_reference);
	_tmp4_ = vala_with_statement_get_body (self);
	_tmp5_ = _tmp4_;
	vala_code_node_get_error_types ((ValaCodeNode*) _tmp5_, collection, source_reference);
}

static void
vala_with_statement_real_get_defined_variables (ValaCodeNode* base,
                                                ValaCollection* collection)
{
	ValaWithStatement * self;
	ValaExpression* _tmp0_;
	ValaExpression* _tmp1_;
	ValaSymbol* _tmp2_;
	ValaSymbol* _tmp3_;
	ValaLocalVariable* _tmp4_;
	self = (ValaWithStatement*) base;
	g_return_if_fail (collection != NULL);
	_tmp0_ = vala_with_statement_get_expression (self);
	_tmp1_ = _tmp0_;
	_tmp2_ = vala_expression_get_symbol_reference (_tmp1_);
	_tmp3_ = _tmp2_;
	_tmp4_ = self->priv->_with_variable;
	if (_tmp3_ != G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, VALA_TYPE_SYMBOL, ValaSymbol)) {
		ValaLocalVariable* _tmp5_;
		_tmp5_ = self->priv->_with_variable;
		vala_collection_add (collection, (ValaVariable*) _tmp5_);
	}
}

static void
vala_with_statement_class_init (ValaWithStatementClass * klass,
                                gpointer klass_data)
{
	vala_with_statement_parent_class = g_type_class_peek_parent (klass);
	((ValaCodeNodeClass *) klass)->finalize = vala_with_statement_finalize;
	g_type_class_adjust_private_offset (klass, &ValaWithStatement_private_offset);
	((ValaCodeNodeClass *) klass)->accept = (void (*) (ValaCodeNode*, ValaCodeVisitor*)) vala_with_statement_real_accept;
	((ValaCodeNodeClass *) klass)->accept_children = (void (*) (ValaCodeNode*, ValaCodeVisitor*)) vala_with_statement_real_accept_children;
	((ValaCodeNodeClass *) klass)->check = (gboolean (*) (ValaCodeNode*, ValaCodeContext*)) vala_with_statement_real_check;
	((ValaCodeNodeClass *) klass)->emit = (void (*) (ValaCodeNode*, ValaCodeGenerator*)) vala_with_statement_real_emit;
	((ValaCodeNodeClass *) klass)->get_error_types = (void (*) (ValaCodeNode*, ValaCollection*, ValaSourceReference*)) vala_with_statement_real_get_error_types;
	((ValaCodeNodeClass *) klass)->get_defined_variables = (void (*) (ValaCodeNode*, ValaCollection*)) vala_with_statement_real_get_defined_variables;
}

static void
vala_with_statement_instance_init (ValaWithStatement * self,
                                   gpointer klass)
{
	self->priv = vala_with_statement_get_instance_private (self);
}

static void
vala_with_statement_finalize (ValaCodeNode * obj)
{
	ValaWithStatement * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, VALA_TYPE_WITH_STATEMENT, ValaWithStatement);
	_vala_code_node_unref0 (self->priv->_with_variable);
	_vala_code_node_unref0 (self->priv->_expression);
	_vala_code_node_unref0 (self->priv->_body);
	VALA_CODE_NODE_CLASS (vala_with_statement_parent_class)->finalize (obj);
}

static GType
vala_with_statement_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (ValaWithStatementClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) vala_with_statement_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ValaWithStatement), 0, (GInstanceInitFunc) vala_with_statement_instance_init, NULL };
	GType vala_with_statement_type_id;
	vala_with_statement_type_id = g_type_register_static (VALA_TYPE_BLOCK, "ValaWithStatement", &g_define_type_info, 0);
	ValaWithStatement_private_offset = g_type_add_instance_private (vala_with_statement_type_id, sizeof (ValaWithStatementPrivate));
	return vala_with_statement_type_id;
}

GType
vala_with_statement_get_type (void)
{
	static volatile gsize vala_with_statement_type_id__once = 0;
	if (g_once_init_enter (&vala_with_statement_type_id__once)) {
		GType vala_with_statement_type_id;
		vala_with_statement_type_id = vala_with_statement_get_type_once ();
		g_once_init_leave (&vala_with_statement_type_id__once, vala_with_statement_type_id);
	}
	return vala_with_statement_type_id__once;
}

