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

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

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

 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
 *
 * Author:
 * 	Jamie McCracken jamiemcc gnome org
 */

#include <glib.h>
#include <glib-object.h>
#include <stdlib.h>
#include <string.h>
#include <gobject/gvaluecollector.h>


#define VALA_GENIE_TYPE_SCANNER (vala_genie_scanner_get_type ())
#define VALA_GENIE_SCANNER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALA_GENIE_TYPE_SCANNER, ValaGenieScanner))
#define VALA_GENIE_SCANNER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VALA_GENIE_TYPE_SCANNER, ValaGenieScannerClass))
#define VALA_GENIE_IS_SCANNER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VALA_GENIE_TYPE_SCANNER))
#define VALA_GENIE_IS_SCANNER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VALA_GENIE_TYPE_SCANNER))
#define VALA_GENIE_SCANNER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VALA_GENIE_TYPE_SCANNER, ValaGenieScannerClass))

typedef struct _ValaGenieScanner ValaGenieScanner;
typedef struct _ValaGenieScannerClass ValaGenieScannerClass;
typedef struct _ValaGenieScannerPrivate ValaGenieScannerPrivate;

#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_GENIE_TYPE_TOKEN_TYPE (vala_genie_token_type_get_type ())

#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_GENIE_SCANNER_TYPE_CONDITIONAL (vala_genie_scanner_conditional_get_type ())
typedef struct _ValaGenieScannerConditional ValaGenieScannerConditional;

#define VALA_GENIE_SCANNER_TYPE_STATE (vala_genie_scanner_state_get_type ())
#define _vala_source_file_unref0(var) ((var == NULL) ? NULL : (var = (vala_source_file_unref (var), NULL)))
#define _vala_comment_unref0(var) ((var == NULL) ? NULL : (var = (vala_comment_unref (var), NULL)))

#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_TYPE_SOURCE_LOCATION (vala_source_location_get_type ())
typedef struct _ValaSourceLocation ValaSourceLocation;
#define _vala_source_reference_unref0(var) ((var == NULL) ? NULL : (var = (vala_source_reference_unref (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))

#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;
typedef struct _ValaGenieParamSpecScanner ValaGenieParamSpecScanner;

struct _ValaGenieScanner {
	GTypeInstance parent_instance;
	volatile int ref_count;
	ValaGenieScannerPrivate * priv;
};

struct _ValaGenieScannerClass {
	GTypeClass parent_class;
	void (*finalize) (ValaGenieScanner *self);
};

typedef enum  {
	VALA_GENIE_TOKEN_TYPE_NONE,
	VALA_GENIE_TOKEN_TYPE_ABSTRACT,
	VALA_GENIE_TOKEN_TYPE_ARRAY,
	VALA_GENIE_TOKEN_TYPE_AS,
	VALA_GENIE_TOKEN_TYPE_ASSERT,
	VALA_GENIE_TOKEN_TYPE_ASSIGN,
	VALA_GENIE_TOKEN_TYPE_ASSIGN_ADD,
	VALA_GENIE_TOKEN_TYPE_ASSIGN_BITWISE_AND,
	VALA_GENIE_TOKEN_TYPE_ASSIGN_BITWISE_OR,
	VALA_GENIE_TOKEN_TYPE_ASSIGN_BITWISE_XOR,
	VALA_GENIE_TOKEN_TYPE_ASSIGN_DIV,
	VALA_GENIE_TOKEN_TYPE_ASSIGN_MUL,
	VALA_GENIE_TOKEN_TYPE_ASSIGN_PERCENT,
	VALA_GENIE_TOKEN_TYPE_ASSIGN_SHIFT_LEFT,
	VALA_GENIE_TOKEN_TYPE_ASSIGN_SUB,
	VALA_GENIE_TOKEN_TYPE_ASYNC,
	VALA_GENIE_TOKEN_TYPE_BITWISE_AND,
	VALA_GENIE_TOKEN_TYPE_BITWISE_OR,
	VALA_GENIE_TOKEN_TYPE_BREAK,
	VALA_GENIE_TOKEN_TYPE_CARRET,
	VALA_GENIE_TOKEN_TYPE_CASE,
	VALA_GENIE_TOKEN_TYPE_CHARACTER_LITERAL,
	VALA_GENIE_TOKEN_TYPE_CLASS,
	VALA_GENIE_TOKEN_TYPE_CLOSE_BRACE,
	VALA_GENIE_TOKEN_TYPE_CLOSE_BRACKET,
	VALA_GENIE_TOKEN_TYPE_CLOSE_PARENS,
	VALA_GENIE_TOKEN_TYPE_CLOSE_REGEX_LITERAL,
	VALA_GENIE_TOKEN_TYPE_CLOSE_TEMPLATE,
	VALA_GENIE_TOKEN_TYPE_COLON,
	VALA_GENIE_TOKEN_TYPE_COMMA,
	VALA_GENIE_TOKEN_TYPE_CONST,
	VALA_GENIE_TOKEN_TYPE_CONSTRUCT,
	VALA_GENIE_TOKEN_TYPE_CONTINUE,
	VALA_GENIE_TOKEN_TYPE_DEDENT,
	VALA_GENIE_TOKEN_TYPE_DEF,
	VALA_GENIE_TOKEN_TYPE_DEFAULT,
	VALA_GENIE_TOKEN_TYPE_DELEGATE,
	VALA_GENIE_TOKEN_TYPE_DELETE,
	VALA_GENIE_TOKEN_TYPE_DICT,
	VALA_GENIE_TOKEN_TYPE_DIV,
	VALA_GENIE_TOKEN_TYPE_DO,
	VALA_GENIE_TOKEN_TYPE_DOT,
	VALA_GENIE_TOKEN_TYPE_DOWNTO,
	VALA_GENIE_TOKEN_TYPE_DYNAMIC,
	VALA_GENIE_TOKEN_TYPE_ELLIPSIS,
	VALA_GENIE_TOKEN_TYPE_ELSE,
	VALA_GENIE_TOKEN_TYPE_ENUM,
	VALA_GENIE_TOKEN_TYPE_ENSURES,
	VALA_GENIE_TOKEN_TYPE_ERRORDOMAIN,
	VALA_GENIE_TOKEN_TYPE_EOF,
	VALA_GENIE_TOKEN_TYPE_EOL,
	VALA_GENIE_TOKEN_TYPE_EVENT,
	VALA_GENIE_TOKEN_TYPE_EXCEPT,
	VALA_GENIE_TOKEN_TYPE_EXTERN,
	VALA_GENIE_TOKEN_TYPE_FALSE,
	VALA_GENIE_TOKEN_TYPE_FINAL,
	VALA_GENIE_TOKEN_TYPE_FINALLY,
	VALA_GENIE_TOKEN_TYPE_FOR,
	VALA_GENIE_TOKEN_TYPE_GET,
	VALA_GENIE_TOKEN_TYPE_HASH,
	VALA_GENIE_TOKEN_TYPE_IDENTIFIER,
	VALA_GENIE_TOKEN_TYPE_IF,
	VALA_GENIE_TOKEN_TYPE_IMPLEMENTS,
	VALA_GENIE_TOKEN_TYPE_IN,
	VALA_GENIE_TOKEN_TYPE_INDENT,
	VALA_GENIE_TOKEN_TYPE_INIT,
	VALA_GENIE_TOKEN_TYPE_INLINE,
	VALA_GENIE_TOKEN_TYPE_INTEGER_LITERAL,
	VALA_GENIE_TOKEN_TYPE_INTERFACE,
	VALA_GENIE_TOKEN_TYPE_INTERNAL,
	VALA_GENIE_TOKEN_TYPE_INTERR,
	VALA_GENIE_TOKEN_TYPE_IS,
	VALA_GENIE_TOKEN_TYPE_ISA,
	VALA_GENIE_TOKEN_TYPE_LAMBDA,
	VALA_GENIE_TOKEN_TYPE_LIST,
	VALA_GENIE_TOKEN_TYPE_LOCK,
	VALA_GENIE_TOKEN_TYPE_MINUS,
	VALA_GENIE_TOKEN_TYPE_NAMESPACE,
	VALA_GENIE_TOKEN_TYPE_NEW,
	VALA_GENIE_TOKEN_TYPE_NULL,
	VALA_GENIE_TOKEN_TYPE_OF,
	VALA_GENIE_TOKEN_TYPE_OUT,
	VALA_GENIE_TOKEN_TYPE_OP_AND,
	VALA_GENIE_TOKEN_TYPE_OP_DEC,
	VALA_GENIE_TOKEN_TYPE_OP_EQ,
	VALA_GENIE_TOKEN_TYPE_OP_GE,
	VALA_GENIE_TOKEN_TYPE_OP_GT,
	VALA_GENIE_TOKEN_TYPE_OP_INC,
	VALA_GENIE_TOKEN_TYPE_OP_LE,
	VALA_GENIE_TOKEN_TYPE_OP_LT,
	VALA_GENIE_TOKEN_TYPE_OP_NE,
	VALA_GENIE_TOKEN_TYPE_OP_NEG,
	VALA_GENIE_TOKEN_TYPE_OP_OR,
	VALA_GENIE_TOKEN_TYPE_OP_PTR,
	VALA_GENIE_TOKEN_TYPE_OP_SHIFT_LEFT,
	VALA_GENIE_TOKEN_TYPE_OPEN_BRACE,
	VALA_GENIE_TOKEN_TYPE_OPEN_BRACKET,
	VALA_GENIE_TOKEN_TYPE_OPEN_PARENS,
	VALA_GENIE_TOKEN_TYPE_OPEN_REGEX_LITERAL,
	VALA_GENIE_TOKEN_TYPE_OPEN_TEMPLATE,
	VALA_GENIE_TOKEN_TYPE_OVERRIDE,
	VALA_GENIE_TOKEN_TYPE_OWNED,
	VALA_GENIE_TOKEN_TYPE_PARAMS,
	VALA_GENIE_TOKEN_TYPE_PASS,
	VALA_GENIE_TOKEN_TYPE_PERCENT,
	VALA_GENIE_TOKEN_TYPE_PLUS,
	VALA_GENIE_TOKEN_TYPE_PRINT,
	VALA_GENIE_TOKEN_TYPE_PRIVATE,
	VALA_GENIE_TOKEN_TYPE_PROP,
	VALA_GENIE_TOKEN_TYPE_PROTECTED,
	VALA_GENIE_TOKEN_TYPE_PUBLIC,
	VALA_GENIE_TOKEN_TYPE_RAISE,
	VALA_GENIE_TOKEN_TYPE_RAISES,
	VALA_GENIE_TOKEN_TYPE_READONLY,
	VALA_GENIE_TOKEN_TYPE_REAL_LITERAL,
	VALA_GENIE_TOKEN_TYPE_REF,
	VALA_GENIE_TOKEN_TYPE_REGEX_LITERAL,
	VALA_GENIE_TOKEN_TYPE_REQUIRES,
	VALA_GENIE_TOKEN_TYPE_RETURN,
	VALA_GENIE_TOKEN_TYPE_SEALED,
	VALA_GENIE_TOKEN_TYPE_SEMICOLON,
	VALA_GENIE_TOKEN_TYPE_SET,
	VALA_GENIE_TOKEN_TYPE_SIZEOF,
	VALA_GENIE_TOKEN_TYPE_STAR,
	VALA_GENIE_TOKEN_TYPE_STATIC,
	VALA_GENIE_TOKEN_TYPE_STRING_LITERAL,
	VALA_GENIE_TOKEN_TYPE_STRUCT,
	VALA_GENIE_TOKEN_TYPE_SUPER,
	VALA_GENIE_TOKEN_TYPE_TEMPLATE_STRING_LITERAL,
	VALA_GENIE_TOKEN_TYPE_THIS,
	VALA_GENIE_TOKEN_TYPE_TILDE,
	VALA_GENIE_TOKEN_TYPE_TO,
	VALA_GENIE_TOKEN_TYPE_TRUE,
	VALA_GENIE_TOKEN_TYPE_TRY,
	VALA_GENIE_TOKEN_TYPE_TYPEOF,
	VALA_GENIE_TOKEN_TYPE_UNOWNED,
	VALA_GENIE_TOKEN_TYPE_USES,
	VALA_GENIE_TOKEN_TYPE_VAR,
	VALA_GENIE_TOKEN_TYPE_VERBATIM_STRING_LITERAL,
	VALA_GENIE_TOKEN_TYPE_VIRTUAL,
	VALA_GENIE_TOKEN_TYPE_VOID,
	VALA_GENIE_TOKEN_TYPE_VOLATILE,
	VALA_GENIE_TOKEN_TYPE_WEAK,
	VALA_GENIE_TOKEN_TYPE_WHEN,
	VALA_GENIE_TOKEN_TYPE_WHILE,
	VALA_GENIE_TOKEN_TYPE_WRITEONLY,
	VALA_GENIE_TOKEN_TYPE_YIELD
} ValaGenieTokenType;

struct _ValaGenieScannerConditional {
	gboolean matched;
	gboolean else_found;
	gboolean skip_section;
};

typedef enum  {
	VALA_GENIE_SCANNER_STATE_PARENS,
	VALA_GENIE_SCANNER_STATE_BRACE,
	VALA_GENIE_SCANNER_STATE_BRACKET,
	VALA_GENIE_SCANNER_STATE_REGEX_LITERAL,
	VALA_GENIE_SCANNER_STATE_TEMPLATE,
	VALA_GENIE_SCANNER_STATE_TEMPLATE_PART
} ValaGenieScannerState;

struct _ValaGenieScannerPrivate {
	ValaSourceFile* _source_file;
	gint _indent_spaces;
	gchar* begin;
	gchar* current;
	gchar* end;
	gint line;
	gint column;
	gint current_indent_level;
	gint indent_level;
	gint pending_dedents;
	gint open_parens_count;
	gint open_brace_count;
	ValaGenieTokenType last_token;
	gboolean parse_started;
	ValaComment* _comment;
	ValaGenieScannerConditional* conditional_stack;
	gint conditional_stack_length1;
	gint _conditional_stack_size_;
	ValaGenieScannerState* state_stack;
	gint state_stack_length1;
	gint _state_stack_size_;
};

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

struct _ValaGenieParamSpecScanner {
	GParamSpec parent_instance;
};


static gpointer vala_genie_scanner_parent_class = NULL;

gpointer vala_genie_scanner_ref (gpointer instance);
void vala_genie_scanner_unref (gpointer instance);
GParamSpec* vala_genie_param_spec_scanner (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void vala_genie_value_set_scanner (GValue* value, gpointer v_object);
void vala_genie_value_take_scanner (GValue* value, gpointer v_object);
gpointer vala_genie_value_get_scanner (const GValue* value);
GType vala_genie_scanner_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;
GType vala_genie_token_type_get_type (void) G_GNUC_CONST;
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;
static GType vala_genie_scanner_conditional_get_type (void) G_GNUC_CONST G_GNUC_UNUSED;
static ValaGenieScannerConditional* vala_genie_scanner_conditional_dup (const ValaGenieScannerConditional* self);
static void vala_genie_scanner_conditional_free (ValaGenieScannerConditional* self);
static GType vala_genie_scanner_state_get_type (void) G_GNUC_CONST G_GNUC_UNUSED;
#define VALA_GENIE_SCANNER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), VALA_GENIE_TYPE_SCANNER, ValaGenieScannerPrivate))
enum  {
	VALA_GENIE_SCANNER_DUMMY_PROPERTY
};
ValaGenieScanner* vala_genie_scanner_new (ValaSourceFile* source_file);
ValaGenieScanner* vala_genie_scanner_construct (GType object_type, ValaSourceFile* source_file);
static void vala_genie_scanner_set_source_file (ValaGenieScanner* self, ValaSourceFile* value);
gchar* vala_source_file_get_mapped_contents (ValaSourceFile* self);
gsize vala_source_file_get_mapped_length (ValaSourceFile* self);
static gboolean vala_genie_scanner_in_template (ValaGenieScanner* self);
static gboolean vala_genie_scanner_in_template_part (ValaGenieScanner* self);
static gboolean vala_genie_scanner_is_ident_char (ValaGenieScanner* self, gchar c);
static gboolean vala_genie_scanner_in_regex_literal (ValaGenieScanner* self);
gpointer vala_source_reference_ref (gpointer instance);
void vala_source_reference_unref (gpointer instance);
GParamSpec* vala_param_spec_source_reference (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void vala_value_set_source_reference (GValue* value, gpointer v_object);
void vala_value_take_source_reference (GValue* value, gpointer v_object);
gpointer vala_value_get_source_reference (const GValue* value);
GType vala_source_reference_get_type (void) G_GNUC_CONST;
static ValaSourceReference* vala_genie_scanner_get_source_reference (ValaGenieScanner* self, gint offset, gint length);
ValaSourceFile* vala_genie_scanner_get_source_file (ValaGenieScanner* self);
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);
void vala_source_location_init (ValaSourceLocation *self, gchar* _pos, gint _line, gint _column);
ValaSourceReference* vala_source_reference_new (ValaSourceFile* _file, ValaSourceLocation* begin, ValaSourceLocation* end);
ValaSourceReference* vala_source_reference_construct (GType object_type, ValaSourceFile* _file, ValaSourceLocation* begin, ValaSourceLocation* end);
ValaGenieTokenType vala_genie_scanner_read_regex_token (ValaGenieScanner* self, ValaSourceLocation* token_begin, ValaSourceLocation* token_end);
void vala_report_error (ValaSourceReference* source, const gchar* message);
ValaGenieTokenType vala_genie_scanner_read_token (ValaGenieScanner* self, ValaSourceLocation* token_begin, ValaSourceLocation* token_end);
void vala_genie_scanner_seek (ValaGenieScanner* self, ValaSourceLocation* location);
ValaGenieTokenType vala_genie_scanner_get_identifier_or_keyword (gchar* begin, gint len);
static gboolean vala_genie_scanner_matches (gchar* begin, const gchar* keyword);
ValaGenieTokenType vala_genie_scanner_read_template_token (ValaGenieScanner* self, ValaSourceLocation* token_begin, ValaSourceLocation* token_end);
static void _vala_array_add2 (ValaGenieScannerState* * array, int* length, int* size, ValaGenieScannerState value);
static void _vala_array_add3 (ValaGenieScannerState* * array, int* length, int* size, ValaGenieScannerState value);
static void _vala_array_add4 (ValaGenieScannerState* * array, int* length, int* size, ValaGenieScannerState value);
static void _vala_array_add5 (ValaGenieScannerState* * array, int* length, int* size, ValaGenieScannerState value);
static void vala_genie_scanner_space (ValaGenieScanner* self);
static void vala_genie_scanner_skip_space_tabs (ValaGenieScanner* self);
static inline gboolean vala_genie_scanner_newline (ValaGenieScanner* self);
static gboolean vala_genie_scanner_skip_newlines (ValaGenieScanner* self);
static gint vala_genie_scanner_count_tabs (ValaGenieScanner* self);
static void _vala_array_add6 (ValaGenieScannerState* * array, int* length, int* size, ValaGenieScannerState value);
static void _vala_array_add7 (ValaGenieScannerState* * array, int* length, int* size, ValaGenieScannerState value);
static void _vala_array_add8 (ValaGenieScannerState* * array, int* length, int* size, ValaGenieScannerState value);
static void _vala_array_add9 (ValaGenieScannerState* * array, int* length, int* size, ValaGenieScannerState value);
static void _vala_array_add10 (ValaGenieScannerState* * array, int* length, int* size, ValaGenieScannerState value);
static gboolean vala_genie_scanner_whitespace (ValaGenieScanner* self);
static void vala_genie_scanner_pp_directive (ValaGenieScanner* self);
static gboolean vala_genie_scanner_comment (ValaGenieScanner* self, gboolean file_comment);
static void vala_genie_scanner_push_comment (ValaGenieScanner* self, const gchar* comment_item, ValaSourceReference* source_reference, gboolean file_comment);
static gboolean vala_genie_scanner_skip_tabs (ValaGenieScanner* self);
void vala_genie_scanner_parse_file_comments (ValaGenieScanner* self);
void vala_source_file_add_comment (ValaSourceFile* self, ValaComment* comment);
ValaComment* vala_comment_new (const gchar* comment, ValaSourceReference* _source_reference);
ValaComment* vala_comment_construct (GType object_type, const gchar* comment, ValaSourceReference* _source_reference);
ValaComment* vala_genie_scanner_pop_comment (ValaGenieScanner* self);
static gboolean vala_genie_scanner_pp_whitespace (ValaGenieScanner* self);
static void vala_genie_scanner_pp_space (ValaGenieScanner* self);
static void vala_genie_scanner_parse_pp_if (ValaGenieScanner* self);
static void vala_genie_scanner_parse_pp_elif (ValaGenieScanner* self);
static void vala_genie_scanner_parse_pp_else (ValaGenieScanner* self);
static void vala_genie_scanner_parse_pp_endif (ValaGenieScanner* self);
static void vala_genie_scanner_pp_eol (ValaGenieScanner* self);
static gboolean vala_genie_scanner_parse_pp_expression (ValaGenieScanner* self);
static void _vala_array_add11 (ValaGenieScannerConditional* * array, int* length, int* size, const ValaGenieScannerConditional* value);
static gboolean vala_genie_scanner_parse_pp_symbol (ValaGenieScanner* self);
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;
ValaCodeContext* vala_source_file_get_context (ValaSourceFile* self);
gboolean vala_code_context_is_defined (ValaCodeContext* self, const gchar* define);
static gboolean vala_genie_scanner_parse_pp_primary_expression (ValaGenieScanner* self);
static gboolean vala_genie_scanner_parse_pp_unary_expression (ValaGenieScanner* self);
static gboolean vala_genie_scanner_parse_pp_equality_expression (ValaGenieScanner* self);
static gboolean vala_genie_scanner_parse_pp_and_expression (ValaGenieScanner* self);
static gboolean vala_genie_scanner_parse_pp_or_expression (ValaGenieScanner* self);
gint vala_genie_scanner_get_indent_spaces (ValaGenieScanner* self);
void vala_genie_scanner_set_indent_spaces (ValaGenieScanner* self, gint value);
static void vala_genie_scanner_finalize (ValaGenieScanner * obj);


static GType vala_genie_scanner_state_get_type (void) {
	static volatile gsize vala_genie_scanner_state_type_id__volatile = 0;
	if (g_once_init_enter (&vala_genie_scanner_state_type_id__volatile)) {
		static const GEnumValue values[] = {{VALA_GENIE_SCANNER_STATE_PARENS, "VALA_GENIE_SCANNER_STATE_PARENS", "parens"}, {VALA_GENIE_SCANNER_STATE_BRACE, "VALA_GENIE_SCANNER_STATE_BRACE", "brace"}, {VALA_GENIE_SCANNER_STATE_BRACKET, "VALA_GENIE_SCANNER_STATE_BRACKET", "bracket"}, {VALA_GENIE_SCANNER_STATE_REGEX_LITERAL, "VALA_GENIE_SCANNER_STATE_REGEX_LITERAL", "regex-literal"}, {VALA_GENIE_SCANNER_STATE_TEMPLATE, "VALA_GENIE_SCANNER_STATE_TEMPLATE", "template"}, {VALA_GENIE_SCANNER_STATE_TEMPLATE_PART, "VALA_GENIE_SCANNER_STATE_TEMPLATE_PART", "template-part"}, {0, NULL, NULL}};
		GType vala_genie_scanner_state_type_id;
		vala_genie_scanner_state_type_id = g_enum_register_static ("ValaGenieScannerState", values);
		g_once_init_leave (&vala_genie_scanner_state_type_id__volatile, vala_genie_scanner_state_type_id);
	}
	return vala_genie_scanner_state_type_id__volatile;
}


ValaGenieScanner* vala_genie_scanner_construct (GType object_type, ValaSourceFile* source_file) {
	ValaGenieScanner* self = NULL;
	ValaSourceFile* _tmp0_;
	ValaSourceFile* _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
	ValaSourceFile* _tmp4_;
	gsize _tmp5_;
	gchar* _tmp6_;
	g_return_val_if_fail (source_file != NULL, NULL);
	self = (ValaGenieScanner*) g_type_create_instance (object_type);
	_tmp0_ = source_file;
	vala_genie_scanner_set_source_file (self, _tmp0_);
	_tmp1_ = source_file;
	_tmp2_ = vala_source_file_get_mapped_contents (_tmp1_);
	self->priv->begin = _tmp2_;
	_tmp3_ = self->priv->begin;
	_tmp4_ = source_file;
	_tmp5_ = vala_source_file_get_mapped_length (_tmp4_);
	self->priv->end = _tmp3_ + _tmp5_;
	_tmp6_ = self->priv->begin;
	self->priv->current = _tmp6_;
	self->priv->_indent_spaces = 0;
	self->priv->line = 1;
	self->priv->column = 1;
	self->priv->current_indent_level = 0;
	self->priv->indent_level = 0;
	self->priv->pending_dedents = 0;
	self->priv->open_parens_count = 0;
	self->priv->open_brace_count = 0;
	self->priv->parse_started = FALSE;
	self->priv->last_token = VALA_GENIE_TOKEN_TYPE_NONE;
	return self;
}


ValaGenieScanner* vala_genie_scanner_new (ValaSourceFile* source_file) {
	return vala_genie_scanner_construct (VALA_GENIE_TYPE_SCANNER, source_file);
}


static gboolean vala_genie_scanner_in_template (ValaGenieScanner* self) {
	gboolean result = FALSE;
	gboolean _tmp0_ = FALSE;
	ValaGenieScannerState* _tmp1_;
	gint _tmp1__length1;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp1_ = self->priv->state_stack;
	_tmp1__length1 = self->priv->state_stack_length1;
	if (_tmp1__length1 > 0) {
		ValaGenieScannerState* _tmp2_;
		gint _tmp2__length1;
		ValaGenieScannerState* _tmp3_;
		gint _tmp3__length1;
		ValaGenieScannerState _tmp4_;
		_tmp2_ = self->priv->state_stack;
		_tmp2__length1 = self->priv->state_stack_length1;
		_tmp3_ = self->priv->state_stack;
		_tmp3__length1 = self->priv->state_stack_length1;
		_tmp4_ = _tmp2_[_tmp3__length1 - 1];
		_tmp0_ = _tmp4_ == VALA_GENIE_SCANNER_STATE_TEMPLATE;
	} else {
		_tmp0_ = FALSE;
	}
	result = _tmp0_;
	return result;
}


static gboolean vala_genie_scanner_in_template_part (ValaGenieScanner* self) {
	gboolean result = FALSE;
	gboolean _tmp0_ = FALSE;
	ValaGenieScannerState* _tmp1_;
	gint _tmp1__length1;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp1_ = self->priv->state_stack;
	_tmp1__length1 = self->priv->state_stack_length1;
	if (_tmp1__length1 > 0) {
		ValaGenieScannerState* _tmp2_;
		gint _tmp2__length1;
		ValaGenieScannerState* _tmp3_;
		gint _tmp3__length1;
		ValaGenieScannerState _tmp4_;
		_tmp2_ = self->priv->state_stack;
		_tmp2__length1 = self->priv->state_stack_length1;
		_tmp3_ = self->priv->state_stack;
		_tmp3__length1 = self->priv->state_stack_length1;
		_tmp4_ = _tmp2_[_tmp3__length1 - 1];
		_tmp0_ = _tmp4_ == VALA_GENIE_SCANNER_STATE_TEMPLATE_PART;
	} else {
		_tmp0_ = FALSE;
	}
	result = _tmp0_;
	return result;
}


static gboolean vala_genie_scanner_is_ident_char (ValaGenieScanner* self, gchar c) {
	gboolean result = FALSE;
	gboolean _tmp0_ = FALSE;
	gchar _tmp1_;
	gboolean _tmp2_;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp1_ = c;
	_tmp2_ = g_ascii_isalnum (_tmp1_);
	if (_tmp2_) {
		_tmp0_ = TRUE;
	} else {
		gchar _tmp3_;
		_tmp3_ = c;
		_tmp0_ = _tmp3_ == '_';
	}
	result = _tmp0_;
	return result;
}


static gboolean vala_genie_scanner_in_regex_literal (ValaGenieScanner* self) {
	gboolean result = FALSE;
	gboolean _tmp0_ = FALSE;
	ValaGenieScannerState* _tmp1_;
	gint _tmp1__length1;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp1_ = self->priv->state_stack;
	_tmp1__length1 = self->priv->state_stack_length1;
	if (_tmp1__length1 > 0) {
		ValaGenieScannerState* _tmp2_;
		gint _tmp2__length1;
		ValaGenieScannerState* _tmp3_;
		gint _tmp3__length1;
		ValaGenieScannerState _tmp4_;
		_tmp2_ = self->priv->state_stack;
		_tmp2__length1 = self->priv->state_stack_length1;
		_tmp3_ = self->priv->state_stack;
		_tmp3__length1 = self->priv->state_stack_length1;
		_tmp4_ = _tmp2_[_tmp3__length1 - 1];
		_tmp0_ = _tmp4_ == VALA_GENIE_SCANNER_STATE_REGEX_LITERAL;
	} else {
		_tmp0_ = FALSE;
	}
	result = _tmp0_;
	return result;
}


static ValaSourceReference* vala_genie_scanner_get_source_reference (ValaGenieScanner* self, gint offset, gint length) {
	ValaSourceReference* result = NULL;
	ValaSourceFile* _tmp0_;
	gchar* _tmp1_;
	gint _tmp2_;
	gint _tmp3_;
	gint _tmp4_;
	ValaSourceLocation _tmp5_ = {0};
	gchar* _tmp6_;
	gint _tmp7_;
	gint _tmp8_;
	gint _tmp9_;
	gint _tmp10_;
	gint _tmp11_;
	ValaSourceLocation _tmp12_ = {0};
	ValaSourceReference* _tmp13_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_source_file;
	_tmp1_ = self->priv->current;
	_tmp2_ = self->priv->line;
	_tmp3_ = self->priv->column;
	_tmp4_ = offset;
	vala_source_location_init (&_tmp5_, _tmp1_, _tmp2_, _tmp3_ + _tmp4_);
	_tmp6_ = self->priv->current;
	_tmp7_ = length;
	_tmp8_ = self->priv->line;
	_tmp9_ = self->priv->column;
	_tmp10_ = offset;
	_tmp11_ = length;
	vala_source_location_init (&_tmp12_, _tmp6_ + _tmp7_, _tmp8_, (_tmp9_ + _tmp10_) + _tmp11_);
	_tmp13_ = vala_source_reference_new (_tmp0_, &_tmp5_, &_tmp12_);
	result = _tmp13_;
	return result;
}


ValaGenieTokenType vala_genie_scanner_read_regex_token (ValaGenieScanner* self, ValaSourceLocation* token_begin, ValaSourceLocation* token_end) {
	ValaSourceLocation _vala_token_begin = {0};
	ValaSourceLocation _vala_token_end = {0};
	ValaGenieTokenType result = 0;
	ValaGenieTokenType type = 0;
	gchar* begin = NULL;
	gchar* _tmp0_;
	gchar* _tmp1_;
	gint _tmp2_;
	gint _tmp3_;
	gint token_length_in_chars = 0;
	gchar* _tmp4_;
	gchar* _tmp5_;
	gint _tmp96_;
	gchar* _tmp102_;
	gint _tmp103_;
	gint _tmp104_;
	g_return_val_if_fail (self != NULL, 0);
	_tmp0_ = self->priv->current;
	begin = _tmp0_;
	_tmp1_ = begin;
	_tmp2_ = self->priv->line;
	_tmp3_ = self->priv->column;
	vala_source_location_init (&_vala_token_begin, _tmp1_, _tmp2_, _tmp3_);
	token_length_in_chars = -1;
	_tmp4_ = self->priv->current;
	_tmp5_ = self->priv->end;
	if (_tmp4_ >= _tmp5_) {
		type = VALA_GENIE_TOKEN_TYPE_EOF;
	} else {
		gchar* _tmp6_;
		gchar _tmp7_;
		_tmp6_ = self->priv->current;
		_tmp7_ = _tmp6_[0];
		switch (_tmp7_) {
			case '/':
			{
				gchar* _tmp8_;
				gint _tmp9_;
				gboolean fl_i = FALSE;
				gboolean fl_s = FALSE;
				gboolean fl_m = FALSE;
				gboolean fl_x = FALSE;
				type = VALA_GENIE_TOKEN_TYPE_CLOSE_REGEX_LITERAL;
				_tmp8_ = self->priv->current;
				self->priv->current = _tmp8_ + 1;
				_tmp9_ = self->priv->state_stack_length1;
				self->priv->state_stack_length1 = _tmp9_ - 1;
				fl_i = FALSE;
				fl_s = FALSE;
				fl_m = FALSE;
				fl_x = FALSE;
				while (TRUE) {
					gboolean _tmp10_ = FALSE;
					gboolean _tmp11_ = FALSE;
					gboolean _tmp12_ = FALSE;
					gchar* _tmp13_;
					gchar _tmp14_;
					gchar* _tmp21_;
					gchar _tmp22_;
					gchar* _tmp39_;
					gint _tmp40_;
					_tmp13_ = self->priv->current;
					_tmp14_ = _tmp13_[0];
					if (_tmp14_ == 'i') {
						_tmp12_ = TRUE;
					} else {
						gchar* _tmp15_;
						gchar _tmp16_;
						_tmp15_ = self->priv->current;
						_tmp16_ = _tmp15_[0];
						_tmp12_ = _tmp16_ == 's';
					}
					if (_tmp12_) {
						_tmp11_ = TRUE;
					} else {
						gchar* _tmp17_;
						gchar _tmp18_;
						_tmp17_ = self->priv->current;
						_tmp18_ = _tmp17_[0];
						_tmp11_ = _tmp18_ == 'm';
					}
					if (_tmp11_) {
						_tmp10_ = TRUE;
					} else {
						gchar* _tmp19_;
						gchar _tmp20_;
						_tmp19_ = self->priv->current;
						_tmp20_ = _tmp19_[0];
						_tmp10_ = _tmp20_ == 'x';
					}
					if (!_tmp10_) {
						break;
					}
					_tmp21_ = self->priv->current;
					_tmp22_ = _tmp21_[0];
					switch (_tmp22_) {
						case 'i':
						{
							gboolean _tmp23_;
							_tmp23_ = fl_i;
							if (_tmp23_) {
								gint _tmp24_;
								ValaSourceReference* _tmp25_;
								ValaSourceReference* _tmp26_;
								_tmp24_ = token_length_in_chars;
								_tmp25_ = vala_genie_scanner_get_source_reference (self, _tmp24_, 0);
								_tmp26_ = _tmp25_;
								vala_report_error (_tmp26_, "modifier 'i' used more than once");
								_vala_source_reference_unref0 (_tmp26_);
							}
							fl_i = TRUE;
							break;
						}
						case 's':
						{
							gboolean _tmp27_;
							_tmp27_ = fl_s;
							if (_tmp27_) {
								gint _tmp28_;
								ValaSourceReference* _tmp29_;
								ValaSourceReference* _tmp30_;
								_tmp28_ = token_length_in_chars;
								_tmp29_ = vala_genie_scanner_get_source_reference (self, _tmp28_, 0);
								_tmp30_ = _tmp29_;
								vala_report_error (_tmp30_, "modifier 's' used more than once");
								_vala_source_reference_unref0 (_tmp30_);
							}
							fl_s = TRUE;
							break;
						}
						case 'm':
						{
							gboolean _tmp31_;
							_tmp31_ = fl_m;
							if (_tmp31_) {
								gint _tmp32_;
								ValaSourceReference* _tmp33_;
								ValaSourceReference* _tmp34_;
								_tmp32_ = token_length_in_chars;
								_tmp33_ = vala_genie_scanner_get_source_reference (self, _tmp32_, 0);
								_tmp34_ = _tmp33_;
								vala_report_error (_tmp34_, "modifier 'm' used more than once");
								_vala_source_reference_unref0 (_tmp34_);
							}
							fl_m = TRUE;
							break;
						}
						case 'x':
						{
							gboolean _tmp35_;
							_tmp35_ = fl_x;
							if (_tmp35_) {
								gint _tmp36_;
								ValaSourceReference* _tmp37_;
								ValaSourceReference* _tmp38_;
								_tmp36_ = token_length_in_chars;
								_tmp37_ = vala_genie_scanner_get_source_reference (self, _tmp36_, 0);
								_tmp38_ = _tmp37_;
								vala_report_error (_tmp38_, "modifier 'x' used more than once");
								_vala_source_reference_unref0 (_tmp38_);
							}
							fl_x = TRUE;
							break;
						}
						default:
						break;
					}
					_tmp39_ = self->priv->current;
					self->priv->current = _tmp39_ + 1;
					_tmp40_ = token_length_in_chars;
					token_length_in_chars = _tmp40_ + 1;
				}
				break;
			}
			default:
			{
				gboolean _tmp84_ = FALSE;
				gchar* _tmp85_;
				gchar* _tmp86_;
				type = VALA_GENIE_TOKEN_TYPE_REGEX_LITERAL;
				token_length_in_chars = 0;
				while (TRUE) {
					gboolean _tmp41_ = FALSE;
					gchar* _tmp42_;
					gchar* _tmp43_;
					gchar* _tmp46_;
					gchar _tmp47_;
					_tmp42_ = self->priv->current;
					_tmp43_ = self->priv->end;
					if (_tmp42_ < _tmp43_) {
						gchar* _tmp44_;
						gchar _tmp45_;
						_tmp44_ = self->priv->current;
						_tmp45_ = _tmp44_[0];
						_tmp41_ = _tmp45_ != '/';
					} else {
						_tmp41_ = FALSE;
					}
					if (!_tmp41_) {
						break;
					}
					_tmp46_ = self->priv->current;
					_tmp47_ = _tmp46_[0];
					if (_tmp47_ == '\\') {
						gchar* _tmp48_;
						gint _tmp49_;
						gchar* _tmp50_;
						gchar* _tmp51_;
						gchar* _tmp52_;
						gchar _tmp53_;
						_tmp48_ = self->priv->current;
						self->priv->current = _tmp48_ + 1;
						_tmp49_ = token_length_in_chars;
						token_length_in_chars = _tmp49_ + 1;
						_tmp50_ = self->priv->current;
						_tmp51_ = self->priv->end;
						if (_tmp50_ >= _tmp51_) {
							break;
						}
						_tmp52_ = self->priv->current;
						_tmp53_ = _tmp52_[0];
						switch (_tmp53_) {
							case '\'':
							case '"':
							case '\\':
							case '/':
							case '^':
							case '$':
							case '.':
							case '[':
							case ']':
							case '{':
							case '}':
							case '(':
							case ')':
							case '?':
							case '*':
							case '+':
							case '-':
							case '#':
							case '&':
							case '~':
							case ':':
							case ';':
							case '<':
							case '>':
							case '|':
							case '%':
							case '=':
							case '@':
							case '0':
							case 'b':
							case 'B':
							case 'f':
							case 'n':
							case 'r':
							case 't':
							case 'a':
							case 'A':
							case 'p':
							case 'P':
							case 'e':
							case 'd':
							case 'D':
							case 's':
							case 'S':
							case 'w':
							case 'W':
							case 'G':
							case 'z':
							case 'Z':
							{
								gchar* _tmp54_;
								gint _tmp55_;
								_tmp54_ = self->priv->current;
								self->priv->current = _tmp54_ + 1;
								_tmp55_ = token_length_in_chars;
								token_length_in_chars = _tmp55_ + 1;
								break;
							}
							case 'x':
							{
								gchar* _tmp56_;
								gint _tmp57_;
								_tmp56_ = self->priv->current;
								self->priv->current = _tmp56_ + 1;
								_tmp57_ = token_length_in_chars;
								token_length_in_chars = _tmp57_ + 1;
								while (TRUE) {
									gboolean _tmp58_ = FALSE;
									gchar* _tmp59_;
									gchar* _tmp60_;
									gchar* _tmp64_;
									gint _tmp65_;
									_tmp59_ = self->priv->current;
									_tmp60_ = self->priv->end;
									if (_tmp59_ < _tmp60_) {
										gchar* _tmp61_;
										gchar _tmp62_;
										gboolean _tmp63_;
										_tmp61_ = self->priv->current;
										_tmp62_ = _tmp61_[0];
										_tmp63_ = g_ascii_isxdigit (_tmp62_);
										_tmp58_ = _tmp63_;
									} else {
										_tmp58_ = FALSE;
									}
									if (!_tmp58_) {
										break;
									}
									_tmp64_ = self->priv->current;
									self->priv->current = _tmp64_ + 1;
									_tmp65_ = token_length_in_chars;
									token_length_in_chars = _tmp65_ + 1;
								}
								break;
							}
							default:
							{
								gint _tmp66_;
								ValaSourceReference* _tmp67_;
								ValaSourceReference* _tmp68_;
								_tmp66_ = token_length_in_chars;
								_tmp67_ = vala_genie_scanner_get_source_reference (self, _tmp66_, 0);
								_tmp68_ = _tmp67_;
								vala_report_error (_tmp68_, "invalid escape sequence");
								_vala_source_reference_unref0 (_tmp68_);
								break;
							}
						}
					} else {
						gchar* _tmp69_;
						gchar _tmp70_;
						_tmp69_ = self->priv->current;
						_tmp70_ = _tmp69_[0];
						if (_tmp70_ == '\n') {
							break;
						} else {
							gunichar u = 0U;
							gchar* _tmp71_;
							gchar* _tmp72_;
							gchar* _tmp73_;
							gunichar _tmp74_;
							gunichar _tmp75_;
							_tmp71_ = self->priv->current;
							_tmp72_ = self->priv->end;
							_tmp73_ = self->priv->current;
							_tmp74_ = g_utf8_get_char_validated ((const gchar*) _tmp71_, (gssize) ((glong) (_tmp72_ - _tmp73_)));
							u = _tmp74_;
							_tmp75_ = u;
							if (_tmp75_ != ((gunichar) -1)) {
								gchar* _tmp76_;
								gunichar _tmp77_;
								gint _tmp78_;
								gint _tmp79_;
								_tmp76_ = self->priv->current;
								_tmp77_ = u;
								_tmp78_ = g_unichar_to_utf8 (_tmp77_, NULL);
								self->priv->current = _tmp76_ + _tmp78_;
								_tmp79_ = token_length_in_chars;
								token_length_in_chars = _tmp79_ + 1;
							} else {
								gchar* _tmp80_;
								gint _tmp81_;
								ValaSourceReference* _tmp82_;
								ValaSourceReference* _tmp83_;
								_tmp80_ = self->priv->current;
								self->priv->current = _tmp80_ + 1;
								_tmp81_ = token_length_in_chars;
								_tmp82_ = vala_genie_scanner_get_source_reference (self, _tmp81_, 0);
								_tmp83_ = _tmp82_;
								vala_report_error (_tmp83_, "invalid UTF-8 character");
								_vala_source_reference_unref0 (_tmp83_);
							}
						}
					}
				}
				_tmp85_ = self->priv->current;
				_tmp86_ = self->priv->end;
				if (_tmp85_ >= _tmp86_) {
					_tmp84_ = TRUE;
				} else {
					gchar* _tmp87_;
					gchar _tmp88_;
					_tmp87_ = self->priv->current;
					_tmp88_ = _tmp87_[0];
					_tmp84_ = _tmp88_ == '\n';
				}
				if (_tmp84_) {
					gint _tmp89_;
					ValaSourceReference* _tmp90_;
					ValaSourceReference* _tmp91_;
					gint _tmp92_;
					ValaSourceLocation _tmp93_ = {0};
					ValaSourceLocation _tmp94_ = {0};
					ValaGenieTokenType _tmp95_;
					_tmp89_ = token_length_in_chars;
					_tmp90_ = vala_genie_scanner_get_source_reference (self, _tmp89_, 0);
					_tmp91_ = _tmp90_;
					vala_report_error (_tmp91_, "syntax error, expected \"");
					_vala_source_reference_unref0 (_tmp91_);
					_tmp92_ = self->priv->state_stack_length1;
					self->priv->state_stack_length1 = _tmp92_ - 1;
					_tmp95_ = vala_genie_scanner_read_token (self, &_tmp93_, &_tmp94_);
					_vala_token_begin = _tmp93_;
					_vala_token_end = _tmp94_;
					result = _tmp95_;
					if (token_begin) {
						*token_begin = _vala_token_begin;
					}
					if (token_end) {
						*token_end = _vala_token_end;
					}
					return result;
				}
				break;
			}
		}
	}
	_tmp96_ = token_length_in_chars;
	if (_tmp96_ < 0) {
		gint _tmp97_;
		gchar* _tmp98_;
		gchar* _tmp99_;
		_tmp97_ = self->priv->column;
		_tmp98_ = self->priv->current;
		_tmp99_ = begin;
		self->priv->column = _tmp97_ + ((gint) (_tmp98_ - _tmp99_));
	} else {
		gint _tmp100_;
		gint _tmp101_;
		_tmp100_ = self->priv->column;
		_tmp101_ = token_length_in_chars;
		self->priv->column = _tmp100_ + _tmp101_;
	}
	_tmp102_ = self->priv->current;
	_tmp103_ = self->priv->line;
	_tmp104_ = self->priv->column;
	vala_source_location_init (&_vala_token_end, _tmp102_, _tmp103_, _tmp104_ - 1);
	result = type;
	if (token_begin) {
		*token_begin = _vala_token_begin;
	}
	if (token_end) {
		*token_end = _vala_token_end;
	}
	return result;
}


void vala_genie_scanner_seek (ValaGenieScanner* self, ValaSourceLocation* location) {
	ValaSourceLocation _tmp0_;
	gchar* _tmp1_;
	ValaSourceLocation _tmp2_;
	gint _tmp3_;
	ValaSourceLocation _tmp4_;
	gint _tmp5_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (location != NULL);
	_tmp0_ = *location;
	_tmp1_ = _tmp0_.pos;
	self->priv->current = _tmp1_;
	_tmp2_ = *location;
	_tmp3_ = _tmp2_.line;
	self->priv->line = _tmp3_;
	_tmp4_ = *location;
	_tmp5_ = _tmp4_.column;
	self->priv->column = _tmp5_;
	self->priv->conditional_stack = (g_free (self->priv->conditional_stack), NULL);
	self->priv->conditional_stack = NULL;
	self->priv->conditional_stack_length1 = 0;
	self->priv->_conditional_stack_size_ = self->priv->conditional_stack_length1;
	self->priv->state_stack = (g_free (self->priv->state_stack), NULL);
	self->priv->state_stack = NULL;
	self->priv->state_stack_length1 = 0;
	self->priv->_state_stack_size_ = self->priv->state_stack_length1;
}


ValaGenieTokenType vala_genie_scanner_get_identifier_or_keyword (gchar* begin, gint len) {
	ValaGenieTokenType result = 0;
	gint _tmp0_;
	_tmp0_ = len;
	switch (_tmp0_) {
		case 2:
		{
			gchar* _tmp1_;
			gchar _tmp2_;
			_tmp1_ = begin;
			_tmp2_ = _tmp1_[0];
			switch (_tmp2_) {
				case 'a':
				{
					gchar* _tmp3_;
					gboolean _tmp4_;
					_tmp3_ = begin;
					_tmp4_ = vala_genie_scanner_matches (_tmp3_, "as");
					if (_tmp4_) {
						result = VALA_GENIE_TOKEN_TYPE_AS;
						return result;
					}
					break;
				}
				case 'd':
				{
					gchar* _tmp5_;
					gboolean _tmp6_;
					_tmp5_ = begin;
					_tmp6_ = vala_genie_scanner_matches (_tmp5_, "do");
					if (_tmp6_) {
						result = VALA_GENIE_TOKEN_TYPE_DO;
						return result;
					}
					break;
				}
				case 'i':
				{
					gchar* _tmp7_;
					gchar _tmp8_;
					_tmp7_ = begin;
					_tmp8_ = _tmp7_[1];
					switch (_tmp8_) {
						case 'f':
						{
							result = VALA_GENIE_TOKEN_TYPE_IF;
							return result;
						}
						case 'n':
						{
							result = VALA_GENIE_TOKEN_TYPE_IN;
							return result;
						}
						case 's':
						{
							result = VALA_GENIE_TOKEN_TYPE_IS;
							return result;
						}
						default:
						break;
					}
					break;
				}
				case 'o':
				{
					gchar* _tmp9_;
					gboolean _tmp10_;
					gchar* _tmp11_;
					gboolean _tmp12_;
					_tmp9_ = begin;
					_tmp10_ = vala_genie_scanner_matches (_tmp9_, "of");
					if (_tmp10_) {
						result = VALA_GENIE_TOKEN_TYPE_OF;
						return result;
					}
					_tmp11_ = begin;
					_tmp12_ = vala_genie_scanner_matches (_tmp11_, "or");
					if (_tmp12_) {
						result = VALA_GENIE_TOKEN_TYPE_OP_OR;
						return result;
					}
					break;
				}
				case 't':
				{
					gchar* _tmp13_;
					gboolean _tmp14_;
					_tmp13_ = begin;
					_tmp14_ = vala_genie_scanner_matches (_tmp13_, "to");
					if (_tmp14_) {
						result = VALA_GENIE_TOKEN_TYPE_TO;
						return result;
					}
					break;
				}
				default:
				break;
			}
			break;
		}
		case 3:
		{
			gchar* _tmp15_;
			gchar _tmp16_;
			_tmp15_ = begin;
			_tmp16_ = _tmp15_[0];
			switch (_tmp16_) {
				case 'a':
				{
					gchar* _tmp17_;
					gboolean _tmp18_;
					_tmp17_ = begin;
					_tmp18_ = vala_genie_scanner_matches (_tmp17_, "and");
					if (_tmp18_) {
						result = VALA_GENIE_TOKEN_TYPE_OP_AND;
						return result;
					}
					break;
				}
				case 'd':
				{
					gchar* _tmp19_;
					gboolean _tmp20_;
					_tmp19_ = begin;
					_tmp20_ = vala_genie_scanner_matches (_tmp19_, "def");
					if (_tmp20_) {
						result = VALA_GENIE_TOKEN_TYPE_DEF;
						return result;
					}
					break;
				}
				case 'f':
				{
					gchar* _tmp21_;
					gboolean _tmp22_;
					_tmp21_ = begin;
					_tmp22_ = vala_genie_scanner_matches (_tmp21_, "for");
					if (_tmp22_) {
						result = VALA_GENIE_TOKEN_TYPE_FOR;
						return result;
					}
					break;
				}
				case 'g':
				{
					gchar* _tmp23_;
					gboolean _tmp24_;
					_tmp23_ = begin;
					_tmp24_ = vala_genie_scanner_matches (_tmp23_, "get");
					if (_tmp24_) {
						result = VALA_GENIE_TOKEN_TYPE_GET;
						return result;
					}
					break;
				}
				case 'i':
				{
					gchar* _tmp25_;
					gboolean _tmp26_;
					_tmp25_ = begin;
					_tmp26_ = vala_genie_scanner_matches (_tmp25_, "isa");
					if (_tmp26_) {
						result = VALA_GENIE_TOKEN_TYPE_ISA;
						return result;
					}
					break;
				}
				case 'n':
				{
					gchar* _tmp27_;
					gchar _tmp28_;
					_tmp27_ = begin;
					_tmp28_ = _tmp27_[1];
					switch (_tmp28_) {
						case 'e':
						{
							gchar* _tmp29_;
							gboolean _tmp30_;
							_tmp29_ = begin;
							_tmp30_ = vala_genie_scanner_matches (_tmp29_, "new");
							if (_tmp30_) {
								result = VALA_GENIE_TOKEN_TYPE_NEW;
								return result;
							}
							break;
						}
						case 'o':
						{
							gchar* _tmp31_;
							gboolean _tmp32_;
							_tmp31_ = begin;
							_tmp32_ = vala_genie_scanner_matches (_tmp31_, "not");
							if (_tmp32_) {
								result = VALA_GENIE_TOKEN_TYPE_OP_NEG;
								return result;
							}
							break;
						}
						default:
						break;
					}
					break;
				}
				case 'o':
				{
					gchar* _tmp33_;
					gboolean _tmp34_;
					_tmp33_ = begin;
					_tmp34_ = vala_genie_scanner_matches (_tmp33_, "out");
					if (_tmp34_) {
						result = VALA_GENIE_TOKEN_TYPE_OUT;
						return result;
					}
					break;
				}
				case 'r':
				{
					gchar* _tmp35_;
					gboolean _tmp36_;
					_tmp35_ = begin;
					_tmp36_ = vala_genie_scanner_matches (_tmp35_, "ref");
					if (_tmp36_) {
						result = VALA_GENIE_TOKEN_TYPE_REF;
						return result;
					}
					break;
				}
				case 's':
				{
					gchar* _tmp37_;
					gboolean _tmp38_;
					_tmp37_ = begin;
					_tmp38_ = vala_genie_scanner_matches (_tmp37_, "set");
					if (_tmp38_) {
						result = VALA_GENIE_TOKEN_TYPE_SET;
						return result;
					}
					break;
				}
				case 't':
				{
					gchar* _tmp39_;
					gboolean _tmp40_;
					_tmp39_ = begin;
					_tmp40_ = vala_genie_scanner_matches (_tmp39_, "try");
					if (_tmp40_) {
						result = VALA_GENIE_TOKEN_TYPE_TRY;
						return result;
					}
					break;
				}
				case 'v':
				{
					gchar* _tmp41_;
					gboolean _tmp42_;
					_tmp41_ = begin;
					_tmp42_ = vala_genie_scanner_matches (_tmp41_, "var");
					if (_tmp42_) {
						result = VALA_GENIE_TOKEN_TYPE_VAR;
						return result;
					}
					break;
				}
				default:
				break;
			}
			break;
		}
		case 4:
		{
			gchar* _tmp43_;
			gchar _tmp44_;
			_tmp43_ = begin;
			_tmp44_ = _tmp43_[0];
			switch (_tmp44_) {
				case 'c':
				{
					gchar* _tmp45_;
					gboolean _tmp46_;
					_tmp45_ = begin;
					_tmp46_ = vala_genie_scanner_matches (_tmp45_, "case");
					if (_tmp46_) {
						result = VALA_GENIE_TOKEN_TYPE_CASE;
						return result;
					}
					break;
				}
				case 'd':
				{
					gchar* _tmp47_;
					gboolean _tmp48_;
					_tmp47_ = begin;
					_tmp48_ = vala_genie_scanner_matches (_tmp47_, "dict");
					if (_tmp48_) {
						result = VALA_GENIE_TOKEN_TYPE_DICT;
						return result;
					}
					break;
				}
				case 'e':
				{
					gchar* _tmp49_;
					gchar _tmp50_;
					_tmp49_ = begin;
					_tmp50_ = _tmp49_[1];
					switch (_tmp50_) {
						case 'l':
						{
							gchar* _tmp51_;
							gboolean _tmp52_;
							_tmp51_ = begin;
							_tmp52_ = vala_genie_scanner_matches (_tmp51_, "else");
							if (_tmp52_) {
								result = VALA_GENIE_TOKEN_TYPE_ELSE;
								return result;
							}
							break;
						}
						case 'n':
						{
							gchar* _tmp53_;
							gboolean _tmp54_;
							_tmp53_ = begin;
							_tmp54_ = vala_genie_scanner_matches (_tmp53_, "enum");
							if (_tmp54_) {
								result = VALA_GENIE_TOKEN_TYPE_ENUM;
								return result;
							}
							break;
						}
						default:
						break;
					}
					break;
				}
				case 'i':
				{
					gchar* _tmp55_;
					gboolean _tmp56_;
					_tmp55_ = begin;
					_tmp56_ = vala_genie_scanner_matches (_tmp55_, "init");
					if (_tmp56_) {
						result = VALA_GENIE_TOKEN_TYPE_INIT;
						return result;
					}
					break;
				}
				case 'l':
				{
					gchar* _tmp57_;
					gchar _tmp58_;
					_tmp57_ = begin;
					_tmp58_ = _tmp57_[1];
					switch (_tmp58_) {
						case 'i':
						{
							gchar* _tmp59_;
							gboolean _tmp60_;
							_tmp59_ = begin;
							_tmp60_ = vala_genie_scanner_matches (_tmp59_, "list");
							if (_tmp60_) {
								result = VALA_GENIE_TOKEN_TYPE_LIST;
								return result;
							}
							break;
						}
						case 'o':
						{
							gchar* _tmp61_;
							gboolean _tmp62_;
							_tmp61_ = begin;
							_tmp62_ = vala_genie_scanner_matches (_tmp61_, "lock");
							if (_tmp62_) {
								result = VALA_GENIE_TOKEN_TYPE_LOCK;
								return result;
							}
							break;
						}
						default:
						break;
					}
					break;
				}
				case 'n':
				{
					gchar* _tmp63_;
					gboolean _tmp64_;
					_tmp63_ = begin;
					_tmp64_ = vala_genie_scanner_matches (_tmp63_, "null");
					if (_tmp64_) {
						result = VALA_GENIE_TOKEN_TYPE_NULL;
						return result;
					}
					break;
				}
				case 'p':
				{
					gchar* _tmp65_;
					gchar _tmp66_;
					_tmp65_ = begin;
					_tmp66_ = _tmp65_[1];
					switch (_tmp66_) {
						case 'a':
						{
							gchar* _tmp67_;
							gboolean _tmp68_;
							_tmp67_ = begin;
							_tmp68_ = vala_genie_scanner_matches (_tmp67_, "pass");
							if (_tmp68_) {
								result = VALA_GENIE_TOKEN_TYPE_PASS;
								return result;
							}
							break;
						}
						case 'r':
						{
							gchar* _tmp69_;
							gboolean _tmp70_;
							_tmp69_ = begin;
							_tmp70_ = vala_genie_scanner_matches (_tmp69_, "prop");
							if (_tmp70_) {
								result = VALA_GENIE_TOKEN_TYPE_PROP;
								return result;
							}
							break;
						}
						default:
						break;
					}
					break;
				}
				case 's':
				{
					gchar* _tmp71_;
					gboolean _tmp72_;
					_tmp71_ = begin;
					_tmp72_ = vala_genie_scanner_matches (_tmp71_, "self");
					if (_tmp72_) {
						result = VALA_GENIE_TOKEN_TYPE_THIS;
						return result;
					}
					break;
				}
				case 't':
				{
					gchar* _tmp73_;
					gboolean _tmp74_;
					_tmp73_ = begin;
					_tmp74_ = vala_genie_scanner_matches (_tmp73_, "true");
					if (_tmp74_) {
						result = VALA_GENIE_TOKEN_TYPE_TRUE;
						return result;
					}
					break;
				}
				case 'u':
				{
					gchar* _tmp75_;
					gboolean _tmp76_;
					_tmp75_ = begin;
					_tmp76_ = vala_genie_scanner_matches (_tmp75_, "uses");
					if (_tmp76_) {
						result = VALA_GENIE_TOKEN_TYPE_USES;
						return result;
					}
					break;
				}
				case 'v':
				{
					gchar* _tmp77_;
					gboolean _tmp78_;
					_tmp77_ = begin;
					_tmp78_ = vala_genie_scanner_matches (_tmp77_, "void");
					if (_tmp78_) {
						result = VALA_GENIE_TOKEN_TYPE_VOID;
						return result;
					}
					break;
				}
				case 'w':
				{
					gchar* _tmp79_;
					gchar _tmp80_;
					_tmp79_ = begin;
					_tmp80_ = _tmp79_[1];
					switch (_tmp80_) {
						case 'e':
						{
							gchar* _tmp81_;
							gboolean _tmp82_;
							_tmp81_ = begin;
							_tmp82_ = vala_genie_scanner_matches (_tmp81_, "weak");
							if (_tmp82_) {
								result = VALA_GENIE_TOKEN_TYPE_WEAK;
								return result;
							}
							break;
						}
						case 'h':
						{
							gchar* _tmp83_;
							gboolean _tmp84_;
							_tmp83_ = begin;
							_tmp84_ = vala_genie_scanner_matches (_tmp83_, "when");
							if (_tmp84_) {
								result = VALA_GENIE_TOKEN_TYPE_WHEN;
								return result;
							}
							break;
						}
						default:
						break;
					}
					break;
				}
				default:
				break;
			}
			break;
		}
		case 5:
		{
			gchar* _tmp85_;
			gchar _tmp86_;
			_tmp85_ = begin;
			_tmp86_ = _tmp85_[0];
			switch (_tmp86_) {
				case 'a':
				{
					gchar* _tmp87_;
					gchar _tmp88_;
					_tmp87_ = begin;
					_tmp88_ = _tmp87_[1];
					switch (_tmp88_) {
						case 'r':
						{
							gchar* _tmp89_;
							gboolean _tmp90_;
							_tmp89_ = begin;
							_tmp90_ = vala_genie_scanner_matches (_tmp89_, "array");
							if (_tmp90_) {
								result = VALA_GENIE_TOKEN_TYPE_ARRAY;
								return result;
							}
							break;
						}
						case 's':
						{
							gchar* _tmp91_;
							gboolean _tmp92_;
							_tmp91_ = begin;
							_tmp92_ = vala_genie_scanner_matches (_tmp91_, "async");
							if (_tmp92_) {
								result = VALA_GENIE_TOKEN_TYPE_ASYNC;
								return result;
							}
							break;
						}
						default:
						break;
					}
					break;
				}
				case 'b':
				{
					gchar* _tmp93_;
					gboolean _tmp94_;
					_tmp93_ = begin;
					_tmp94_ = vala_genie_scanner_matches (_tmp93_, "break");
					if (_tmp94_) {
						result = VALA_GENIE_TOKEN_TYPE_BREAK;
						return result;
					}
					break;
				}
				case 'c':
				{
					gchar* _tmp95_;
					gchar _tmp96_;
					_tmp95_ = begin;
					_tmp96_ = _tmp95_[1];
					switch (_tmp96_) {
						case 'l':
						{
							gchar* _tmp97_;
							gboolean _tmp98_;
							_tmp97_ = begin;
							_tmp98_ = vala_genie_scanner_matches (_tmp97_, "class");
							if (_tmp98_) {
								result = VALA_GENIE_TOKEN_TYPE_CLASS;
								return result;
							}
							break;
						}
						case 'o':
						{
							gchar* _tmp99_;
							gboolean _tmp100_;
							_tmp99_ = begin;
							_tmp100_ = vala_genie_scanner_matches (_tmp99_, "const");
							if (_tmp100_) {
								result = VALA_GENIE_TOKEN_TYPE_CONST;
								return result;
							}
							break;
						}
						default:
						break;
					}
					break;
				}
				case 'e':
				{
					gchar* _tmp101_;
					gboolean _tmp102_;
					_tmp101_ = begin;
					_tmp102_ = vala_genie_scanner_matches (_tmp101_, "event");
					if (_tmp102_) {
						result = VALA_GENIE_TOKEN_TYPE_EVENT;
						return result;
					}
					break;
				}
				case 'f':
				{
					gchar* _tmp103_;
					gchar _tmp104_;
					_tmp103_ = begin;
					_tmp104_ = _tmp103_[1];
					switch (_tmp104_) {
						case 'a':
						{
							gchar* _tmp105_;
							gboolean _tmp106_;
							_tmp105_ = begin;
							_tmp106_ = vala_genie_scanner_matches (_tmp105_, "false");
							if (_tmp106_) {
								result = VALA_GENIE_TOKEN_TYPE_FALSE;
								return result;
							}
							break;
						}
						case 'i':
						{
							gchar* _tmp107_;
							gboolean _tmp108_;
							_tmp107_ = begin;
							_tmp108_ = vala_genie_scanner_matches (_tmp107_, "final");
							if (_tmp108_) {
								result = VALA_GENIE_TOKEN_TYPE_FINAL;
								return result;
							}
							break;
						}
						default:
						break;
					}
					break;
				}
				case 'o':
				{
					gchar* _tmp109_;
					gboolean _tmp110_;
					_tmp109_ = begin;
					_tmp110_ = vala_genie_scanner_matches (_tmp109_, "owned");
					if (_tmp110_) {
						result = VALA_GENIE_TOKEN_TYPE_OWNED;
						return result;
					}
					break;
				}
				case 'p':
				{
					gchar* _tmp111_;
					gboolean _tmp112_;
					_tmp111_ = begin;
					_tmp112_ = vala_genie_scanner_matches (_tmp111_, "print");
					if (_tmp112_) {
						result = VALA_GENIE_TOKEN_TYPE_PRINT;
						return result;
					}
					break;
				}
				case 's':
				{
					gchar* _tmp113_;
					gboolean _tmp114_;
					_tmp113_ = begin;
					_tmp114_ = vala_genie_scanner_matches (_tmp113_, "super");
					if (_tmp114_) {
						result = VALA_GENIE_TOKEN_TYPE_SUPER;
						return result;
					}
					break;
				}
				case 'r':
				{
					gchar* _tmp115_;
					gboolean _tmp116_;
					_tmp115_ = begin;
					_tmp116_ = vala_genie_scanner_matches (_tmp115_, "raise");
					if (_tmp116_) {
						result = VALA_GENIE_TOKEN_TYPE_RAISE;
						return result;
					}
					break;
				}
				case 'w':
				{
					gchar* _tmp117_;
					gboolean _tmp118_;
					_tmp117_ = begin;
					_tmp118_ = vala_genie_scanner_matches (_tmp117_, "while");
					if (_tmp118_) {
						result = VALA_GENIE_TOKEN_TYPE_WHILE;
						return result;
					}
					break;
				}
				case 'y':
				{
					gchar* _tmp119_;
					gboolean _tmp120_;
					_tmp119_ = begin;
					_tmp120_ = vala_genie_scanner_matches (_tmp119_, "yield");
					if (_tmp120_) {
						result = VALA_GENIE_TOKEN_TYPE_YIELD;
						return result;
					}
					break;
				}
				default:
				break;
			}
			break;
		}
		case 6:
		{
			gchar* _tmp121_;
			gchar _tmp122_;
			_tmp121_ = begin;
			_tmp122_ = _tmp121_[0];
			switch (_tmp122_) {
				case 'a':
				{
					gchar* _tmp123_;
					gboolean _tmp124_;
					_tmp123_ = begin;
					_tmp124_ = vala_genie_scanner_matches (_tmp123_, "assert");
					if (_tmp124_) {
						result = VALA_GENIE_TOKEN_TYPE_ASSERT;
						return result;
					}
					break;
				}
				case 'd':
				{
					gchar* _tmp125_;
					gchar _tmp126_;
					_tmp125_ = begin;
					_tmp126_ = _tmp125_[1];
					switch (_tmp126_) {
						case 'e':
						{
							gchar* _tmp127_;
							gboolean _tmp128_;
							_tmp127_ = begin;
							_tmp128_ = vala_genie_scanner_matches (_tmp127_, "delete");
							if (_tmp128_) {
								result = VALA_GENIE_TOKEN_TYPE_DELETE;
								return result;
							}
							break;
						}
						case 'o':
						{
							gchar* _tmp129_;
							gboolean _tmp130_;
							_tmp129_ = begin;
							_tmp130_ = vala_genie_scanner_matches (_tmp129_, "downto");
							if (_tmp130_) {
								result = VALA_GENIE_TOKEN_TYPE_DOWNTO;
								return result;
							}
							break;
						}
						default:
						break;
					}
					break;
				}
				case 'e':
				{
					gchar* _tmp131_;
					gchar _tmp132_;
					_tmp131_ = begin;
					_tmp132_ = _tmp131_[1];
					switch (_tmp132_) {
						case 'x':
						{
							gchar* _tmp133_;
							gchar _tmp134_;
							_tmp133_ = begin;
							_tmp134_ = _tmp133_[2];
							switch (_tmp134_) {
								case 'c':
								{
									gchar* _tmp135_;
									gboolean _tmp136_;
									_tmp135_ = begin;
									_tmp136_ = vala_genie_scanner_matches (_tmp135_, "except");
									if (_tmp136_) {
										result = VALA_GENIE_TOKEN_TYPE_EXCEPT;
										return result;
									}
									break;
								}
								case 't':
								{
									gchar* _tmp137_;
									gboolean _tmp138_;
									_tmp137_ = begin;
									_tmp138_ = vala_genie_scanner_matches (_tmp137_, "extern");
									if (_tmp138_) {
										result = VALA_GENIE_TOKEN_TYPE_EXTERN;
										return result;
									}
									break;
								}
								default:
								break;
							}
							break;
						}
						default:
						break;
					}
					break;
				}
				case 'i':
				{
					gchar* _tmp139_;
					gboolean _tmp140_;
					_tmp139_ = begin;
					_tmp140_ = vala_genie_scanner_matches (_tmp139_, "inline");
					if (_tmp140_) {
						result = VALA_GENIE_TOKEN_TYPE_INLINE;
						return result;
					}
					break;
				}
				case 'p':
				{
					gchar* _tmp141_;
					gchar _tmp142_;
					_tmp141_ = begin;
					_tmp142_ = _tmp141_[1];
					switch (_tmp142_) {
						case 'a':
						{
							gchar* _tmp143_;
							gboolean _tmp144_;
							_tmp143_ = begin;
							_tmp144_ = vala_genie_scanner_matches (_tmp143_, "params");
							if (_tmp144_) {
								result = VALA_GENIE_TOKEN_TYPE_PARAMS;
								return result;
							}
							break;
						}
						case 'u':
						{
							gchar* _tmp145_;
							gboolean _tmp146_;
							_tmp145_ = begin;
							_tmp146_ = vala_genie_scanner_matches (_tmp145_, "public");
							if (_tmp146_) {
								result = VALA_GENIE_TOKEN_TYPE_PUBLIC;
								return result;
							}
							break;
						}
						default:
						break;
					}
					break;
				}
				case 'r':
				{
					gchar* _tmp147_;
					gchar _tmp148_;
					_tmp147_ = begin;
					_tmp148_ = _tmp147_[1];
					switch (_tmp148_) {
						case 'a':
						{
							gchar* _tmp149_;
							gboolean _tmp150_;
							_tmp149_ = begin;
							_tmp150_ = vala_genie_scanner_matches (_tmp149_, "raises");
							if (_tmp150_) {
								result = VALA_GENIE_TOKEN_TYPE_RAISES;
								return result;
							}
							break;
						}
						case 'e':
						{
							gchar* _tmp151_;
							gboolean _tmp152_;
							_tmp151_ = begin;
							_tmp152_ = vala_genie_scanner_matches (_tmp151_, "return");
							if (_tmp152_) {
								result = VALA_GENIE_TOKEN_TYPE_RETURN;
								return result;
							}
							break;
						}
						default:
						break;
					}
					break;
				}
				case 's':
				{
					gchar* _tmp153_;
					gchar _tmp154_;
					_tmp153_ = begin;
					_tmp154_ = _tmp153_[1];
					switch (_tmp154_) {
						case 'e':
						{
							gchar* _tmp155_;
							gboolean _tmp156_;
							_tmp155_ = begin;
							_tmp156_ = vala_genie_scanner_matches (_tmp155_, "sealed");
							if (_tmp156_) {
								result = VALA_GENIE_TOKEN_TYPE_SEALED;
								return result;
							}
							break;
						}
						case 'i':
						{
							gchar* _tmp157_;
							gboolean _tmp158_;
							_tmp157_ = begin;
							_tmp158_ = vala_genie_scanner_matches (_tmp157_, "sizeof");
							if (_tmp158_) {
								result = VALA_GENIE_TOKEN_TYPE_SIZEOF;
								return result;
							}
							break;
						}
						case 't':
						{
							gchar* _tmp159_;
							gchar _tmp160_;
							_tmp159_ = begin;
							_tmp160_ = _tmp159_[2];
							switch (_tmp160_) {
								case 'a':
								{
									gchar* _tmp161_;
									gboolean _tmp162_;
									_tmp161_ = begin;
									_tmp162_ = vala_genie_scanner_matches (_tmp161_, "static");
									if (_tmp162_) {
										result = VALA_GENIE_TOKEN_TYPE_STATIC;
										return result;
									}
									break;
								}
								case 'r':
								{
									gchar* _tmp163_;
									gboolean _tmp164_;
									_tmp163_ = begin;
									_tmp164_ = vala_genie_scanner_matches (_tmp163_, "struct");
									if (_tmp164_) {
										result = VALA_GENIE_TOKEN_TYPE_STRUCT;
										return result;
									}
									break;
								}
								default:
								break;
							}
							break;
						}
						default:
						break;
					}
					break;
				}
				case 't':
				{
					gchar* _tmp165_;
					gboolean _tmp166_;
					_tmp165_ = begin;
					_tmp166_ = vala_genie_scanner_matches (_tmp165_, "typeof");
					if (_tmp166_) {
						result = VALA_GENIE_TOKEN_TYPE_TYPEOF;
						return result;
					}
					break;
				}
				default:
				break;
			}
			break;
		}
		case 7:
		{
			gchar* _tmp167_;
			gchar _tmp168_;
			_tmp167_ = begin;
			_tmp168_ = _tmp167_[0];
			switch (_tmp168_) {
				case 'd':
				{
					gchar* _tmp169_;
					gchar _tmp170_;
					_tmp169_ = begin;
					_tmp170_ = _tmp169_[1];
					switch (_tmp170_) {
						case 'e':
						{
							gchar* _tmp171_;
							gboolean _tmp172_;
							_tmp171_ = begin;
							_tmp172_ = vala_genie_scanner_matches (_tmp171_, "default");
							if (_tmp172_) {
								result = VALA_GENIE_TOKEN_TYPE_DEFAULT;
								return result;
							}
							break;
						}
						case 'y':
						{
							gchar* _tmp173_;
							gboolean _tmp174_;
							_tmp173_ = begin;
							_tmp174_ = vala_genie_scanner_matches (_tmp173_, "dynamic");
							if (_tmp174_) {
								result = VALA_GENIE_TOKEN_TYPE_DYNAMIC;
								return result;
							}
							break;
						}
						default:
						break;
					}
					break;
				}
				case 'e':
				{
					gchar* _tmp175_;
					gboolean _tmp176_;
					_tmp175_ = begin;
					_tmp176_ = vala_genie_scanner_matches (_tmp175_, "ensures");
					if (_tmp176_) {
						result = VALA_GENIE_TOKEN_TYPE_ENSURES;
						return result;
					}
					break;
				}
				case 'f':
				{
					gchar* _tmp177_;
					gchar _tmp178_;
					_tmp177_ = begin;
					_tmp178_ = _tmp177_[1];
					switch (_tmp178_) {
						case 'i':
						{
							gchar* _tmp179_;
							gboolean _tmp180_;
							_tmp179_ = begin;
							_tmp180_ = vala_genie_scanner_matches (_tmp179_, "finally");
							if (_tmp180_) {
								result = VALA_GENIE_TOKEN_TYPE_FINALLY;
								return result;
							}
							break;
						}
						default:
						break;
					}
					break;
				}
				case 'p':
				{
					gchar* _tmp181_;
					gboolean _tmp182_;
					_tmp181_ = begin;
					_tmp182_ = vala_genie_scanner_matches (_tmp181_, "private");
					if (_tmp182_) {
						result = VALA_GENIE_TOKEN_TYPE_PRIVATE;
						return result;
					}
					break;
				}
				case 'u':
				{
					gchar* _tmp183_;
					gboolean _tmp184_;
					_tmp183_ = begin;
					_tmp184_ = vala_genie_scanner_matches (_tmp183_, "unowned");
					if (_tmp184_) {
						result = VALA_GENIE_TOKEN_TYPE_UNOWNED;
						return result;
					}
					break;
				}
				case 'v':
				{
					gchar* _tmp185_;
					gboolean _tmp186_;
					_tmp185_ = begin;
					_tmp186_ = vala_genie_scanner_matches (_tmp185_, "virtual");
					if (_tmp186_) {
						result = VALA_GENIE_TOKEN_TYPE_VIRTUAL;
						return result;
					}
					break;
				}
				default:
				break;
			}
			break;
		}
		case 8:
		{
			gchar* _tmp187_;
			gchar _tmp188_;
			_tmp187_ = begin;
			_tmp188_ = _tmp187_[0];
			switch (_tmp188_) {
				case 'a':
				{
					gchar* _tmp189_;
					gboolean _tmp190_;
					_tmp189_ = begin;
					_tmp190_ = vala_genie_scanner_matches (_tmp189_, "abstract");
					if (_tmp190_) {
						result = VALA_GENIE_TOKEN_TYPE_ABSTRACT;
						return result;
					}
					break;
				}
				case 'c':
				{
					gchar* _tmp191_;
					gboolean _tmp192_;
					_tmp191_ = begin;
					_tmp192_ = vala_genie_scanner_matches (_tmp191_, "continue");
					if (_tmp192_) {
						result = VALA_GENIE_TOKEN_TYPE_CONTINUE;
						return result;
					}
					break;
				}
				case 'd':
				{
					gchar* _tmp193_;
					gboolean _tmp194_;
					_tmp193_ = begin;
					_tmp194_ = vala_genie_scanner_matches (_tmp193_, "delegate");
					if (_tmp194_) {
						result = VALA_GENIE_TOKEN_TYPE_DELEGATE;
						return result;
					}
					break;
				}
				case 'i':
				{
					gchar* _tmp195_;
					gboolean _tmp196_;
					_tmp195_ = begin;
					_tmp196_ = vala_genie_scanner_matches (_tmp195_, "internal");
					if (_tmp196_) {
						result = VALA_GENIE_TOKEN_TYPE_INTERNAL;
						return result;
					}
					break;
				}
				case 'o':
				{
					gchar* _tmp197_;
					gboolean _tmp198_;
					_tmp197_ = begin;
					_tmp198_ = vala_genie_scanner_matches (_tmp197_, "override");
					if (_tmp198_) {
						result = VALA_GENIE_TOKEN_TYPE_OVERRIDE;
						return result;
					}
					break;
				}
				case 'r':
				{
					gchar* _tmp199_;
					gchar _tmp200_;
					_tmp199_ = begin;
					_tmp200_ = _tmp199_[2];
					switch (_tmp200_) {
						case 'a':
						{
							gchar* _tmp201_;
							gboolean _tmp202_;
							_tmp201_ = begin;
							_tmp202_ = vala_genie_scanner_matches (_tmp201_, "readonly");
							if (_tmp202_) {
								result = VALA_GENIE_TOKEN_TYPE_READONLY;
								return result;
							}
							break;
						}
						case 'q':
						{
							gchar* _tmp203_;
							gboolean _tmp204_;
							_tmp203_ = begin;
							_tmp204_ = vala_genie_scanner_matches (_tmp203_, "requires");
							if (_tmp204_) {
								result = VALA_GENIE_TOKEN_TYPE_REQUIRES;
								return result;
							}
							break;
						}
						default:
						break;
					}
					break;
				}
				case 'v':
				{
					gchar* _tmp205_;
					gboolean _tmp206_;
					_tmp205_ = begin;
					_tmp206_ = vala_genie_scanner_matches (_tmp205_, "volatile");
					if (_tmp206_) {
						result = VALA_GENIE_TOKEN_TYPE_VOLATILE;
						return result;
					}
					break;
				}
				default:
				break;
			}
			break;
		}
		case 9:
		{
			gchar* _tmp207_;
			gchar _tmp208_;
			_tmp207_ = begin;
			_tmp208_ = _tmp207_[0];
			switch (_tmp208_) {
				case 'c':
				{
					gchar* _tmp209_;
					gboolean _tmp210_;
					_tmp209_ = begin;
					_tmp210_ = vala_genie_scanner_matches (_tmp209_, "construct");
					if (_tmp210_) {
						result = VALA_GENIE_TOKEN_TYPE_CONSTRUCT;
						return result;
					}
					break;
				}
				case 'e':
				{
					gchar* _tmp211_;
					gboolean _tmp212_;
					_tmp211_ = begin;
					_tmp212_ = vala_genie_scanner_matches (_tmp211_, "exception");
					if (_tmp212_) {
						result = VALA_GENIE_TOKEN_TYPE_ERRORDOMAIN;
						return result;
					}
					break;
				}
				case 'i':
				{
					gchar* _tmp213_;
					gboolean _tmp214_;
					_tmp213_ = begin;
					_tmp214_ = vala_genie_scanner_matches (_tmp213_, "interface");
					if (_tmp214_) {
						result = VALA_GENIE_TOKEN_TYPE_INTERFACE;
						return result;
					}
					break;
				}
				case 'n':
				{
					gchar* _tmp215_;
					gboolean _tmp216_;
					_tmp215_ = begin;
					_tmp216_ = vala_genie_scanner_matches (_tmp215_, "namespace");
					if (_tmp216_) {
						result = VALA_GENIE_TOKEN_TYPE_NAMESPACE;
						return result;
					}
					break;
				}
				case 'p':
				{
					gchar* _tmp217_;
					gboolean _tmp218_;
					_tmp217_ = begin;
					_tmp218_ = vala_genie_scanner_matches (_tmp217_, "protected");
					if (_tmp218_) {
						result = VALA_GENIE_TOKEN_TYPE_PROTECTED;
						return result;
					}
					break;
				}
				case 'w':
				{
					gchar* _tmp219_;
					gboolean _tmp220_;
					_tmp219_ = begin;
					_tmp220_ = vala_genie_scanner_matches (_tmp219_, "writeonly");
					if (_tmp220_) {
						result = VALA_GENIE_TOKEN_TYPE_WRITEONLY;
						return result;
					}
					break;
				}
				default:
				break;
			}
			break;
		}
		case 10:
		{
			gchar* _tmp221_;
			gchar _tmp222_;
			_tmp221_ = begin;
			_tmp222_ = _tmp221_[0];
			switch (_tmp222_) {
				case 'i':
				{
					gchar* _tmp223_;
					gboolean _tmp224_;
					_tmp223_ = begin;
					_tmp224_ = vala_genie_scanner_matches (_tmp223_, "implements");
					if (_tmp224_) {
						result = VALA_GENIE_TOKEN_TYPE_IMPLEMENTS;
						return result;
					}
					break;
				}
				default:
				break;
			}
			break;
		}
		default:
		break;
	}
	result = VALA_GENIE_TOKEN_TYPE_IDENTIFIER;
	return result;
}


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


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


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


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


ValaGenieTokenType vala_genie_scanner_read_template_token (ValaGenieScanner* self, ValaSourceLocation* token_begin, ValaSourceLocation* token_end) {
	ValaSourceLocation _vala_token_begin = {0};
	ValaSourceLocation _vala_token_end = {0};
	ValaGenieTokenType result = 0;
	ValaGenieTokenType type = 0;
	gchar* begin = NULL;
	gchar* _tmp0_;
	gchar* _tmp1_;
	gint _tmp2_;
	gint _tmp3_;
	gint token_length_in_chars = 0;
	gchar* _tmp4_;
	gchar* _tmp5_;
	gint _tmp102_;
	gchar* _tmp108_;
	gint _tmp109_;
	gint _tmp110_;
	g_return_val_if_fail (self != NULL, 0);
	_tmp0_ = self->priv->current;
	begin = _tmp0_;
	_tmp1_ = begin;
	_tmp2_ = self->priv->line;
	_tmp3_ = self->priv->column;
	vala_source_location_init (&_vala_token_begin, _tmp1_, _tmp2_, _tmp3_);
	token_length_in_chars = -1;
	_tmp4_ = self->priv->current;
	_tmp5_ = self->priv->end;
	if (_tmp4_ >= _tmp5_) {
		type = VALA_GENIE_TOKEN_TYPE_EOF;
	} else {
		gchar* _tmp6_;
		gchar _tmp7_;
		_tmp6_ = self->priv->current;
		_tmp7_ = _tmp6_[0];
		switch (_tmp7_) {
			case '"':
			{
				gchar* _tmp8_;
				gint _tmp9_;
				type = VALA_GENIE_TOKEN_TYPE_CLOSE_TEMPLATE;
				_tmp8_ = self->priv->current;
				self->priv->current = _tmp8_ + 1;
				_tmp9_ = self->priv->state_stack_length1;
				self->priv->state_stack_length1 = _tmp9_ - 1;
				break;
			}
			case '$':
			{
				gchar* _tmp10_;
				gchar* _tmp11_;
				gboolean _tmp12_ = FALSE;
				gchar* _tmp13_;
				gchar _tmp14_;
				gboolean _tmp15_;
				_tmp10_ = _vala_token_begin.pos;
				_vala_token_begin.pos = _tmp10_ + 1;
				_tmp11_ = self->priv->current;
				self->priv->current = _tmp11_ + 1;
				_tmp13_ = self->priv->current;
				_tmp14_ = _tmp13_[0];
				_tmp15_ = g_ascii_isalpha (_tmp14_);
				if (_tmp15_) {
					_tmp12_ = TRUE;
				} else {
					gchar* _tmp16_;
					gchar _tmp17_;
					_tmp16_ = self->priv->current;
					_tmp17_ = _tmp16_[0];
					_tmp12_ = _tmp17_ == '_';
				}
				if (_tmp12_) {
					gint len = 0;
					ValaGenieScannerState* _tmp26_;
					gint _tmp26__length1;
					len = 0;
					while (TRUE) {
						gboolean _tmp18_ = FALSE;
						gchar* _tmp19_;
						gchar* _tmp20_;
						gchar* _tmp24_;
						gint _tmp25_;
						_tmp19_ = self->priv->current;
						_tmp20_ = self->priv->end;
						if (_tmp19_ < _tmp20_) {
							gchar* _tmp21_;
							gchar _tmp22_;
							gboolean _tmp23_;
							_tmp21_ = self->priv->current;
							_tmp22_ = _tmp21_[0];
							_tmp23_ = vala_genie_scanner_is_ident_char (self, _tmp22_);
							_tmp18_ = _tmp23_;
						} else {
							_tmp18_ = FALSE;
						}
						if (!_tmp18_) {
							break;
						}
						_tmp24_ = self->priv->current;
						self->priv->current = _tmp24_ + 1;
						_tmp25_ = len;
						len = _tmp25_ + 1;
					}
					type = VALA_GENIE_TOKEN_TYPE_IDENTIFIER;
					_tmp26_ = self->priv->state_stack;
					_tmp26__length1 = self->priv->state_stack_length1;
					_vala_array_add2 (&self->priv->state_stack, &self->priv->state_stack_length1, &self->priv->_state_stack_size_, VALA_GENIE_SCANNER_STATE_TEMPLATE_PART);
				} else {
					gchar* _tmp27_;
					gchar _tmp28_;
					_tmp27_ = self->priv->current;
					_tmp28_ = _tmp27_[0];
					if (_tmp28_ == '(') {
						gchar* _tmp29_;
						gint _tmp30_;
						ValaGenieScannerState* _tmp31_;
						gint _tmp31__length1;
						ValaSourceLocation _tmp32_ = {0};
						ValaSourceLocation _tmp33_ = {0};
						ValaGenieTokenType _tmp34_;
						_tmp29_ = self->priv->current;
						self->priv->current = _tmp29_ + 1;
						_tmp30_ = self->priv->column;
						self->priv->column = _tmp30_ + 2;
						_tmp31_ = self->priv->state_stack;
						_tmp31__length1 = self->priv->state_stack_length1;
						_vala_array_add3 (&self->priv->state_stack, &self->priv->state_stack_length1, &self->priv->_state_stack_size_, VALA_GENIE_SCANNER_STATE_PARENS);
						_tmp34_ = vala_genie_scanner_read_token (self, &_tmp32_, &_tmp33_);
						_vala_token_begin = _tmp32_;
						_vala_token_end = _tmp33_;
						result = _tmp34_;
						if (token_begin) {
							*token_begin = _vala_token_begin;
						}
						if (token_end) {
							*token_end = _vala_token_end;
						}
						return result;
					} else {
						gchar* _tmp35_;
						gchar _tmp36_;
						_tmp35_ = self->priv->current;
						_tmp36_ = _tmp35_[0];
						if (_tmp36_ == '$') {
							gchar* _tmp37_;
							ValaGenieScannerState* _tmp38_;
							gint _tmp38__length1;
							type = VALA_GENIE_TOKEN_TYPE_TEMPLATE_STRING_LITERAL;
							_tmp37_ = self->priv->current;
							self->priv->current = _tmp37_ + 1;
							_tmp38_ = self->priv->state_stack;
							_tmp38__length1 = self->priv->state_stack_length1;
							_vala_array_add4 (&self->priv->state_stack, &self->priv->state_stack_length1, &self->priv->_state_stack_size_, VALA_GENIE_SCANNER_STATE_TEMPLATE_PART);
						} else {
							ValaSourceReference* _tmp39_;
							ValaSourceReference* _tmp40_;
							ValaSourceLocation _tmp41_ = {0};
							ValaSourceLocation _tmp42_ = {0};
							ValaGenieTokenType _tmp43_;
							_tmp39_ = vala_genie_scanner_get_source_reference (self, 1, 0);
							_tmp40_ = _tmp39_;
							vala_report_error (_tmp40_, "unexpected character");
							_vala_source_reference_unref0 (_tmp40_);
							_tmp43_ = vala_genie_scanner_read_template_token (self, &_tmp41_, &_tmp42_);
							_vala_token_begin = _tmp41_;
							_vala_token_end = _tmp42_;
							result = _tmp43_;
							if (token_begin) {
								*token_begin = _vala_token_begin;
							}
							if (token_end) {
								*token_end = _vala_token_end;
							}
							return result;
						}
					}
				}
				break;
			}
			default:
			{
				gchar* _tmp92_;
				gchar* _tmp93_;
				ValaGenieScannerState* _tmp101_;
				gint _tmp101__length1;
				type = VALA_GENIE_TOKEN_TYPE_TEMPLATE_STRING_LITERAL;
				token_length_in_chars = 0;
				while (TRUE) {
					gboolean _tmp44_ = FALSE;
					gboolean _tmp45_ = FALSE;
					gchar* _tmp46_;
					gchar* _tmp47_;
					gchar* _tmp52_;
					gchar _tmp53_;
					_tmp46_ = self->priv->current;
					_tmp47_ = self->priv->end;
					if (_tmp46_ < _tmp47_) {
						gchar* _tmp48_;
						gchar _tmp49_;
						_tmp48_ = self->priv->current;
						_tmp49_ = _tmp48_[0];
						_tmp45_ = _tmp49_ != '"';
					} else {
						_tmp45_ = FALSE;
					}
					if (_tmp45_) {
						gchar* _tmp50_;
						gchar _tmp51_;
						_tmp50_ = self->priv->current;
						_tmp51_ = _tmp50_[0];
						_tmp44_ = _tmp51_ != '$';
					} else {
						_tmp44_ = FALSE;
					}
					if (!_tmp44_) {
						break;
					}
					_tmp52_ = self->priv->current;
					_tmp53_ = _tmp52_[0];
					if (_tmp53_ == '\\') {
						gchar* _tmp54_;
						gint _tmp55_;
						gchar* _tmp56_;
						gchar* _tmp57_;
						gchar* _tmp58_;
						gchar _tmp59_;
						_tmp54_ = self->priv->current;
						self->priv->current = _tmp54_ + 1;
						_tmp55_ = token_length_in_chars;
						token_length_in_chars = _tmp55_ + 1;
						_tmp56_ = self->priv->current;
						_tmp57_ = self->priv->end;
						if (_tmp56_ >= _tmp57_) {
							break;
						}
						_tmp58_ = self->priv->current;
						_tmp59_ = _tmp58_[0];
						switch (_tmp59_) {
							case '\'':
							case '"':
							case '\\':
							case '0':
							case 'b':
							case 'f':
							case 'n':
							case 'r':
							case 't':
							{
								gchar* _tmp60_;
								gint _tmp61_;
								_tmp60_ = self->priv->current;
								self->priv->current = _tmp60_ + 1;
								_tmp61_ = token_length_in_chars;
								token_length_in_chars = _tmp61_ + 1;
								break;
							}
							case 'x':
							{
								gchar* _tmp62_;
								gint _tmp63_;
								_tmp62_ = self->priv->current;
								self->priv->current = _tmp62_ + 1;
								_tmp63_ = token_length_in_chars;
								token_length_in_chars = _tmp63_ + 1;
								while (TRUE) {
									gboolean _tmp64_ = FALSE;
									gchar* _tmp65_;
									gchar* _tmp66_;
									gchar* _tmp70_;
									gint _tmp71_;
									_tmp65_ = self->priv->current;
									_tmp66_ = self->priv->end;
									if (_tmp65_ < _tmp66_) {
										gchar* _tmp67_;
										gchar _tmp68_;
										gboolean _tmp69_;
										_tmp67_ = self->priv->current;
										_tmp68_ = _tmp67_[0];
										_tmp69_ = g_ascii_isxdigit (_tmp68_);
										_tmp64_ = _tmp69_;
									} else {
										_tmp64_ = FALSE;
									}
									if (!_tmp64_) {
										break;
									}
									_tmp70_ = self->priv->current;
									self->priv->current = _tmp70_ + 1;
									_tmp71_ = token_length_in_chars;
									token_length_in_chars = _tmp71_ + 1;
								}
								break;
							}
							default:
							{
								gint _tmp72_;
								ValaSourceReference* _tmp73_;
								ValaSourceReference* _tmp74_;
								_tmp72_ = token_length_in_chars;
								_tmp73_ = vala_genie_scanner_get_source_reference (self, _tmp72_, 0);
								_tmp74_ = _tmp73_;
								vala_report_error (_tmp74_, "invalid escape sequence");
								_vala_source_reference_unref0 (_tmp74_);
								break;
							}
						}
					} else {
						gchar* _tmp75_;
						gchar _tmp76_;
						_tmp75_ = self->priv->current;
						_tmp76_ = _tmp75_[0];
						if (_tmp76_ == '\n') {
							gchar* _tmp77_;
							gint _tmp78_;
							_tmp77_ = self->priv->current;
							self->priv->current = _tmp77_ + 1;
							_tmp78_ = self->priv->line;
							self->priv->line = _tmp78_ + 1;
							self->priv->column = 1;
							token_length_in_chars = 1;
						} else {
							gunichar u = 0U;
							gchar* _tmp79_;
							gchar* _tmp80_;
							gchar* _tmp81_;
							gunichar _tmp82_;
							gunichar _tmp83_;
							_tmp79_ = self->priv->current;
							_tmp80_ = self->priv->end;
							_tmp81_ = self->priv->current;
							_tmp82_ = g_utf8_get_char_validated ((const gchar*) _tmp79_, (gssize) ((glong) (_tmp80_ - _tmp81_)));
							u = _tmp82_;
							_tmp83_ = u;
							if (_tmp83_ != ((gunichar) -1)) {
								gchar* _tmp84_;
								gunichar _tmp85_;
								gint _tmp86_;
								gint _tmp87_;
								_tmp84_ = self->priv->current;
								_tmp85_ = u;
								_tmp86_ = g_unichar_to_utf8 (_tmp85_, NULL);
								self->priv->current = _tmp84_ + _tmp86_;
								_tmp87_ = token_length_in_chars;
								token_length_in_chars = _tmp87_ + 1;
							} else {
								gchar* _tmp88_;
								gint _tmp89_;
								ValaSourceReference* _tmp90_;
								ValaSourceReference* _tmp91_;
								_tmp88_ = self->priv->current;
								self->priv->current = _tmp88_ + 1;
								_tmp89_ = token_length_in_chars;
								_tmp90_ = vala_genie_scanner_get_source_reference (self, _tmp89_, 0);
								_tmp91_ = _tmp90_;
								vala_report_error (_tmp91_, "invalid UTF-8 character");
								_vala_source_reference_unref0 (_tmp91_);
							}
						}
					}
				}
				_tmp92_ = self->priv->current;
				_tmp93_ = self->priv->end;
				if (_tmp92_ >= _tmp93_) {
					gint _tmp94_;
					ValaSourceReference* _tmp95_;
					ValaSourceReference* _tmp96_;
					gint _tmp97_;
					ValaSourceLocation _tmp98_ = {0};
					ValaSourceLocation _tmp99_ = {0};
					ValaGenieTokenType _tmp100_;
					_tmp94_ = token_length_in_chars;
					_tmp95_ = vala_genie_scanner_get_source_reference (self, _tmp94_, 0);
					_tmp96_ = _tmp95_;
					vala_report_error (_tmp96_, "syntax error, expected \"");
					_vala_source_reference_unref0 (_tmp96_);
					_tmp97_ = self->priv->state_stack_length1;
					self->priv->state_stack_length1 = _tmp97_ - 1;
					_tmp100_ = vala_genie_scanner_read_token (self, &_tmp98_, &_tmp99_);
					_vala_token_begin = _tmp98_;
					_vala_token_end = _tmp99_;
					result = _tmp100_;
					if (token_begin) {
						*token_begin = _vala_token_begin;
					}
					if (token_end) {
						*token_end = _vala_token_end;
					}
					return result;
				}
				_tmp101_ = self->priv->state_stack;
				_tmp101__length1 = self->priv->state_stack_length1;
				_vala_array_add5 (&self->priv->state_stack, &self->priv->state_stack_length1, &self->priv->_state_stack_size_, VALA_GENIE_SCANNER_STATE_TEMPLATE_PART);
				break;
			}
		}
	}
	_tmp102_ = token_length_in_chars;
	if (_tmp102_ < 0) {
		gint _tmp103_;
		gchar* _tmp104_;
		gchar* _tmp105_;
		_tmp103_ = self->priv->column;
		_tmp104_ = self->priv->current;
		_tmp105_ = begin;
		self->priv->column = _tmp103_ + ((gint) (_tmp104_ - _tmp105_));
	} else {
		gint _tmp106_;
		gint _tmp107_;
		_tmp106_ = self->priv->column;
		_tmp107_ = token_length_in_chars;
		self->priv->column = _tmp106_ + _tmp107_;
	}
	_tmp108_ = self->priv->current;
	_tmp109_ = self->priv->line;
	_tmp110_ = self->priv->column;
	vala_source_location_init (&_vala_token_end, _tmp108_, _tmp109_, _tmp110_ - 1);
	result = type;
	if (token_begin) {
		*token_begin = _vala_token_begin;
	}
	if (token_end) {
		*token_end = _vala_token_end;
	}
	return result;
}


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


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


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


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


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


ValaGenieTokenType vala_genie_scanner_read_token (ValaGenieScanner* self, ValaSourceLocation* token_begin, ValaSourceLocation* token_end) {
	ValaSourceLocation _vala_token_begin = {0};
	ValaSourceLocation _vala_token_end = {0};
	ValaGenieTokenType result = 0;
	gchar* _tmp0_;
	gboolean _tmp7_;
	gint _tmp23_;
	gboolean _tmp32_ = FALSE;
	gint _tmp33_;
	gboolean _tmp56_ = FALSE;
	gboolean _tmp57_ = FALSE;
	gboolean _tmp58_ = FALSE;
	gboolean _tmp59_;
	ValaGenieTokenType type = 0;
	gchar* begin = NULL;
	gchar* _tmp89_;
	gchar* _tmp90_;
	gint _tmp91_;
	gint _tmp92_;
	gint token_length_in_chars = 0;
	gchar* _tmp93_;
	gchar* _tmp94_;
	gint _tmp531_;
	gchar* _tmp537_;
	gint _tmp538_;
	gint _tmp539_;
	ValaGenieTokenType _tmp540_;
	g_return_val_if_fail (self != NULL, 0);
	_tmp0_ = self->priv->current;
	if (_tmp0_ == NULL) {
		gchar* _tmp1_;
		gint _tmp2_;
		gint _tmp3_;
		gchar* _tmp4_;
		gint _tmp5_;
		gint _tmp6_;
		_tmp1_ = self->priv->current;
		_tmp2_ = self->priv->line;
		_tmp3_ = self->priv->column;
		vala_source_location_init (&_vala_token_begin, _tmp1_, _tmp2_, _tmp3_);
		_tmp4_ = self->priv->current;
		_tmp5_ = self->priv->line;
		_tmp6_ = self->priv->column;
		vala_source_location_init (&_vala_token_end, _tmp4_, _tmp5_, _tmp6_);
		result = VALA_GENIE_TOKEN_TYPE_EOF;
		if (token_begin) {
			*token_begin = _vala_token_begin;
		}
		if (token_end) {
			*token_end = _vala_token_end;
		}
		return result;
	}
	_tmp7_ = vala_genie_scanner_in_template (self);
	if (_tmp7_) {
		ValaSourceLocation _tmp8_ = {0};
		ValaSourceLocation _tmp9_ = {0};
		ValaGenieTokenType _tmp10_;
		_tmp10_ = vala_genie_scanner_read_template_token (self, &_tmp8_, &_tmp9_);
		_vala_token_begin = _tmp8_;
		_vala_token_end = _tmp9_;
		result = _tmp10_;
		if (token_begin) {
			*token_begin = _vala_token_begin;
		}
		if (token_end) {
			*token_end = _vala_token_end;
		}
		return result;
	} else {
		gboolean _tmp11_;
		_tmp11_ = vala_genie_scanner_in_template_part (self);
		if (_tmp11_) {
			gint _tmp12_;
			gchar* _tmp13_;
			gint _tmp14_;
			gint _tmp15_;
			gchar* _tmp16_;
			gint _tmp17_;
			gint _tmp18_;
			_tmp12_ = self->priv->state_stack_length1;
			self->priv->state_stack_length1 = _tmp12_ - 1;
			_tmp13_ = self->priv->current;
			_tmp14_ = self->priv->line;
			_tmp15_ = self->priv->column;
			vala_source_location_init (&_vala_token_begin, _tmp13_, _tmp14_, _tmp15_);
			_tmp16_ = self->priv->current;
			_tmp17_ = self->priv->line;
			_tmp18_ = self->priv->column;
			vala_source_location_init (&_vala_token_end, _tmp16_, _tmp17_, _tmp18_ - 1);
			result = VALA_GENIE_TOKEN_TYPE_COMMA;
			if (token_begin) {
				*token_begin = _vala_token_begin;
			}
			if (token_end) {
				*token_end = _vala_token_end;
			}
			return result;
		} else {
			gboolean _tmp19_;
			_tmp19_ = vala_genie_scanner_in_regex_literal (self);
			if (_tmp19_) {
				ValaSourceLocation _tmp20_ = {0};
				ValaSourceLocation _tmp21_ = {0};
				ValaGenieTokenType _tmp22_;
				_tmp22_ = vala_genie_scanner_read_regex_token (self, &_tmp20_, &_tmp21_);
				_vala_token_begin = _tmp20_;
				_vala_token_end = _tmp21_;
				result = _tmp22_;
				if (token_begin) {
					*token_begin = _vala_token_begin;
				}
				if (token_end) {
					*token_end = _vala_token_end;
				}
				return result;
			}
		}
	}
	_tmp23_ = self->priv->pending_dedents;
	if (_tmp23_ > 0) {
		gint _tmp24_;
		gint _tmp25_;
		gchar* _tmp26_;
		gint _tmp27_;
		gint _tmp28_;
		gchar* _tmp29_;
		gint _tmp30_;
		gint _tmp31_;
		_tmp24_ = self->priv->pending_dedents;
		self->priv->pending_dedents = _tmp24_ - 1;
		_tmp25_ = self->priv->indent_level;
		self->priv->indent_level = _tmp25_ - 1;
		_tmp26_ = self->priv->current;
		_tmp27_ = self->priv->line;
		_tmp28_ = self->priv->column;
		vala_source_location_init (&_vala_token_begin, _tmp26_, _tmp27_, _tmp28_);
		_tmp29_ = self->priv->current;
		_tmp30_ = self->priv->line;
		_tmp31_ = self->priv->column;
		vala_source_location_init (&_vala_token_end, _tmp29_, _tmp30_, _tmp31_);
		self->priv->last_token = VALA_GENIE_TOKEN_TYPE_DEDENT;
		result = VALA_GENIE_TOKEN_TYPE_DEDENT;
		if (token_begin) {
			*token_begin = _vala_token_begin;
		}
		if (token_end) {
			*token_end = _vala_token_end;
		}
		return result;
	}
	_tmp33_ = self->priv->_indent_spaces;
	if (_tmp33_ == 0) {
		_tmp32_ = TRUE;
	} else {
		ValaGenieTokenType _tmp34_;
		_tmp34_ = self->priv->last_token;
		_tmp32_ = _tmp34_ != VALA_GENIE_TOKEN_TYPE_EOL;
	}
	if (_tmp32_) {
		vala_genie_scanner_space (self);
	}
	while (TRUE) {
		gboolean _tmp35_ = FALSE;
		gboolean _tmp36_ = FALSE;
		gchar* _tmp37_;
		gchar* _tmp38_;
		gchar* _tmp43_;
		gint _tmp44_;
		_tmp37_ = self->priv->current;
		_tmp38_ = self->priv->end;
		if (_tmp37_ < _tmp38_) {
			gchar* _tmp39_;
			gchar _tmp40_;
			_tmp39_ = self->priv->current;
			_tmp40_ = _tmp39_[0];
			_tmp36_ = _tmp40_ == '\\';
		} else {
			_tmp36_ = FALSE;
		}
		if (_tmp36_) {
			gchar* _tmp41_;
			gchar _tmp42_;
			_tmp41_ = self->priv->current;
			_tmp42_ = _tmp41_[1];
			_tmp35_ = _tmp42_ == '\n';
		} else {
			_tmp35_ = FALSE;
		}
		if (!_tmp35_) {
			break;
		}
		_tmp43_ = self->priv->current;
		self->priv->current = _tmp43_ + 2;
		_tmp44_ = self->priv->line;
		self->priv->line = _tmp44_ + 1;
		vala_genie_scanner_skip_space_tabs (self);
	}
	while (TRUE) {
		gboolean _tmp45_ = FALSE;
		gboolean _tmp46_ = FALSE;
		gchar* _tmp47_;
		gchar* _tmp48_;
		gchar* _tmp54_;
		gint _tmp55_;
		_tmp47_ = self->priv->current;
		_tmp48_ = self->priv->end;
		if (_tmp47_ < _tmp48_) {
			gchar* _tmp49_;
			gchar _tmp50_;
			_tmp49_ = self->priv->current;
			_tmp50_ = _tmp49_[0];
			_tmp46_ = _tmp50_ == '\n';
		} else {
			_tmp46_ = FALSE;
		}
		if (_tmp46_) {
			gboolean _tmp51_ = FALSE;
			gint _tmp52_;
			_tmp52_ = self->priv->open_parens_count;
			if (_tmp52_ > 0) {
				_tmp51_ = TRUE;
			} else {
				gint _tmp53_;
				_tmp53_ = self->priv->open_brace_count;
				_tmp51_ = _tmp53_ > 0;
			}
			_tmp45_ = _tmp51_;
		} else {
			_tmp45_ = FALSE;
		}
		if (!_tmp45_) {
			break;
		}
		_tmp54_ = self->priv->current;
		self->priv->current = _tmp54_ + 1;
		_tmp55_ = self->priv->line;
		self->priv->line = _tmp55_ + 1;
		vala_genie_scanner_skip_space_tabs (self);
	}
	_tmp59_ = vala_genie_scanner_newline (self);
	if (_tmp59_) {
		gboolean _tmp60_;
		_tmp60_ = self->priv->parse_started;
		_tmp58_ = _tmp60_;
	} else {
		_tmp58_ = FALSE;
	}
	if (_tmp58_) {
		ValaGenieTokenType _tmp61_;
		_tmp61_ = self->priv->last_token;
		_tmp57_ = _tmp61_ != VALA_GENIE_TOKEN_TYPE_EOL;
	} else {
		_tmp57_ = FALSE;
	}
	if (_tmp57_) {
		ValaGenieTokenType _tmp62_;
		_tmp62_ = self->priv->last_token;
		_tmp56_ = _tmp62_ != VALA_GENIE_TOKEN_TYPE_SEMICOLON;
	} else {
		_tmp56_ = FALSE;
	}
	if (_tmp56_) {
		gchar* _tmp63_;
		gint _tmp64_;
		gint _tmp65_;
		gchar* _tmp66_;
		gint _tmp67_;
		gint _tmp68_;
		_tmp63_ = self->priv->current;
		_tmp64_ = self->priv->line;
		_tmp65_ = self->priv->column;
		vala_source_location_init (&_vala_token_begin, _tmp63_, _tmp64_, _tmp65_);
		_tmp66_ = self->priv->current;
		_tmp67_ = self->priv->line;
		_tmp68_ = self->priv->column;
		vala_source_location_init (&_vala_token_end, _tmp66_, _tmp67_, _tmp68_);
		self->priv->last_token = VALA_GENIE_TOKEN_TYPE_EOL;
		result = VALA_GENIE_TOKEN_TYPE_EOL;
		if (token_begin) {
			*token_begin = _vala_token_begin;
		}
		if (token_end) {
			*token_end = _vala_token_end;
		}
		return result;
	}
	while (TRUE) {
		gboolean _tmp69_;
		gchar* _tmp70_;
		gint _tmp71_;
		gint _tmp72_;
		gint _tmp73_;
		gint _tmp74_;
		gint _tmp75_;
		gint _tmp76_;
		_tmp69_ = vala_genie_scanner_skip_newlines (self);
		if (!_tmp69_) {
			break;
		}
		_tmp70_ = self->priv->current;
		_tmp71_ = self->priv->line;
		_tmp72_ = self->priv->column;
		vala_source_location_init (&_vala_token_begin, _tmp70_, _tmp71_, _tmp72_);
		_tmp73_ = vala_genie_scanner_count_tabs (self);
		self->priv->current_indent_level = _tmp73_;
		_tmp74_ = self->priv->current_indent_level;
		if (_tmp74_ == -1) {
			continue;
		}
		_tmp75_ = self->priv->current_indent_level;
		_tmp76_ = self->priv->indent_level;
		if (_tmp75_ > _tmp76_) {
			gint _tmp77_;
			gchar* _tmp78_;
			gint _tmp79_;
			gint _tmp80_;
			_tmp77_ = self->priv->current_indent_level;
			self->priv->indent_level = _tmp77_;
			_tmp78_ = self->priv->current;
			_tmp79_ = self->priv->line;
			_tmp80_ = self->priv->column;
			vala_source_location_init (&_vala_token_end, _tmp78_, _tmp79_, _tmp80_);
			self->priv->last_token = VALA_GENIE_TOKEN_TYPE_INDENT;
			result = VALA_GENIE_TOKEN_TYPE_INDENT;
			if (token_begin) {
				*token_begin = _vala_token_begin;
			}
			if (token_end) {
				*token_end = _vala_token_end;
			}
			return result;
		} else {
			gint _tmp81_;
			gint _tmp82_;
			_tmp81_ = self->priv->current_indent_level;
			_tmp82_ = self->priv->indent_level;
			if (_tmp81_ < _tmp82_) {
				gint _tmp83_;
				gint _tmp84_;
				gint _tmp85_;
				gchar* _tmp86_;
				gint _tmp87_;
				gint _tmp88_;
				_tmp83_ = self->priv->indent_level;
				self->priv->indent_level = _tmp83_ - 1;
				_tmp84_ = self->priv->indent_level;
				_tmp85_ = self->priv->current_indent_level;
				self->priv->pending_dedents = _tmp84_ - _tmp85_;
				_tmp86_ = self->priv->current;
				_tmp87_ = self->priv->line;
				_tmp88_ = self->priv->column;
				vala_source_location_init (&_vala_token_end, _tmp86_, _tmp87_, _tmp88_);
				self->priv->last_token = VALA_GENIE_TOKEN_TYPE_DEDENT;
				result = VALA_GENIE_TOKEN_TYPE_DEDENT;
				if (token_begin) {
					*token_begin = _vala_token_begin;
				}
				if (token_end) {
					*token_end = _vala_token_end;
				}
				return result;
			}
		}
	}
	_tmp89_ = self->priv->current;
	begin = _tmp89_;
	_tmp90_ = begin;
	_tmp91_ = self->priv->line;
	_tmp92_ = self->priv->column;
	vala_source_location_init (&_vala_token_begin, _tmp90_, _tmp91_, _tmp92_);
	token_length_in_chars = -1;
	self->priv->parse_started = TRUE;
	_tmp93_ = self->priv->current;
	_tmp94_ = self->priv->end;
	if (_tmp93_ >= _tmp94_) {
		gint _tmp95_;
		_tmp95_ = self->priv->indent_level;
		if (_tmp95_ > 0) {
			gint _tmp96_;
			gint _tmp97_;
			_tmp96_ = self->priv->indent_level;
			self->priv->indent_level = _tmp96_ - 1;
			_tmp97_ = self->priv->indent_level;
			self->priv->pending_dedents = _tmp97_;
			type = VALA_GENIE_TOKEN_TYPE_DEDENT;
		} else {
			type = VALA_GENIE_TOKEN_TYPE_EOF;
		}
	} else {
		gboolean _tmp98_ = FALSE;
		gchar* _tmp99_;
		gchar _tmp100_;
		gboolean _tmp101_;
		_tmp99_ = self->priv->current;
		_tmp100_ = _tmp99_[0];
		_tmp101_ = g_ascii_isalpha (_tmp100_);
		if (_tmp101_) {
			_tmp98_ = TRUE;
		} else {
			gchar* _tmp102_;
			gchar _tmp103_;
			_tmp102_ = self->priv->current;
			_tmp103_ = _tmp102_[0];
			_tmp98_ = _tmp103_ == '_';
		}
		if (_tmp98_) {
			gint len = 0;
			gchar* _tmp112_;
			gint _tmp113_;
			ValaGenieTokenType _tmp114_;
			len = 0;
			while (TRUE) {
				gboolean _tmp104_ = FALSE;
				gchar* _tmp105_;
				gchar* _tmp106_;
				gchar* _tmp110_;
				gint _tmp111_;
				_tmp105_ = self->priv->current;
				_tmp106_ = self->priv->end;
				if (_tmp105_ < _tmp106_) {
					gchar* _tmp107_;
					gchar _tmp108_;
					gboolean _tmp109_;
					_tmp107_ = self->priv->current;
					_tmp108_ = _tmp107_[0];
					_tmp109_ = vala_genie_scanner_is_ident_char (self, _tmp108_);
					_tmp104_ = _tmp109_;
				} else {
					_tmp104_ = FALSE;
				}
				if (!_tmp104_) {
					break;
				}
				_tmp110_ = self->priv->current;
				self->priv->current = _tmp110_ + 1;
				_tmp111_ = len;
				len = _tmp111_ + 1;
			}
			_tmp112_ = begin;
			_tmp113_ = len;
			_tmp114_ = vala_genie_scanner_get_identifier_or_keyword (_tmp112_, _tmp113_);
			type = _tmp114_;
		} else {
			gchar* _tmp115_;
			gchar _tmp116_;
			_tmp115_ = self->priv->current;
			_tmp116_ = _tmp115_[0];
			if (_tmp116_ == '@') {
				gboolean _tmp117_ = FALSE;
				gchar* _tmp118_;
				gchar* _tmp119_;
				_tmp118_ = self->priv->current;
				_tmp119_ = self->priv->end;
				if (_tmp118_ < (_tmp119_ - 1)) {
					gchar* _tmp120_;
					gchar _tmp121_;
					_tmp120_ = self->priv->current;
					_tmp121_ = _tmp120_[1];
					_tmp117_ = _tmp121_ == '"';
				} else {
					_tmp117_ = FALSE;
				}
				if (_tmp117_) {
					gchar* _tmp122_;
					ValaGenieScannerState* _tmp123_;
					gint _tmp123__length1;
					type = VALA_GENIE_TOKEN_TYPE_OPEN_TEMPLATE;
					_tmp122_ = self->priv->current;
					self->priv->current = _tmp122_ + 2;
					_tmp123_ = self->priv->state_stack;
					_tmp123__length1 = self->priv->state_stack_length1;
					_vala_array_add6 (&self->priv->state_stack, &self->priv->state_stack_length1, &self->priv->_state_stack_size_, VALA_GENIE_SCANNER_STATE_TEMPLATE);
				} else {
					gchar* _tmp124_;
					gchar* _tmp125_;
					gint len = 0;
					_tmp124_ = _vala_token_begin.pos;
					_vala_token_begin.pos = _tmp124_ + 1;
					_tmp125_ = self->priv->current;
					self->priv->current = _tmp125_ + 1;
					len = 0;
					while (TRUE) {
						gboolean _tmp126_ = FALSE;
						gchar* _tmp127_;
						gchar* _tmp128_;
						gchar* _tmp132_;
						gint _tmp133_;
						_tmp127_ = self->priv->current;
						_tmp128_ = self->priv->end;
						if (_tmp127_ < _tmp128_) {
							gchar* _tmp129_;
							gchar _tmp130_;
							gboolean _tmp131_;
							_tmp129_ = self->priv->current;
							_tmp130_ = _tmp129_[0];
							_tmp131_ = vala_genie_scanner_is_ident_char (self, _tmp130_);
							_tmp126_ = _tmp131_;
						} else {
							_tmp126_ = FALSE;
						}
						if (!_tmp126_) {
							break;
						}
						_tmp132_ = self->priv->current;
						self->priv->current = _tmp132_ + 1;
						_tmp133_ = len;
						len = _tmp133_ + 1;
					}
					type = VALA_GENIE_TOKEN_TYPE_IDENTIFIER;
				}
			} else {
				gchar* _tmp134_;
				gchar _tmp135_;
				gboolean _tmp136_;
				_tmp134_ = self->priv->current;
				_tmp135_ = _tmp134_[0];
				_tmp136_ = g_ascii_isdigit (_tmp135_);
				if (_tmp136_) {
					gboolean _tmp144_ = FALSE;
					gchar* _tmp145_;
					gchar* _tmp146_;
					while (TRUE) {
						gboolean _tmp137_ = FALSE;
						gchar* _tmp138_;
						gchar* _tmp139_;
						gchar* _tmp143_;
						_tmp138_ = self->priv->current;
						_tmp139_ = self->priv->end;
						if (_tmp138_ < _tmp139_) {
							gchar* _tmp140_;
							gchar _tmp141_;
							gboolean _tmp142_;
							_tmp140_ = self->priv->current;
							_tmp141_ = _tmp140_[0];
							_tmp142_ = g_ascii_isdigit (_tmp141_);
							_tmp137_ = _tmp142_;
						} else {
							_tmp137_ = FALSE;
						}
						if (!_tmp137_) {
							break;
						}
						_tmp143_ = self->priv->current;
						self->priv->current = _tmp143_ + 1;
					}
					type = VALA_GENIE_TOKEN_TYPE_INTEGER_LITERAL;
					_tmp145_ = self->priv->current;
					_tmp146_ = self->priv->end;
					if (_tmp145_ < _tmp146_) {
						gchar* _tmp147_;
						gchar _tmp148_;
						gchar _tmp149_;
						_tmp147_ = self->priv->current;
						_tmp148_ = _tmp147_[0];
						_tmp149_ = g_ascii_tolower (_tmp148_);
						_tmp144_ = _tmp149_ == 'l';
					} else {
						_tmp144_ = FALSE;
					}
					if (_tmp144_) {
						gchar* _tmp150_;
						gboolean _tmp151_ = FALSE;
						gchar* _tmp152_;
						gchar* _tmp153_;
						_tmp150_ = self->priv->current;
						self->priv->current = _tmp150_ + 1;
						_tmp152_ = self->priv->current;
						_tmp153_ = self->priv->end;
						if (_tmp152_ < _tmp153_) {
							gchar* _tmp154_;
							gchar _tmp155_;
							gchar _tmp156_;
							_tmp154_ = self->priv->current;
							_tmp155_ = _tmp154_[0];
							_tmp156_ = g_ascii_tolower (_tmp155_);
							_tmp151_ = _tmp156_ == 'l';
						} else {
							_tmp151_ = FALSE;
						}
						if (_tmp151_) {
							gchar* _tmp157_;
							_tmp157_ = self->priv->current;
							self->priv->current = _tmp157_ + 1;
						}
					} else {
						gboolean _tmp158_ = FALSE;
						gchar* _tmp159_;
						gchar* _tmp160_;
						_tmp159_ = self->priv->current;
						_tmp160_ = self->priv->end;
						if (_tmp159_ < _tmp160_) {
							gchar* _tmp161_;
							gchar _tmp162_;
							gchar _tmp163_;
							_tmp161_ = self->priv->current;
							_tmp162_ = _tmp161_[0];
							_tmp163_ = g_ascii_tolower (_tmp162_);
							_tmp158_ = _tmp163_ == 'u';
						} else {
							_tmp158_ = FALSE;
						}
						if (_tmp158_) {
							gchar* _tmp164_;
							gboolean _tmp165_ = FALSE;
							gchar* _tmp166_;
							gchar* _tmp167_;
							_tmp164_ = self->priv->current;
							self->priv->current = _tmp164_ + 1;
							_tmp166_ = self->priv->current;
							_tmp167_ = self->priv->end;
							if (_tmp166_ < _tmp167_) {
								gchar* _tmp168_;
								gchar _tmp169_;
								gchar _tmp170_;
								_tmp168_ = self->priv->current;
								_tmp169_ = _tmp168_[0];
								_tmp170_ = g_ascii_tolower (_tmp169_);
								_tmp165_ = _tmp170_ == 'l';
							} else {
								_tmp165_ = FALSE;
							}
							if (_tmp165_) {
								gchar* _tmp171_;
								gboolean _tmp172_ = FALSE;
								gchar* _tmp173_;
								gchar* _tmp174_;
								_tmp171_ = self->priv->current;
								self->priv->current = _tmp171_ + 1;
								_tmp173_ = self->priv->current;
								_tmp174_ = self->priv->end;
								if (_tmp173_ < _tmp174_) {
									gchar* _tmp175_;
									gchar _tmp176_;
									gchar _tmp177_;
									_tmp175_ = self->priv->current;
									_tmp176_ = _tmp175_[0];
									_tmp177_ = g_ascii_tolower (_tmp176_);
									_tmp172_ = _tmp177_ == 'l';
								} else {
									_tmp172_ = FALSE;
								}
								if (_tmp172_) {
									gchar* _tmp178_;
									_tmp178_ = self->priv->current;
									self->priv->current = _tmp178_ + 1;
								}
							}
						} else {
							gboolean _tmp179_ = FALSE;
							gboolean _tmp180_ = FALSE;
							gchar* _tmp181_;
							gchar* _tmp182_;
							_tmp181_ = self->priv->current;
							_tmp182_ = self->priv->end;
							if (_tmp181_ < (_tmp182_ - 1)) {
								gchar* _tmp183_;
								gchar _tmp184_;
								_tmp183_ = self->priv->current;
								_tmp184_ = _tmp183_[0];
								_tmp180_ = _tmp184_ == '.';
							} else {
								_tmp180_ = FALSE;
							}
							if (_tmp180_) {
								gchar* _tmp185_;
								gchar _tmp186_;
								gboolean _tmp187_;
								_tmp185_ = self->priv->current;
								_tmp186_ = _tmp185_[1];
								_tmp187_ = g_ascii_isdigit (_tmp186_);
								_tmp179_ = _tmp187_;
							} else {
								_tmp179_ = FALSE;
							}
							if (_tmp179_) {
								gchar* _tmp188_;
								gboolean _tmp196_ = FALSE;
								gchar* _tmp197_;
								gchar* _tmp198_;
								gboolean _tmp219_ = FALSE;
								gchar* _tmp220_;
								gchar* _tmp221_;
								_tmp188_ = self->priv->current;
								self->priv->current = _tmp188_ + 1;
								while (TRUE) {
									gboolean _tmp189_ = FALSE;
									gchar* _tmp190_;
									gchar* _tmp191_;
									gchar* _tmp195_;
									_tmp190_ = self->priv->current;
									_tmp191_ = self->priv->end;
									if (_tmp190_ < _tmp191_) {
										gchar* _tmp192_;
										gchar _tmp193_;
										gboolean _tmp194_;
										_tmp192_ = self->priv->current;
										_tmp193_ = _tmp192_[0];
										_tmp194_ = g_ascii_isdigit (_tmp193_);
										_tmp189_ = _tmp194_;
									} else {
										_tmp189_ = FALSE;
									}
									if (!_tmp189_) {
										break;
									}
									_tmp195_ = self->priv->current;
									self->priv->current = _tmp195_ + 1;
								}
								_tmp197_ = self->priv->current;
								_tmp198_ = self->priv->end;
								if (_tmp197_ < _tmp198_) {
									gchar* _tmp199_;
									gchar _tmp200_;
									gchar _tmp201_;
									_tmp199_ = self->priv->current;
									_tmp200_ = _tmp199_[0];
									_tmp201_ = g_ascii_tolower (_tmp200_);
									_tmp196_ = _tmp201_ == 'e';
								} else {
									_tmp196_ = FALSE;
								}
								if (_tmp196_) {
									gchar* _tmp202_;
									gboolean _tmp203_ = FALSE;
									gchar* _tmp204_;
									gchar* _tmp205_;
									_tmp202_ = self->priv->current;
									self->priv->current = _tmp202_ + 1;
									_tmp204_ = self->priv->current;
									_tmp205_ = self->priv->end;
									if (_tmp204_ < _tmp205_) {
										gboolean _tmp206_ = FALSE;
										gchar* _tmp207_;
										gchar _tmp208_;
										_tmp207_ = self->priv->current;
										_tmp208_ = _tmp207_[0];
										if (_tmp208_ == '+') {
											_tmp206_ = TRUE;
										} else {
											gchar* _tmp209_;
											gchar _tmp210_;
											_tmp209_ = self->priv->current;
											_tmp210_ = _tmp209_[0];
											_tmp206_ = _tmp210_ == '-';
										}
										_tmp203_ = _tmp206_;
									} else {
										_tmp203_ = FALSE;
									}
									if (_tmp203_) {
										gchar* _tmp211_;
										_tmp211_ = self->priv->current;
										self->priv->current = _tmp211_ + 1;
									}
									while (TRUE) {
										gboolean _tmp212_ = FALSE;
										gchar* _tmp213_;
										gchar* _tmp214_;
										gchar* _tmp218_;
										_tmp213_ = self->priv->current;
										_tmp214_ = self->priv->end;
										if (_tmp213_ < _tmp214_) {
											gchar* _tmp215_;
											gchar _tmp216_;
											gboolean _tmp217_;
											_tmp215_ = self->priv->current;
											_tmp216_ = _tmp215_[0];
											_tmp217_ = g_ascii_isdigit (_tmp216_);
											_tmp212_ = _tmp217_;
										} else {
											_tmp212_ = FALSE;
										}
										if (!_tmp212_) {
											break;
										}
										_tmp218_ = self->priv->current;
										self->priv->current = _tmp218_ + 1;
									}
								}
								_tmp220_ = self->priv->current;
								_tmp221_ = self->priv->end;
								if (_tmp220_ < _tmp221_) {
									gchar* _tmp222_;
									gchar _tmp223_;
									gchar _tmp224_;
									_tmp222_ = self->priv->current;
									_tmp223_ = _tmp222_[0];
									_tmp224_ = g_ascii_tolower (_tmp223_);
									_tmp219_ = _tmp224_ == 'f';
								} else {
									_tmp219_ = FALSE;
								}
								if (_tmp219_) {
									gchar* _tmp225_;
									_tmp225_ = self->priv->current;
									self->priv->current = _tmp225_ + 1;
								}
								type = VALA_GENIE_TOKEN_TYPE_REAL_LITERAL;
							} else {
								gboolean _tmp226_ = FALSE;
								gboolean _tmp227_ = FALSE;
								gboolean _tmp228_ = FALSE;
								gboolean _tmp229_ = FALSE;
								gchar* _tmp230_;
								gchar* _tmp231_;
								_tmp230_ = self->priv->current;
								_tmp231_ = self->priv->end;
								if (_tmp230_ < _tmp231_) {
									gchar* _tmp232_;
									gchar* _tmp233_;
									_tmp232_ = self->priv->current;
									_tmp233_ = begin;
									_tmp229_ = _tmp232_ == (_tmp233_ + 1);
								} else {
									_tmp229_ = FALSE;
								}
								if (_tmp229_) {
									gchar* _tmp234_;
									gchar _tmp235_;
									_tmp234_ = begin;
									_tmp235_ = _tmp234_[0];
									_tmp228_ = _tmp235_ == '0';
								} else {
									_tmp228_ = FALSE;
								}
								if (_tmp228_) {
									gchar* _tmp236_;
									gchar _tmp237_;
									_tmp236_ = begin;
									_tmp237_ = _tmp236_[1];
									_tmp227_ = _tmp237_ == 'x';
								} else {
									_tmp227_ = FALSE;
								}
								if (_tmp227_) {
									gchar* _tmp238_;
									gchar _tmp239_;
									gboolean _tmp240_;
									_tmp238_ = begin;
									_tmp239_ = _tmp238_[2];
									_tmp240_ = g_ascii_isxdigit (_tmp239_);
									_tmp226_ = _tmp240_;
								} else {
									_tmp226_ = FALSE;
								}
								if (_tmp226_) {
									gchar* _tmp241_;
									_tmp241_ = self->priv->current;
									self->priv->current = _tmp241_ + 1;
									while (TRUE) {
										gboolean _tmp242_ = FALSE;
										gchar* _tmp243_;
										gchar* _tmp244_;
										gchar* _tmp248_;
										_tmp243_ = self->priv->current;
										_tmp244_ = self->priv->end;
										if (_tmp243_ < _tmp244_) {
											gchar* _tmp245_;
											gchar _tmp246_;
											gboolean _tmp247_;
											_tmp245_ = self->priv->current;
											_tmp246_ = _tmp245_[0];
											_tmp247_ = g_ascii_isxdigit (_tmp246_);
											_tmp242_ = _tmp247_;
										} else {
											_tmp242_ = FALSE;
										}
										if (!_tmp242_) {
											break;
										}
										_tmp248_ = self->priv->current;
										self->priv->current = _tmp248_ + 1;
									}
								} else {
									gboolean _tmp249_ = FALSE;
									gchar* _tmp250_;
									gchar* _tmp251_;
									_tmp250_ = self->priv->current;
									_tmp251_ = self->priv->end;
									if (_tmp250_ < _tmp251_) {
										gchar* _tmp252_;
										gchar _tmp253_;
										gboolean _tmp254_;
										_tmp252_ = self->priv->current;
										_tmp253_ = _tmp252_[0];
										_tmp254_ = vala_genie_scanner_is_ident_char (self, _tmp253_);
										_tmp249_ = _tmp254_;
									} else {
										_tmp249_ = FALSE;
									}
									if (_tmp249_) {
										while (TRUE) {
											gboolean _tmp255_ = FALSE;
											gchar* _tmp256_;
											gchar* _tmp257_;
											gchar* _tmp261_;
											_tmp256_ = self->priv->current;
											_tmp257_ = self->priv->end;
											if (_tmp256_ < _tmp257_) {
												gchar* _tmp258_;
												gchar _tmp259_;
												gboolean _tmp260_;
												_tmp258_ = self->priv->current;
												_tmp259_ = _tmp258_[0];
												_tmp260_ = vala_genie_scanner_is_ident_char (self, _tmp259_);
												_tmp255_ = _tmp260_;
											} else {
												_tmp255_ = FALSE;
											}
											if (!_tmp255_) {
												break;
											}
											_tmp261_ = self->priv->current;
											self->priv->current = _tmp261_ + 1;
										}
										type = VALA_GENIE_TOKEN_TYPE_IDENTIFIER;
									}
								}
							}
						}
					}
				} else {
					gchar* _tmp262_;
					gchar _tmp263_;
					_tmp262_ = self->priv->current;
					_tmp263_ = _tmp262_[0];
					switch (_tmp263_) {
						case '{':
						{
							gint _tmp264_;
							ValaGenieScannerState* _tmp265_;
							gint _tmp265__length1;
							gchar* _tmp266_;
							type = VALA_GENIE_TOKEN_TYPE_OPEN_BRACE;
							_tmp264_ = self->priv->open_brace_count;
							self->priv->open_brace_count = _tmp264_ + 1;
							_tmp265_ = self->priv->state_stack;
							_tmp265__length1 = self->priv->state_stack_length1;
							_vala_array_add7 (&self->priv->state_stack, &self->priv->state_stack_length1, &self->priv->_state_stack_size_, VALA_GENIE_SCANNER_STATE_BRACE);
							_tmp266_ = self->priv->current;
							self->priv->current = _tmp266_ + 1;
							break;
						}
						case '}':
						{
							gint _tmp267_;
							ValaGenieScannerState* _tmp268_;
							gint _tmp268__length1;
							gchar* _tmp270_;
							type = VALA_GENIE_TOKEN_TYPE_CLOSE_BRACE;
							_tmp267_ = self->priv->open_brace_count;
							self->priv->open_brace_count = _tmp267_ - 1;
							_tmp268_ = self->priv->state_stack;
							_tmp268__length1 = self->priv->state_stack_length1;
							if (_tmp268__length1 > 0) {
								gint _tmp269_;
								_tmp269_ = self->priv->state_stack_length1;
								self->priv->state_stack_length1 = _tmp269_ - 1;
							}
							_tmp270_ = self->priv->current;
							self->priv->current = _tmp270_ + 1;
							break;
						}
						case '(':
						{
							gint _tmp271_;
							ValaGenieScannerState* _tmp272_;
							gint _tmp272__length1;
							gchar* _tmp273_;
							type = VALA_GENIE_TOKEN_TYPE_OPEN_PARENS;
							_tmp271_ = self->priv->open_parens_count;
							self->priv->open_parens_count = _tmp271_ + 1;
							_tmp272_ = self->priv->state_stack;
							_tmp272__length1 = self->priv->state_stack_length1;
							_vala_array_add8 (&self->priv->state_stack, &self->priv->state_stack_length1, &self->priv->_state_stack_size_, VALA_GENIE_SCANNER_STATE_PARENS);
							_tmp273_ = self->priv->current;
							self->priv->current = _tmp273_ + 1;
							break;
						}
						case ')':
						{
							gint _tmp274_;
							gchar* _tmp275_;
							ValaGenieScannerState* _tmp276_;
							gint _tmp276__length1;
							gboolean _tmp278_;
							type = VALA_GENIE_TOKEN_TYPE_CLOSE_PARENS;
							_tmp274_ = self->priv->open_parens_count;
							self->priv->open_parens_count = _tmp274_ - 1;
							_tmp275_ = self->priv->current;
							self->priv->current = _tmp275_ + 1;
							_tmp276_ = self->priv->state_stack;
							_tmp276__length1 = self->priv->state_stack_length1;
							if (_tmp276__length1 > 0) {
								gint _tmp277_;
								_tmp277_ = self->priv->state_stack_length1;
								self->priv->state_stack_length1 = _tmp277_ - 1;
							}
							_tmp278_ = vala_genie_scanner_in_template (self);
							if (_tmp278_) {
								type = VALA_GENIE_TOKEN_TYPE_COMMA;
							}
							break;
						}
						case '[':
						{
							ValaGenieScannerState* _tmp279_;
							gint _tmp279__length1;
							gchar* _tmp280_;
							type = VALA_GENIE_TOKEN_TYPE_OPEN_BRACKET;
							_tmp279_ = self->priv->state_stack;
							_tmp279__length1 = self->priv->state_stack_length1;
							_vala_array_add9 (&self->priv->state_stack, &self->priv->state_stack_length1, &self->priv->_state_stack_size_, VALA_GENIE_SCANNER_STATE_BRACKET);
							_tmp280_ = self->priv->current;
							self->priv->current = _tmp280_ + 1;
							break;
						}
						case ']':
						{
							ValaGenieScannerState* _tmp281_;
							gint _tmp281__length1;
							gchar* _tmp283_;
							type = VALA_GENIE_TOKEN_TYPE_CLOSE_BRACKET;
							_tmp281_ = self->priv->state_stack;
							_tmp281__length1 = self->priv->state_stack_length1;
							if (_tmp281__length1 > 0) {
								gint _tmp282_;
								_tmp282_ = self->priv->state_stack_length1;
								self->priv->state_stack_length1 = _tmp282_ - 1;
							}
							_tmp283_ = self->priv->current;
							self->priv->current = _tmp283_ + 1;
							break;
						}
						case '.':
						{
							gchar* _tmp284_;
							gchar* _tmp285_;
							gchar* _tmp286_;
							type = VALA_GENIE_TOKEN_TYPE_DOT;
							_tmp284_ = self->priv->current;
							self->priv->current = _tmp284_ + 1;
							_tmp285_ = self->priv->current;
							_tmp286_ = self->priv->end;
							if (_tmp285_ < (_tmp286_ - 1)) {
								gboolean _tmp287_ = FALSE;
								gchar* _tmp288_;
								gchar _tmp289_;
								_tmp288_ = self->priv->current;
								_tmp289_ = _tmp288_[0];
								if (_tmp289_ == '.') {
									gchar* _tmp290_;
									gchar _tmp291_;
									_tmp290_ = self->priv->current;
									_tmp291_ = _tmp290_[1];
									_tmp287_ = _tmp291_ == '.';
								} else {
									_tmp287_ = FALSE;
								}
								if (_tmp287_) {
									gchar* _tmp292_;
									type = VALA_GENIE_TOKEN_TYPE_ELLIPSIS;
									_tmp292_ = self->priv->current;
									self->priv->current = _tmp292_ + 2;
								}
							}
							break;
						}
						case ':':
						{
							gchar* _tmp293_;
							type = VALA_GENIE_TOKEN_TYPE_COLON;
							_tmp293_ = self->priv->current;
							self->priv->current = _tmp293_ + 1;
							break;
						}
						case ',':
						{
							gchar* _tmp294_;
							type = VALA_GENIE_TOKEN_TYPE_COMMA;
							_tmp294_ = self->priv->current;
							self->priv->current = _tmp294_ + 1;
							break;
						}
						case ';':
						{
							gchar* _tmp295_;
							type = VALA_GENIE_TOKEN_TYPE_SEMICOLON;
							_tmp295_ = self->priv->current;
							self->priv->current = _tmp295_ + 1;
							break;
						}
						case '#':
						{
							gchar* _tmp296_;
							type = VALA_GENIE_TOKEN_TYPE_HASH;
							_tmp296_ = self->priv->current;
							self->priv->current = _tmp296_ + 1;
							break;
						}
						case '?':
						{
							gchar* _tmp297_;
							type = VALA_GENIE_TOKEN_TYPE_INTERR;
							_tmp297_ = self->priv->current;
							self->priv->current = _tmp297_ + 1;
							break;
						}
						case '|':
						{
							gchar* _tmp298_;
							gchar* _tmp299_;
							gchar* _tmp300_;
							type = VALA_GENIE_TOKEN_TYPE_BITWISE_OR;
							_tmp298_ = self->priv->current;
							self->priv->current = _tmp298_ + 1;
							_tmp299_ = self->priv->current;
							_tmp300_ = self->priv->end;
							if (_tmp299_ < _tmp300_) {
								gchar* _tmp301_;
								gchar _tmp302_;
								_tmp301_ = self->priv->current;
								_tmp302_ = _tmp301_[0];
								switch (_tmp302_) {
									case '=':
									{
										gchar* _tmp303_;
										type = VALA_GENIE_TOKEN_TYPE_ASSIGN_BITWISE_OR;
										_tmp303_ = self->priv->current;
										self->priv->current = _tmp303_ + 1;
										break;
									}
									case '|':
									{
										gchar* _tmp304_;
										type = VALA_GENIE_TOKEN_TYPE_OP_OR;
										_tmp304_ = self->priv->current;
										self->priv->current = _tmp304_ + 1;
										break;
									}
									default:
									break;
								}
							}
							break;
						}
						case '&':
						{
							gchar* _tmp305_;
							gchar* _tmp306_;
							gchar* _tmp307_;
							type = VALA_GENIE_TOKEN_TYPE_BITWISE_AND;
							_tmp305_ = self->priv->current;
							self->priv->current = _tmp305_ + 1;
							_tmp306_ = self->priv->current;
							_tmp307_ = self->priv->end;
							if (_tmp306_ < _tmp307_) {
								gchar* _tmp308_;
								gchar _tmp309_;
								_tmp308_ = self->priv->current;
								_tmp309_ = _tmp308_[0];
								switch (_tmp309_) {
									case '=':
									{
										gchar* _tmp310_;
										type = VALA_GENIE_TOKEN_TYPE_ASSIGN_BITWISE_AND;
										_tmp310_ = self->priv->current;
										self->priv->current = _tmp310_ + 1;
										break;
									}
									case '&':
									{
										gchar* _tmp311_;
										type = VALA_GENIE_TOKEN_TYPE_OP_AND;
										_tmp311_ = self->priv->current;
										self->priv->current = _tmp311_ + 1;
										break;
									}
									default:
									break;
								}
							}
							break;
						}
						case '^':
						{
							gchar* _tmp312_;
							gboolean _tmp313_ = FALSE;
							gchar* _tmp314_;
							gchar* _tmp315_;
							type = VALA_GENIE_TOKEN_TYPE_CARRET;
							_tmp312_ = self->priv->current;
							self->priv->current = _tmp312_ + 1;
							_tmp314_ = self->priv->current;
							_tmp315_ = self->priv->end;
							if (_tmp314_ < _tmp315_) {
								gchar* _tmp316_;
								gchar _tmp317_;
								_tmp316_ = self->priv->current;
								_tmp317_ = _tmp316_[0];
								_tmp313_ = _tmp317_ == '=';
							} else {
								_tmp313_ = FALSE;
							}
							if (_tmp313_) {
								gchar* _tmp318_;
								type = VALA_GENIE_TOKEN_TYPE_ASSIGN_BITWISE_XOR;
								_tmp318_ = self->priv->current;
								self->priv->current = _tmp318_ + 1;
							}
							break;
						}
						case '~':
						{
							gchar* _tmp319_;
							type = VALA_GENIE_TOKEN_TYPE_TILDE;
							_tmp319_ = self->priv->current;
							self->priv->current = _tmp319_ + 1;
							break;
						}
						case '=':
						{
							gchar* _tmp320_;
							gchar* _tmp321_;
							gchar* _tmp322_;
							type = VALA_GENIE_TOKEN_TYPE_ASSIGN;
							_tmp320_ = self->priv->current;
							self->priv->current = _tmp320_ + 1;
							_tmp321_ = self->priv->current;
							_tmp322_ = self->priv->end;
							if (_tmp321_ < _tmp322_) {
								gchar* _tmp323_;
								gchar _tmp324_;
								_tmp323_ = self->priv->current;
								_tmp324_ = _tmp323_[0];
								switch (_tmp324_) {
									case '=':
									{
										gchar* _tmp325_;
										type = VALA_GENIE_TOKEN_TYPE_OP_EQ;
										_tmp325_ = self->priv->current;
										self->priv->current = _tmp325_ + 1;
										break;
									}
									case '>':
									{
										gchar* _tmp326_;
										type = VALA_GENIE_TOKEN_TYPE_LAMBDA;
										_tmp326_ = self->priv->current;
										self->priv->current = _tmp326_ + 1;
										break;
									}
									default:
									break;
								}
							}
							break;
						}
						case '<':
						{
							gchar* _tmp327_;
							gchar* _tmp328_;
							gchar* _tmp329_;
							type = VALA_GENIE_TOKEN_TYPE_OP_LT;
							_tmp327_ = self->priv->current;
							self->priv->current = _tmp327_ + 1;
							_tmp328_ = self->priv->current;
							_tmp329_ = self->priv->end;
							if (_tmp328_ < _tmp329_) {
								gchar* _tmp330_;
								gchar _tmp331_;
								_tmp330_ = self->priv->current;
								_tmp331_ = _tmp330_[0];
								switch (_tmp331_) {
									case '=':
									{
										gchar* _tmp332_;
										type = VALA_GENIE_TOKEN_TYPE_OP_LE;
										_tmp332_ = self->priv->current;
										self->priv->current = _tmp332_ + 1;
										break;
									}
									case '<':
									{
										gchar* _tmp333_;
										gboolean _tmp334_ = FALSE;
										gchar* _tmp335_;
										gchar* _tmp336_;
										type = VALA_GENIE_TOKEN_TYPE_OP_SHIFT_LEFT;
										_tmp333_ = self->priv->current;
										self->priv->current = _tmp333_ + 1;
										_tmp335_ = self->priv->current;
										_tmp336_ = self->priv->end;
										if (_tmp335_ < _tmp336_) {
											gchar* _tmp337_;
											gchar _tmp338_;
											_tmp337_ = self->priv->current;
											_tmp338_ = _tmp337_[0];
											_tmp334_ = _tmp338_ == '=';
										} else {
											_tmp334_ = FALSE;
										}
										if (_tmp334_) {
											gchar* _tmp339_;
											type = VALA_GENIE_TOKEN_TYPE_ASSIGN_SHIFT_LEFT;
											_tmp339_ = self->priv->current;
											self->priv->current = _tmp339_ + 1;
										}
										break;
									}
									default:
									break;
								}
							}
							break;
						}
						case '>':
						{
							gchar* _tmp340_;
							gboolean _tmp341_ = FALSE;
							gchar* _tmp342_;
							gchar* _tmp343_;
							type = VALA_GENIE_TOKEN_TYPE_OP_GT;
							_tmp340_ = self->priv->current;
							self->priv->current = _tmp340_ + 1;
							_tmp342_ = self->priv->current;
							_tmp343_ = self->priv->end;
							if (_tmp342_ < _tmp343_) {
								gchar* _tmp344_;
								gchar _tmp345_;
								_tmp344_ = self->priv->current;
								_tmp345_ = _tmp344_[0];
								_tmp341_ = _tmp345_ == '=';
							} else {
								_tmp341_ = FALSE;
							}
							if (_tmp341_) {
								gchar* _tmp346_;
								type = VALA_GENIE_TOKEN_TYPE_OP_GE;
								_tmp346_ = self->priv->current;
								self->priv->current = _tmp346_ + 1;
							}
							break;
						}
						case '!':
						{
							gchar* _tmp347_;
							gboolean _tmp348_ = FALSE;
							gchar* _tmp349_;
							gchar* _tmp350_;
							type = VALA_GENIE_TOKEN_TYPE_OP_NEG;
							_tmp347_ = self->priv->current;
							self->priv->current = _tmp347_ + 1;
							_tmp349_ = self->priv->current;
							_tmp350_ = self->priv->end;
							if (_tmp349_ < _tmp350_) {
								gchar* _tmp351_;
								gchar _tmp352_;
								_tmp351_ = self->priv->current;
								_tmp352_ = _tmp351_[0];
								_tmp348_ = _tmp352_ == '=';
							} else {
								_tmp348_ = FALSE;
							}
							if (_tmp348_) {
								gchar* _tmp353_;
								type = VALA_GENIE_TOKEN_TYPE_OP_NE;
								_tmp353_ = self->priv->current;
								self->priv->current = _tmp353_ + 1;
							}
							break;
						}
						case '+':
						{
							gchar* _tmp354_;
							gchar* _tmp355_;
							gchar* _tmp356_;
							type = VALA_GENIE_TOKEN_TYPE_PLUS;
							_tmp354_ = self->priv->current;
							self->priv->current = _tmp354_ + 1;
							_tmp355_ = self->priv->current;
							_tmp356_ = self->priv->end;
							if (_tmp355_ < _tmp356_) {
								gchar* _tmp357_;
								gchar _tmp358_;
								_tmp357_ = self->priv->current;
								_tmp358_ = _tmp357_[0];
								switch (_tmp358_) {
									case '=':
									{
										gchar* _tmp359_;
										type = VALA_GENIE_TOKEN_TYPE_ASSIGN_ADD;
										_tmp359_ = self->priv->current;
										self->priv->current = _tmp359_ + 1;
										break;
									}
									case '+':
									{
										gchar* _tmp360_;
										type = VALA_GENIE_TOKEN_TYPE_OP_INC;
										_tmp360_ = self->priv->current;
										self->priv->current = _tmp360_ + 1;
										break;
									}
									default:
									break;
								}
							}
							break;
						}
						case '-':
						{
							gchar* _tmp361_;
							gchar* _tmp362_;
							gchar* _tmp363_;
							type = VALA_GENIE_TOKEN_TYPE_MINUS;
							_tmp361_ = self->priv->current;
							self->priv->current = _tmp361_ + 1;
							_tmp362_ = self->priv->current;
							_tmp363_ = self->priv->end;
							if (_tmp362_ < _tmp363_) {
								gchar* _tmp364_;
								gchar _tmp365_;
								_tmp364_ = self->priv->current;
								_tmp365_ = _tmp364_[0];
								switch (_tmp365_) {
									case '=':
									{
										gchar* _tmp366_;
										type = VALA_GENIE_TOKEN_TYPE_ASSIGN_SUB;
										_tmp366_ = self->priv->current;
										self->priv->current = _tmp366_ + 1;
										break;
									}
									case '-':
									{
										gchar* _tmp367_;
										type = VALA_GENIE_TOKEN_TYPE_OP_DEC;
										_tmp367_ = self->priv->current;
										self->priv->current = _tmp367_ + 1;
										break;
									}
									case '>':
									{
										gchar* _tmp368_;
										type = VALA_GENIE_TOKEN_TYPE_OP_PTR;
										_tmp368_ = self->priv->current;
										self->priv->current = _tmp368_ + 1;
										break;
									}
									default:
									break;
								}
							}
							break;
						}
						case '*':
						{
							gchar* _tmp369_;
							gboolean _tmp370_ = FALSE;
							gchar* _tmp371_;
							gchar* _tmp372_;
							type = VALA_GENIE_TOKEN_TYPE_STAR;
							_tmp369_ = self->priv->current;
							self->priv->current = _tmp369_ + 1;
							_tmp371_ = self->priv->current;
							_tmp372_ = self->priv->end;
							if (_tmp371_ < _tmp372_) {
								gchar* _tmp373_;
								gchar _tmp374_;
								_tmp373_ = self->priv->current;
								_tmp374_ = _tmp373_[0];
								_tmp370_ = _tmp374_ == '=';
							} else {
								_tmp370_ = FALSE;
							}
							if (_tmp370_) {
								gchar* _tmp375_;
								type = VALA_GENIE_TOKEN_TYPE_ASSIGN_MUL;
								_tmp375_ = self->priv->current;
								self->priv->current = _tmp375_ + 1;
							}
							break;
						}
						case '/':
						{
							ValaGenieTokenType _tmp376_;
							_tmp376_ = self->priv->last_token;
							switch (_tmp376_) {
								case VALA_GENIE_TOKEN_TYPE_ASSIGN:
								case VALA_GENIE_TOKEN_TYPE_COMMA:
								case VALA_GENIE_TOKEN_TYPE_MINUS:
								case VALA_GENIE_TOKEN_TYPE_OP_AND:
								case VALA_GENIE_TOKEN_TYPE_OP_EQ:
								case VALA_GENIE_TOKEN_TYPE_OP_GE:
								case VALA_GENIE_TOKEN_TYPE_OP_GT:
								case VALA_GENIE_TOKEN_TYPE_OP_INC:
								case VALA_GENIE_TOKEN_TYPE_OP_LE:
								case VALA_GENIE_TOKEN_TYPE_OP_LT:
								case VALA_GENIE_TOKEN_TYPE_OP_NE:
								case VALA_GENIE_TOKEN_TYPE_OP_NEG:
								case VALA_GENIE_TOKEN_TYPE_OP_OR:
								case VALA_GENIE_TOKEN_TYPE_OPEN_BRACE:
								case VALA_GENIE_TOKEN_TYPE_OPEN_PARENS:
								case VALA_GENIE_TOKEN_TYPE_PLUS:
								case VALA_GENIE_TOKEN_TYPE_RETURN:
								{
									ValaGenieScannerState* _tmp377_;
									gint _tmp377__length1;
									gchar* _tmp378_;
									type = VALA_GENIE_TOKEN_TYPE_OPEN_REGEX_LITERAL;
									_tmp377_ = self->priv->state_stack;
									_tmp377__length1 = self->priv->state_stack_length1;
									_vala_array_add10 (&self->priv->state_stack, &self->priv->state_stack_length1, &self->priv->_state_stack_size_, VALA_GENIE_SCANNER_STATE_REGEX_LITERAL);
									_tmp378_ = self->priv->current;
									self->priv->current = _tmp378_ + 1;
									break;
								}
								default:
								{
									gchar* _tmp379_;
									gboolean _tmp380_ = FALSE;
									gchar* _tmp381_;
									gchar* _tmp382_;
									type = VALA_GENIE_TOKEN_TYPE_DIV;
									_tmp379_ = self->priv->current;
									self->priv->current = _tmp379_ + 1;
									_tmp381_ = self->priv->current;
									_tmp382_ = self->priv->end;
									if (_tmp381_ < _tmp382_) {
										gchar* _tmp383_;
										gchar _tmp384_;
										_tmp383_ = self->priv->current;
										_tmp384_ = _tmp383_[0];
										_tmp380_ = _tmp384_ == '=';
									} else {
										_tmp380_ = FALSE;
									}
									if (_tmp380_) {
										gchar* _tmp385_;
										type = VALA_GENIE_TOKEN_TYPE_ASSIGN_DIV;
										_tmp385_ = self->priv->current;
										self->priv->current = _tmp385_ + 1;
									}
									break;
								}
							}
							break;
						}
						case '%':
						{
							gchar* _tmp386_;
							gboolean _tmp387_ = FALSE;
							gchar* _tmp388_;
							gchar* _tmp389_;
							type = VALA_GENIE_TOKEN_TYPE_PERCENT;
							_tmp386_ = self->priv->current;
							self->priv->current = _tmp386_ + 1;
							_tmp388_ = self->priv->current;
							_tmp389_ = self->priv->end;
							if (_tmp388_ < _tmp389_) {
								gchar* _tmp390_;
								gchar _tmp391_;
								_tmp390_ = self->priv->current;
								_tmp391_ = _tmp390_[0];
								_tmp387_ = _tmp391_ == '=';
							} else {
								_tmp387_ = FALSE;
							}
							if (_tmp387_) {
								gchar* _tmp392_;
								type = VALA_GENIE_TOKEN_TYPE_ASSIGN_PERCENT;
								_tmp392_ = self->priv->current;
								self->priv->current = _tmp392_ + 1;
							}
							break;
						}
						case '\'':
						case '"':
						{
							gchar* _tmp393_;
							gchar _tmp394_;
							gchar* _tmp445_;
							gchar* _tmp504_;
							gchar* _tmp505_;
							_tmp393_ = begin;
							_tmp394_ = _tmp393_[0];
							if (_tmp394_ == '\'') {
								type = VALA_GENIE_TOKEN_TYPE_CHARACTER_LITERAL;
							} else {
								gboolean _tmp395_ = FALSE;
								gboolean _tmp396_ = FALSE;
								gchar* _tmp397_;
								gchar* _tmp398_;
								_tmp397_ = self->priv->current;
								_tmp398_ = self->priv->end;
								if (_tmp397_ < (_tmp398_ - 6)) {
									gchar* _tmp399_;
									gchar _tmp400_;
									_tmp399_ = begin;
									_tmp400_ = _tmp399_[1];
									_tmp396_ = _tmp400_ == '"';
								} else {
									_tmp396_ = FALSE;
								}
								if (_tmp396_) {
									gchar* _tmp401_;
									gchar _tmp402_;
									_tmp401_ = begin;
									_tmp402_ = _tmp401_[2];
									_tmp395_ = _tmp402_ == '"';
								} else {
									_tmp395_ = FALSE;
								}
								if (_tmp395_) {
									gchar* _tmp403_;
									gboolean _tmp433_ = FALSE;
									gboolean _tmp434_ = FALSE;
									gchar* _tmp435_;
									gchar _tmp436_;
									type = VALA_GENIE_TOKEN_TYPE_VERBATIM_STRING_LITERAL;
									token_length_in_chars = 6;
									_tmp403_ = self->priv->current;
									self->priv->current = _tmp403_ + 3;
									while (TRUE) {
										gchar* _tmp404_;
										gchar* _tmp405_;
										gboolean _tmp406_ = FALSE;
										gboolean _tmp407_ = FALSE;
										gboolean _tmp408_ = FALSE;
										gchar* _tmp409_;
										gchar _tmp410_;
										_tmp404_ = self->priv->current;
										_tmp405_ = self->priv->end;
										if (!(_tmp404_ < (_tmp405_ - 4))) {
											break;
										}
										_tmp409_ = self->priv->current;
										_tmp410_ = _tmp409_[0];
										if (_tmp410_ == '"') {
											gchar* _tmp411_;
											gchar _tmp412_;
											_tmp411_ = self->priv->current;
											_tmp412_ = _tmp411_[1];
											_tmp408_ = _tmp412_ == '"';
										} else {
											_tmp408_ = FALSE;
										}
										if (_tmp408_) {
											gchar* _tmp413_;
											gchar _tmp414_;
											_tmp413_ = self->priv->current;
											_tmp414_ = _tmp413_[2];
											_tmp407_ = _tmp414_ == '"';
										} else {
											_tmp407_ = FALSE;
										}
										if (_tmp407_) {
											gchar* _tmp415_;
											gchar _tmp416_;
											_tmp415_ = self->priv->current;
											_tmp416_ = _tmp415_[3];
											_tmp406_ = _tmp416_ != '"';
										} else {
											_tmp406_ = FALSE;
										}
										if (_tmp406_) {
											break;
										} else {
											gchar* _tmp417_;
											gchar _tmp418_;
											_tmp417_ = self->priv->current;
											_tmp418_ = _tmp417_[0];
											if (_tmp418_ == '\n') {
												gchar* _tmp419_;
												gint _tmp420_;
												_tmp419_ = self->priv->current;
												self->priv->current = _tmp419_ + 1;
												_tmp420_ = self->priv->line;
												self->priv->line = _tmp420_ + 1;
												self->priv->column = 1;
												token_length_in_chars = 3;
											} else {
												gunichar u = 0U;
												gchar* _tmp421_;
												gchar* _tmp422_;
												gchar* _tmp423_;
												gunichar _tmp424_;
												gunichar _tmp425_;
												_tmp421_ = self->priv->current;
												_tmp422_ = self->priv->end;
												_tmp423_ = self->priv->current;
												_tmp424_ = g_utf8_get_char_validated ((const gchar*) _tmp421_, (gssize) ((glong) (_tmp422_ - _tmp423_)));
												u = _tmp424_;
												_tmp425_ = u;
												if (_tmp425_ != ((gunichar) -1)) {
													gchar* _tmp426_;
													gunichar _tmp427_;
													gint _tmp428_;
													gint _tmp429_;
													_tmp426_ = self->priv->current;
													_tmp427_ = u;
													_tmp428_ = g_unichar_to_utf8 (_tmp427_, NULL);
													self->priv->current = _tmp426_ + _tmp428_;
													_tmp429_ = token_length_in_chars;
													token_length_in_chars = _tmp429_ + 1;
												} else {
													gint _tmp430_;
													ValaSourceReference* _tmp431_;
													ValaSourceReference* _tmp432_;
													_tmp430_ = token_length_in_chars;
													_tmp431_ = vala_genie_scanner_get_source_reference (self, _tmp430_, 0);
													_tmp432_ = _tmp431_;
													vala_report_error (_tmp432_, "invalid UTF-8 character");
													_vala_source_reference_unref0 (_tmp432_);
												}
											}
										}
									}
									_tmp435_ = self->priv->current;
									_tmp436_ = _tmp435_[0];
									if (_tmp436_ == '"') {
										gchar* _tmp437_;
										gchar _tmp438_;
										_tmp437_ = self->priv->current;
										_tmp438_ = _tmp437_[1];
										_tmp434_ = _tmp438_ == '"';
									} else {
										_tmp434_ = FALSE;
									}
									if (_tmp434_) {
										gchar* _tmp439_;
										gchar _tmp440_;
										_tmp439_ = self->priv->current;
										_tmp440_ = _tmp439_[2];
										_tmp433_ = _tmp440_ == '"';
									} else {
										_tmp433_ = FALSE;
									}
									if (_tmp433_) {
										gchar* _tmp441_;
										_tmp441_ = self->priv->current;
										self->priv->current = _tmp441_ + 3;
									} else {
										gint _tmp442_;
										ValaSourceReference* _tmp443_;
										ValaSourceReference* _tmp444_;
										_tmp442_ = token_length_in_chars;
										_tmp443_ = vala_genie_scanner_get_source_reference (self, _tmp442_, 0);
										_tmp444_ = _tmp443_;
										vala_report_error (_tmp444_, "syntax error, expected \"\"\"");
										_vala_source_reference_unref0 (_tmp444_);
									}
									break;
								} else {
									type = VALA_GENIE_TOKEN_TYPE_STRING_LITERAL;
								}
							}
							token_length_in_chars = 2;
							_tmp445_ = self->priv->current;
							self->priv->current = _tmp445_ + 1;
							while (TRUE) {
								gboolean _tmp446_ = FALSE;
								gchar* _tmp447_;
								gchar* _tmp448_;
								gchar* _tmp453_;
								gchar _tmp454_;
								gboolean _tmp493_ = FALSE;
								gboolean _tmp494_ = FALSE;
								gchar* _tmp495_;
								gchar* _tmp496_;
								_tmp447_ = self->priv->current;
								_tmp448_ = self->priv->end;
								if (_tmp447_ < _tmp448_) {
									gchar* _tmp449_;
									gchar _tmp450_;
									gchar* _tmp451_;
									gchar _tmp452_;
									_tmp449_ = self->priv->current;
									_tmp450_ = _tmp449_[0];
									_tmp451_ = begin;
									_tmp452_ = _tmp451_[0];
									_tmp446_ = _tmp450_ != _tmp452_;
								} else {
									_tmp446_ = FALSE;
								}
								if (!_tmp446_) {
									break;
								}
								_tmp453_ = self->priv->current;
								_tmp454_ = _tmp453_[0];
								if (_tmp454_ == '\\') {
									gchar* _tmp455_;
									gint _tmp456_;
									gchar* _tmp457_;
									gchar* _tmp458_;
									gchar* _tmp459_;
									gchar _tmp460_;
									_tmp455_ = self->priv->current;
									self->priv->current = _tmp455_ + 1;
									_tmp456_ = token_length_in_chars;
									token_length_in_chars = _tmp456_ + 1;
									_tmp457_ = self->priv->current;
									_tmp458_ = self->priv->end;
									if (_tmp457_ >= _tmp458_) {
										break;
									}
									_tmp459_ = self->priv->current;
									_tmp460_ = _tmp459_[0];
									switch (_tmp460_) {
										case '\'':
										case '"':
										case '\\':
										case '0':
										case 'b':
										case 'f':
										case 'n':
										case 'r':
										case 't':
										{
											gchar* _tmp461_;
											gint _tmp462_;
											_tmp461_ = self->priv->current;
											self->priv->current = _tmp461_ + 1;
											_tmp462_ = token_length_in_chars;
											token_length_in_chars = _tmp462_ + 1;
											break;
										}
										case 'x':
										{
											gchar* _tmp463_;
											gint _tmp464_;
											_tmp463_ = self->priv->current;
											self->priv->current = _tmp463_ + 1;
											_tmp464_ = token_length_in_chars;
											token_length_in_chars = _tmp464_ + 1;
											while (TRUE) {
												gboolean _tmp465_ = FALSE;
												gchar* _tmp466_;
												gchar* _tmp467_;
												gchar* _tmp471_;
												gint _tmp472_;
												_tmp466_ = self->priv->current;
												_tmp467_ = self->priv->end;
												if (_tmp466_ < _tmp467_) {
													gchar* _tmp468_;
													gchar _tmp469_;
													gboolean _tmp470_;
													_tmp468_ = self->priv->current;
													_tmp469_ = _tmp468_[0];
													_tmp470_ = g_ascii_isxdigit (_tmp469_);
													_tmp465_ = _tmp470_;
												} else {
													_tmp465_ = FALSE;
												}
												if (!_tmp465_) {
													break;
												}
												_tmp471_ = self->priv->current;
												self->priv->current = _tmp471_ + 1;
												_tmp472_ = token_length_in_chars;
												token_length_in_chars = _tmp472_ + 1;
											}
											break;
										}
										default:
										{
											gint _tmp473_;
											ValaSourceReference* _tmp474_;
											ValaSourceReference* _tmp475_;
											_tmp473_ = token_length_in_chars;
											_tmp474_ = vala_genie_scanner_get_source_reference (self, _tmp473_, 0);
											_tmp475_ = _tmp474_;
											vala_report_error (_tmp475_, "invalid escape sequence");
											_vala_source_reference_unref0 (_tmp475_);
											break;
										}
									}
								} else {
									gchar* _tmp476_;
									gchar _tmp477_;
									_tmp476_ = self->priv->current;
									_tmp477_ = _tmp476_[0];
									if (_tmp477_ == '\n') {
										gchar* _tmp478_;
										gint _tmp479_;
										_tmp478_ = self->priv->current;
										self->priv->current = _tmp478_ + 1;
										_tmp479_ = self->priv->line;
										self->priv->line = _tmp479_ + 1;
										self->priv->column = 1;
										token_length_in_chars = 1;
									} else {
										gunichar u = 0U;
										gchar* _tmp480_;
										gchar* _tmp481_;
										gchar* _tmp482_;
										gunichar _tmp483_;
										gunichar _tmp484_;
										_tmp480_ = self->priv->current;
										_tmp481_ = self->priv->end;
										_tmp482_ = self->priv->current;
										_tmp483_ = g_utf8_get_char_validated ((const gchar*) _tmp480_, (gssize) ((glong) (_tmp481_ - _tmp482_)));
										u = _tmp483_;
										_tmp484_ = u;
										if (_tmp484_ != ((gunichar) -1)) {
											gchar* _tmp485_;
											gunichar _tmp486_;
											gint _tmp487_;
											gint _tmp488_;
											_tmp485_ = self->priv->current;
											_tmp486_ = u;
											_tmp487_ = g_unichar_to_utf8 (_tmp486_, NULL);
											self->priv->current = _tmp485_ + _tmp487_;
											_tmp488_ = token_length_in_chars;
											token_length_in_chars = _tmp488_ + 1;
										} else {
											gchar* _tmp489_;
											gint _tmp490_;
											ValaSourceReference* _tmp491_;
											ValaSourceReference* _tmp492_;
											_tmp489_ = self->priv->current;
											self->priv->current = _tmp489_ + 1;
											_tmp490_ = token_length_in_chars;
											_tmp491_ = vala_genie_scanner_get_source_reference (self, _tmp490_, 0);
											_tmp492_ = _tmp491_;
											vala_report_error (_tmp492_, "invalid UTF-8 character");
											_vala_source_reference_unref0 (_tmp492_);
										}
									}
								}
								_tmp495_ = self->priv->current;
								_tmp496_ = self->priv->end;
								if (_tmp495_ < _tmp496_) {
									gchar* _tmp497_;
									gchar _tmp498_;
									_tmp497_ = begin;
									_tmp498_ = _tmp497_[0];
									_tmp494_ = _tmp498_ == '\'';
								} else {
									_tmp494_ = FALSE;
								}
								if (_tmp494_) {
									gchar* _tmp499_;
									gchar _tmp500_;
									_tmp499_ = self->priv->current;
									_tmp500_ = _tmp499_[0];
									_tmp493_ = _tmp500_ != '\'';
								} else {
									_tmp493_ = FALSE;
								}
								if (_tmp493_) {
									gint _tmp501_;
									ValaSourceReference* _tmp502_;
									ValaSourceReference* _tmp503_;
									_tmp501_ = token_length_in_chars;
									_tmp502_ = vala_genie_scanner_get_source_reference (self, _tmp501_, 0);
									_tmp503_ = _tmp502_;
									vala_report_error (_tmp503_, "invalid character literal");
									_vala_source_reference_unref0 (_tmp503_);
								}
							}
							_tmp504_ = self->priv->current;
							_tmp505_ = self->priv->end;
							if (_tmp504_ < _tmp505_) {
								gchar* _tmp506_;
								_tmp506_ = self->priv->current;
								self->priv->current = _tmp506_ + 1;
							} else {
								gint _tmp507_;
								ValaSourceReference* _tmp508_;
								ValaSourceReference* _tmp509_;
								gchar* _tmp510_;
								gchar _tmp511_;
								gchar* _tmp512_;
								gchar* _tmp513_;
								_tmp507_ = token_length_in_chars;
								_tmp508_ = vala_genie_scanner_get_source_reference (self, _tmp507_, 0);
								_tmp509_ = _tmp508_;
								_tmp510_ = begin;
								_tmp511_ = _tmp510_[0];
								_tmp512_ = g_strdup_printf ("syntax error, expected %c", (gint) _tmp511_);
								_tmp513_ = _tmp512_;
								vala_report_error (_tmp509_, _tmp513_);
								_g_free0 (_tmp513_);
								_vala_source_reference_unref0 (_tmp509_);
							}
							break;
						}
						default:
						{
							gunichar u = 0U;
							gchar* _tmp514_;
							gchar* _tmp515_;
							gchar* _tmp516_;
							gunichar _tmp517_;
							gunichar _tmp518_;
							gint _tmp527_;
							ValaSourceLocation _tmp528_ = {0};
							ValaSourceLocation _tmp529_ = {0};
							ValaGenieTokenType _tmp530_;
							_tmp514_ = self->priv->current;
							_tmp515_ = self->priv->end;
							_tmp516_ = self->priv->current;
							_tmp517_ = g_utf8_get_char_validated ((const gchar*) _tmp514_, (gssize) ((glong) (_tmp515_ - _tmp516_)));
							u = _tmp517_;
							_tmp518_ = u;
							if (_tmp518_ != ((gunichar) -1)) {
								gchar* _tmp519_;
								gunichar _tmp520_;
								gint _tmp521_;
								ValaSourceReference* _tmp522_;
								ValaSourceReference* _tmp523_;
								_tmp519_ = self->priv->current;
								_tmp520_ = u;
								_tmp521_ = g_unichar_to_utf8 (_tmp520_, NULL);
								self->priv->current = _tmp519_ + _tmp521_;
								_tmp522_ = vala_genie_scanner_get_source_reference (self, 0, 0);
								_tmp523_ = _tmp522_;
								vala_report_error (_tmp523_, "syntax error, unexpected character");
								_vala_source_reference_unref0 (_tmp523_);
							} else {
								gchar* _tmp524_;
								ValaSourceReference* _tmp525_;
								ValaSourceReference* _tmp526_;
								_tmp524_ = self->priv->current;
								self->priv->current = _tmp524_ + 1;
								_tmp525_ = vala_genie_scanner_get_source_reference (self, 0, 0);
								_tmp526_ = _tmp525_;
								vala_report_error (_tmp526_, "invalid UTF-8 character");
								_vala_source_reference_unref0 (_tmp526_);
							}
							_tmp527_ = self->priv->column;
							self->priv->column = _tmp527_ + 1;
							_tmp530_ = vala_genie_scanner_read_token (self, &_tmp528_, &_tmp529_);
							_vala_token_begin = _tmp528_;
							_vala_token_end = _tmp529_;
							result = _tmp530_;
							if (token_begin) {
								*token_begin = _vala_token_begin;
							}
							if (token_end) {
								*token_end = _vala_token_end;
							}
							return result;
						}
					}
				}
			}
		}
	}
	_tmp531_ = token_length_in_chars;
	if (_tmp531_ < 0) {
		gint _tmp532_;
		gchar* _tmp533_;
		gchar* _tmp534_;
		_tmp532_ = self->priv->column;
		_tmp533_ = self->priv->current;
		_tmp534_ = begin;
		self->priv->column = _tmp532_ + ((gint) (_tmp533_ - _tmp534_));
	} else {
		gint _tmp535_;
		gint _tmp536_;
		_tmp535_ = self->priv->column;
		_tmp536_ = token_length_in_chars;
		self->priv->column = _tmp535_ + _tmp536_;
	}
	_tmp537_ = self->priv->current;
	_tmp538_ = self->priv->line;
	_tmp539_ = self->priv->column;
	vala_source_location_init (&_vala_token_end, _tmp537_, _tmp538_, _tmp539_ - 1);
	_tmp540_ = type;
	self->priv->last_token = _tmp540_;
	result = type;
	if (token_begin) {
		*token_begin = _vala_token_begin;
	}
	if (token_end) {
		*token_end = _vala_token_end;
	}
	return result;
}


static gint vala_genie_scanner_count_tabs (ValaGenieScanner* self) {
	gint result = 0;
	gint tab_count = 0;
	gint _tmp0_;
	gboolean _tmp19_ = FALSE;
	gchar* _tmp20_;
	gchar* _tmp21_;
	g_return_val_if_fail (self != NULL, 0);
	tab_count = 0;
	_tmp0_ = self->priv->_indent_spaces;
	if (_tmp0_ == 0) {
		while (TRUE) {
			gboolean _tmp1_ = FALSE;
			gchar* _tmp2_;
			gchar* _tmp3_;
			gchar* _tmp6_;
			gint _tmp7_;
			gint _tmp8_;
			_tmp2_ = self->priv->current;
			_tmp3_ = self->priv->end;
			if (_tmp2_ < _tmp3_) {
				gchar* _tmp4_;
				gchar _tmp5_;
				_tmp4_ = self->priv->current;
				_tmp5_ = _tmp4_[0];
				_tmp1_ = _tmp5_ == '\t';
			} else {
				_tmp1_ = FALSE;
			}
			if (!_tmp1_) {
				break;
			}
			_tmp6_ = self->priv->current;
			self->priv->current = _tmp6_ + 1;
			_tmp7_ = self->priv->column;
			self->priv->column = _tmp7_ + 1;
			_tmp8_ = tab_count;
			tab_count = _tmp8_ + 1;
		}
	} else {
		gint space_count = 0;
		gint _tmp17_;
		gint _tmp18_;
		space_count = 0;
		while (TRUE) {
			gboolean _tmp9_ = FALSE;
			gchar* _tmp10_;
			gchar* _tmp11_;
			gchar* _tmp14_;
			gint _tmp15_;
			gint _tmp16_;
			_tmp10_ = self->priv->current;
			_tmp11_ = self->priv->end;
			if (_tmp10_ < _tmp11_) {
				gchar* _tmp12_;
				gchar _tmp13_;
				_tmp12_ = self->priv->current;
				_tmp13_ = _tmp12_[0];
				_tmp9_ = _tmp13_ == ' ';
			} else {
				_tmp9_ = FALSE;
			}
			if (!_tmp9_) {
				break;
			}
			_tmp14_ = self->priv->current;
			self->priv->current = _tmp14_ + 1;
			_tmp15_ = self->priv->column;
			self->priv->column = _tmp15_ + 1;
			_tmp16_ = space_count;
			space_count = _tmp16_ + 1;
		}
		_tmp17_ = space_count;
		_tmp18_ = self->priv->_indent_spaces;
		tab_count = _tmp17_ / _tmp18_;
	}
	vala_genie_scanner_space (self);
	_tmp20_ = self->priv->current;
	_tmp21_ = self->priv->end;
	if (_tmp20_ < _tmp21_) {
		gchar* _tmp22_;
		gchar _tmp23_;
		_tmp22_ = self->priv->current;
		_tmp23_ = _tmp22_[0];
		_tmp19_ = _tmp23_ == '\n';
	} else {
		_tmp19_ = FALSE;
	}
	if (_tmp19_) {
		result = -1;
		return result;
	}
	result = tab_count;
	return result;
}


static gboolean vala_genie_scanner_matches (gchar* begin, const gchar* keyword) {
	gboolean result = FALSE;
	gchar* keyword_array = NULL;
	const gchar* _tmp0_;
	glong len = 0L;
	const gchar* _tmp1_;
	gint _tmp2_;
	gint _tmp3_;
	g_return_val_if_fail (keyword != NULL, FALSE);
	_tmp0_ = keyword;
	keyword_array = (gchar*) _tmp0_;
	_tmp1_ = keyword;
	_tmp2_ = strlen (_tmp1_);
	_tmp3_ = _tmp2_;
	len = (glong) _tmp3_;
	{
		gint i = 0;
		i = 0;
		{
			gboolean _tmp4_ = FALSE;
			_tmp4_ = TRUE;
			while (TRUE) {
				gint _tmp6_;
				glong _tmp7_;
				gchar* _tmp8_;
				gint _tmp9_;
				gchar _tmp10_;
				gchar* _tmp11_;
				gint _tmp12_;
				gchar _tmp13_;
				if (!_tmp4_) {
					gint _tmp5_;
					_tmp5_ = i;
					i = _tmp5_ + 1;
				}
				_tmp4_ = FALSE;
				_tmp6_ = i;
				_tmp7_ = len;
				if (!(((glong) _tmp6_) < _tmp7_)) {
					break;
				}
				_tmp8_ = begin;
				_tmp9_ = i;
				_tmp10_ = _tmp8_[_tmp9_];
				_tmp11_ = keyword_array;
				_tmp12_ = i;
				_tmp13_ = _tmp11_[_tmp12_];
				if (_tmp10_ != _tmp13_) {
					result = FALSE;
					return result;
				}
			}
		}
	}
	result = TRUE;
	return result;
}


static gboolean vala_genie_scanner_whitespace (ValaGenieScanner* self) {
	gboolean result = FALSE;
	gboolean found = FALSE;
	gboolean _tmp11_ = FALSE;
	gboolean _tmp12_ = FALSE;
	gint _tmp13_;
	g_return_val_if_fail (self != NULL, FALSE);
	found = FALSE;
	while (TRUE) {
		gboolean _tmp0_ = FALSE;
		gboolean _tmp1_ = FALSE;
		gchar* _tmp2_;
		gchar* _tmp3_;
		gchar* _tmp9_;
		gint _tmp10_;
		_tmp2_ = self->priv->current;
		_tmp3_ = self->priv->end;
		if (_tmp2_ < _tmp3_) {
			gchar* _tmp4_;
			gchar _tmp5_;
			gboolean _tmp6_;
			_tmp4_ = self->priv->current;
			_tmp5_ = _tmp4_[0];
			_tmp6_ = g_ascii_isspace (_tmp5_);
			_tmp1_ = _tmp6_;
		} else {
			_tmp1_ = FALSE;
		}
		if (_tmp1_) {
			gchar* _tmp7_;
			gchar _tmp8_;
			_tmp7_ = self->priv->current;
			_tmp8_ = _tmp7_[0];
			_tmp0_ = _tmp8_ != '\n';
		} else {
			_tmp0_ = FALSE;
		}
		if (!_tmp0_) {
			break;
		}
		found = TRUE;
		_tmp9_ = self->priv->current;
		self->priv->current = _tmp9_ + 1;
		_tmp10_ = self->priv->column;
		self->priv->column = _tmp10_ + 1;
	}
	_tmp13_ = self->priv->column;
	if (_tmp13_ == 1) {
		gchar* _tmp14_;
		gchar* _tmp15_;
		_tmp14_ = self->priv->current;
		_tmp15_ = self->priv->end;
		_tmp12_ = _tmp14_ < _tmp15_;
	} else {
		_tmp12_ = FALSE;
	}
	if (_tmp12_) {
		gchar* _tmp16_;
		gchar _tmp17_;
		_tmp16_ = self->priv->current;
		_tmp17_ = _tmp16_[0];
		_tmp11_ = _tmp17_ == '#';
	} else {
		_tmp11_ = FALSE;
	}
	if (_tmp11_) {
		vala_genie_scanner_pp_directive (self);
		result = TRUE;
		return result;
	}
	result = found;
	return result;
}


static inline gboolean vala_genie_scanner_newline (ValaGenieScanner* self) {
	gboolean result = FALSE;
	gchar* _tmp0_;
	gchar _tmp1_;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp0_ = self->priv->current;
	_tmp1_ = _tmp0_[0];
	if (_tmp1_ == '\n') {
		result = TRUE;
		return result;
	}
	result = FALSE;
	return result;
}


static gboolean vala_genie_scanner_skip_newlines (ValaGenieScanner* self) {
	gboolean result = FALSE;
	gboolean new_lines = FALSE;
	g_return_val_if_fail (self != NULL, FALSE);
	new_lines = FALSE;
	while (TRUE) {
		gboolean _tmp0_;
		gchar* _tmp1_;
		gint _tmp2_;
		_tmp0_ = vala_genie_scanner_newline (self);
		if (!_tmp0_) {
			break;
		}
		_tmp1_ = self->priv->current;
		self->priv->current = _tmp1_ + 1;
		_tmp2_ = self->priv->line;
		self->priv->line = _tmp2_ + 1;
		self->priv->column = 1;
		self->priv->current_indent_level = 0;
		new_lines = TRUE;
	}
	result = new_lines;
	return result;
}


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


static gchar* string_substring (const gchar* self, glong offset, glong len) {
	gchar* result = NULL;
	glong string_length = 0L;
	gboolean _tmp0_ = FALSE;
	glong _tmp1_;
	glong _tmp8_;
	glong _tmp14_;
	glong _tmp17_;
	glong _tmp18_;
	glong _tmp19_;
	glong _tmp20_;
	glong _tmp21_;
	gchar* _tmp22_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp1_ = offset;
	if (_tmp1_ >= ((glong) 0)) {
		glong _tmp2_;
		_tmp2_ = len;
		_tmp0_ = _tmp2_ >= ((glong) 0);
	} else {
		_tmp0_ = FALSE;
	}
	if (_tmp0_) {
		glong _tmp3_;
		glong _tmp4_;
		glong _tmp5_;
		_tmp3_ = offset;
		_tmp4_ = len;
		_tmp5_ = string_strnlen ((gchar*) self, _tmp3_ + _tmp4_);
		string_length = _tmp5_;
	} else {
		gint _tmp6_;
		gint _tmp7_;
		_tmp6_ = strlen (self);
		_tmp7_ = _tmp6_;
		string_length = (glong) _tmp7_;
	}
	_tmp8_ = offset;
	if (_tmp8_ < ((glong) 0)) {
		glong _tmp9_;
		glong _tmp10_;
		glong _tmp11_;
		_tmp9_ = string_length;
		_tmp10_ = offset;
		offset = _tmp9_ + _tmp10_;
		_tmp11_ = offset;
		g_return_val_if_fail (_tmp11_ >= ((glong) 0), NULL);
	} else {
		glong _tmp12_;
		glong _tmp13_;
		_tmp12_ = offset;
		_tmp13_ = string_length;
		g_return_val_if_fail (_tmp12_ <= _tmp13_, NULL);
	}
	_tmp14_ = len;
	if (_tmp14_ < ((glong) 0)) {
		glong _tmp15_;
		glong _tmp16_;
		_tmp15_ = string_length;
		_tmp16_ = offset;
		len = _tmp15_ - _tmp16_;
	}
	_tmp17_ = offset;
	_tmp18_ = len;
	_tmp19_ = string_length;
	g_return_val_if_fail ((_tmp17_ + _tmp18_) <= _tmp19_, NULL);
	_tmp20_ = offset;
	_tmp21_ = len;
	_tmp22_ = g_strndup (((gchar*) self) + _tmp20_, (gsize) _tmp21_);
	result = _tmp22_;
	return result;
}


static gboolean vala_genie_scanner_comment (ValaGenieScanner* self, gboolean file_comment) {
	gboolean result = FALSE;
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_ = FALSE;
	gboolean _tmp2_ = FALSE;
	gchar* _tmp3_;
	gchar* _tmp13_;
	gchar _tmp14_;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp3_ = self->priv->current;
	if (_tmp3_ == NULL) {
		_tmp2_ = TRUE;
	} else {
		gchar* _tmp4_;
		gchar* _tmp5_;
		_tmp4_ = self->priv->current;
		_tmp5_ = self->priv->end;
		_tmp2_ = _tmp4_ > (_tmp5_ - 2);
	}
	if (_tmp2_) {
		_tmp1_ = TRUE;
	} else {
		gchar* _tmp6_;
		gchar _tmp7_;
		_tmp6_ = self->priv->current;
		_tmp7_ = _tmp6_[0];
		_tmp1_ = _tmp7_ != '/';
	}
	if (_tmp1_) {
		_tmp0_ = TRUE;
	} else {
		gboolean _tmp8_ = FALSE;
		gchar* _tmp9_;
		gchar _tmp10_;
		_tmp9_ = self->priv->current;
		_tmp10_ = _tmp9_[1];
		if (_tmp10_ != '/') {
			gchar* _tmp11_;
			gchar _tmp12_;
			_tmp11_ = self->priv->current;
			_tmp12_ = _tmp11_[1];
			_tmp8_ = _tmp12_ != '*';
		} else {
			_tmp8_ = FALSE;
		}
		_tmp0_ = _tmp8_;
	}
	if (_tmp0_) {
		result = FALSE;
		return result;
	}
	_tmp13_ = self->priv->current;
	_tmp14_ = _tmp13_[1];
	if (_tmp14_ == '/') {
		ValaSourceReference* source_reference = NULL;
		gboolean _tmp15_;
		gchar* _tmp17_;
		gboolean _tmp24_ = FALSE;
		gchar* _tmp25_;
		gchar _tmp26_;
		ValaSourceReference* _tmp30_;
		source_reference = NULL;
		_tmp15_ = file_comment;
		if (_tmp15_) {
			ValaSourceReference* _tmp16_;
			_tmp16_ = vala_genie_scanner_get_source_reference (self, 0, 0);
			_vala_source_reference_unref0 (source_reference);
			source_reference = _tmp16_;
		}
		_tmp17_ = self->priv->current;
		self->priv->current = _tmp17_ + 2;
		while (TRUE) {
			gboolean _tmp18_ = FALSE;
			gchar* _tmp19_;
			gchar* _tmp20_;
			gchar* _tmp23_;
			_tmp19_ = self->priv->current;
			_tmp20_ = self->priv->end;
			if (_tmp19_ < _tmp20_) {
				gchar* _tmp21_;
				gchar _tmp22_;
				_tmp21_ = self->priv->current;
				_tmp22_ = _tmp21_[0];
				_tmp18_ = _tmp22_ != '\n';
			} else {
				_tmp18_ = FALSE;
			}
			if (!_tmp18_) {
				break;
			}
			_tmp23_ = self->priv->current;
			self->priv->current = _tmp23_ + 1;
		}
		_tmp25_ = self->priv->current;
		_tmp26_ = _tmp25_[0];
		if (_tmp26_ == '\n') {
			ValaGenieTokenType _tmp27_;
			_tmp27_ = self->priv->last_token;
			_tmp24_ = _tmp27_ == VALA_GENIE_TOKEN_TYPE_EOL;
		} else {
			_tmp24_ = FALSE;
		}
		if (_tmp24_) {
			gchar* _tmp28_;
			gint _tmp29_;
			_tmp28_ = self->priv->current;
			self->priv->current = _tmp28_ + 1;
			_tmp29_ = self->priv->line;
			self->priv->line = _tmp29_ + 1;
			self->priv->column = 1;
			self->priv->current_indent_level = 0;
		}
		_tmp30_ = source_reference;
		if (_tmp30_ != NULL) {
			gchar* _tmp31_;
			gchar* _tmp32_;
			gchar* _tmp33_;
			gchar* _tmp34_;
			gchar* _tmp35_;
			ValaSourceReference* _tmp36_;
			gboolean _tmp37_;
			_tmp31_ = self->priv->begin;
			_tmp32_ = self->priv->current;
			_tmp33_ = self->priv->begin;
			_tmp34_ = string_substring ((const gchar*) _tmp31_, (glong) 0, (glong) (_tmp32_ - _tmp33_));
			_tmp35_ = _tmp34_;
			_tmp36_ = source_reference;
			_tmp37_ = file_comment;
			vala_genie_scanner_push_comment (self, _tmp35_, _tmp36_, _tmp37_);
			_g_free0 (_tmp35_);
		}
		_vala_source_reference_unref0 (source_reference);
	} else {
		ValaSourceReference* source_reference = NULL;
		gboolean _tmp38_ = FALSE;
		gboolean _tmp39_;
		gboolean _tmp42_ = FALSE;
		gchar* _tmp43_;
		gchar _tmp44_;
		gchar* _tmp47_;
		gchar* begin = NULL;
		gchar* _tmp48_;
		gchar* _tmp62_;
		gchar* _tmp63_;
		ValaSourceReference* _tmp66_;
		gchar* _tmp74_;
		gint _tmp75_;
		source_reference = NULL;
		_tmp39_ = file_comment;
		if (_tmp39_) {
			gchar* _tmp40_;
			gchar _tmp41_;
			_tmp40_ = self->priv->current;
			_tmp41_ = _tmp40_[2];
			_tmp38_ = _tmp41_ == '*';
		} else {
			_tmp38_ = FALSE;
		}
		if (_tmp38_) {
			result = FALSE;
			_vala_source_reference_unref0 (source_reference);
			return result;
		}
		_tmp43_ = self->priv->current;
		_tmp44_ = _tmp43_[2];
		if (_tmp44_ == '*') {
			_tmp42_ = TRUE;
		} else {
			gboolean _tmp45_;
			_tmp45_ = file_comment;
			_tmp42_ = _tmp45_;
		}
		if (_tmp42_) {
			ValaSourceReference* _tmp46_;
			_tmp46_ = vala_genie_scanner_get_source_reference (self, 0, 0);
			_vala_source_reference_unref0 (source_reference);
			source_reference = _tmp46_;
		}
		_tmp47_ = self->priv->current;
		self->priv->current = _tmp47_ + 2;
		_tmp48_ = self->priv->current;
		begin = _tmp48_;
		while (TRUE) {
			gboolean _tmp49_ = FALSE;
			gchar* _tmp50_;
			gchar* _tmp51_;
			gchar* _tmp57_;
			gchar _tmp58_;
			gchar* _tmp60_;
			gint _tmp61_;
			_tmp50_ = self->priv->current;
			_tmp51_ = self->priv->end;
			if (_tmp50_ < (_tmp51_ - 1)) {
				gboolean _tmp52_ = FALSE;
				gchar* _tmp53_;
				gchar _tmp54_;
				_tmp53_ = self->priv->current;
				_tmp54_ = _tmp53_[0];
				if (_tmp54_ != '*') {
					_tmp52_ = TRUE;
				} else {
					gchar* _tmp55_;
					gchar _tmp56_;
					_tmp55_ = self->priv->current;
					_tmp56_ = _tmp55_[1];
					_tmp52_ = _tmp56_ != '/';
				}
				_tmp49_ = _tmp52_;
			} else {
				_tmp49_ = FALSE;
			}
			if (!_tmp49_) {
				break;
			}
			_tmp57_ = self->priv->current;
			_tmp58_ = _tmp57_[0];
			if (_tmp58_ == '\n') {
				gint _tmp59_;
				_tmp59_ = self->priv->line;
				self->priv->line = _tmp59_ + 1;
				self->priv->column = 0;
			}
			_tmp60_ = self->priv->current;
			self->priv->current = _tmp60_ + 1;
			_tmp61_ = self->priv->column;
			self->priv->column = _tmp61_ + 1;
		}
		_tmp62_ = self->priv->current;
		_tmp63_ = self->priv->end;
		if (_tmp62_ == (_tmp63_ - 1)) {
			ValaSourceReference* _tmp64_;
			ValaSourceReference* _tmp65_;
			_tmp64_ = vala_genie_scanner_get_source_reference (self, 0, 0);
			_tmp65_ = _tmp64_;
			vala_report_error (_tmp65_, "syntax error, expected */");
			_vala_source_reference_unref0 (_tmp65_);
			result = TRUE;
			_vala_source_reference_unref0 (source_reference);
			return result;
		}
		_tmp66_ = source_reference;
		if (_tmp66_ != NULL) {
			gchar* comment = NULL;
			gchar* _tmp67_;
			gchar* _tmp68_;
			gchar* _tmp69_;
			gchar* _tmp70_;
			const gchar* _tmp71_;
			ValaSourceReference* _tmp72_;
			gboolean _tmp73_;
			_tmp67_ = begin;
			_tmp68_ = self->priv->current;
			_tmp69_ = begin;
			_tmp70_ = string_substring ((const gchar*) _tmp67_, (glong) 0, (glong) (_tmp68_ - _tmp69_));
			comment = _tmp70_;
			_tmp71_ = comment;
			_tmp72_ = source_reference;
			_tmp73_ = file_comment;
			vala_genie_scanner_push_comment (self, _tmp71_, _tmp72_, _tmp73_);
			_g_free0 (comment);
		}
		_tmp74_ = self->priv->current;
		self->priv->current = _tmp74_ + 2;
		_tmp75_ = self->priv->column;
		self->priv->column = _tmp75_ + 2;
		_vala_source_reference_unref0 (source_reference);
	}
	result = TRUE;
	return result;
}


static gboolean vala_genie_scanner_skip_tabs (ValaGenieScanner* self) {
	gboolean result = FALSE;
	gboolean found = FALSE;
	g_return_val_if_fail (self != NULL, FALSE);
	found = FALSE;
	while (TRUE) {
		gboolean _tmp0_ = FALSE;
		gchar* _tmp1_;
		gchar* _tmp2_;
		gchar* _tmp5_;
		gint _tmp6_;
		_tmp1_ = self->priv->current;
		_tmp2_ = self->priv->end;
		if (_tmp1_ < _tmp2_) {
			gchar* _tmp3_;
			gchar _tmp4_;
			_tmp3_ = self->priv->current;
			_tmp4_ = _tmp3_[0];
			_tmp0_ = _tmp4_ == '\t';
		} else {
			_tmp0_ = FALSE;
		}
		if (!_tmp0_) {
			break;
		}
		_tmp5_ = self->priv->current;
		self->priv->current = _tmp5_ + 1;
		_tmp6_ = self->priv->column;
		self->priv->column = _tmp6_ + 1;
		found = TRUE;
	}
	result = found;
	return result;
}


static void vala_genie_scanner_skip_space_tabs (ValaGenieScanner* self) {
	g_return_if_fail (self != NULL);
	while (TRUE) {
		gboolean _tmp0_ = FALSE;
		gboolean _tmp1_ = FALSE;
		gboolean _tmp2_;
		_tmp2_ = vala_genie_scanner_whitespace (self);
		if (_tmp2_) {
			_tmp1_ = TRUE;
		} else {
			gboolean _tmp3_;
			_tmp3_ = vala_genie_scanner_skip_tabs (self);
			_tmp1_ = _tmp3_;
		}
		if (_tmp1_) {
			_tmp0_ = TRUE;
		} else {
			gboolean _tmp4_;
			_tmp4_ = vala_genie_scanner_comment (self, FALSE);
			_tmp0_ = _tmp4_;
		}
		if (!_tmp0_) {
			break;
		}
	}
}


static void vala_genie_scanner_space (ValaGenieScanner* self) {
	g_return_if_fail (self != NULL);
	while (TRUE) {
		gboolean _tmp0_ = FALSE;
		gboolean _tmp1_;
		_tmp1_ = vala_genie_scanner_whitespace (self);
		if (_tmp1_) {
			_tmp0_ = TRUE;
		} else {
			gboolean _tmp2_;
			_tmp2_ = vala_genie_scanner_comment (self, FALSE);
			_tmp0_ = _tmp2_;
		}
		if (!_tmp0_) {
			break;
		}
	}
}


void vala_genie_scanner_parse_file_comments (ValaGenieScanner* self) {
	g_return_if_fail (self != NULL);
	while (TRUE) {
		gboolean _tmp0_ = FALSE;
		gboolean _tmp1_;
		_tmp1_ = vala_genie_scanner_whitespace (self);
		if (_tmp1_) {
			_tmp0_ = TRUE;
		} else {
			gboolean _tmp2_;
			_tmp2_ = vala_genie_scanner_comment (self, TRUE);
			_tmp0_ = _tmp2_;
		}
		if (!_tmp0_) {
			break;
		}
	}
}


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


static void vala_genie_scanner_push_comment (ValaGenieScanner* self, const gchar* comment_item, ValaSourceReference* source_reference, gboolean file_comment) {
	const gchar* _tmp0_;
	gchar _tmp1_;
	gboolean _tmp8_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (comment_item != NULL);
	g_return_if_fail (source_reference != NULL);
	_tmp0_ = comment_item;
	_tmp1_ = string_get (_tmp0_, (glong) 0);
	if (_tmp1_ == '*') {
		ValaComment* _tmp2_;
		const gchar* _tmp5_;
		ValaSourceReference* _tmp6_;
		ValaComment* _tmp7_;
		_tmp2_ = self->priv->_comment;
		if (_tmp2_ != NULL) {
			ValaSourceFile* _tmp3_;
			ValaComment* _tmp4_;
			_tmp3_ = self->priv->_source_file;
			_tmp4_ = self->priv->_comment;
			vala_source_file_add_comment (_tmp3_, _tmp4_);
		}
		_tmp5_ = comment_item;
		_tmp6_ = source_reference;
		_tmp7_ = vala_comment_new (_tmp5_, _tmp6_);
		_vala_comment_unref0 (self->priv->_comment);
		self->priv->_comment = _tmp7_;
	}
	_tmp8_ = file_comment;
	if (_tmp8_) {
		ValaSourceFile* _tmp9_;
		const gchar* _tmp10_;
		ValaSourceReference* _tmp11_;
		ValaComment* _tmp12_;
		ValaComment* _tmp13_;
		_tmp9_ = self->priv->_source_file;
		_tmp10_ = comment_item;
		_tmp11_ = source_reference;
		_tmp12_ = vala_comment_new (_tmp10_, _tmp11_);
		_tmp13_ = _tmp12_;
		vala_source_file_add_comment (_tmp9_, _tmp13_);
		_vala_comment_unref0 (_tmp13_);
		_vala_comment_unref0 (self->priv->_comment);
		self->priv->_comment = NULL;
	}
}


/**
 * Clears and returns the content of the comment stack.
 *
 * @return saved comment
 */
static gpointer _vala_comment_ref0 (gpointer self) {
	return self ? vala_comment_ref (self) : NULL;
}


ValaComment* vala_genie_scanner_pop_comment (ValaGenieScanner* self) {
	ValaComment* result = NULL;
	ValaComment* _tmp0_;
	ValaComment* comment = NULL;
	ValaComment* _tmp1_;
	ValaComment* _tmp2_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_comment;
	if (_tmp0_ == NULL) {
		result = NULL;
		return result;
	}
	_tmp1_ = self->priv->_comment;
	_tmp2_ = _vala_comment_ref0 (_tmp1_);
	comment = _tmp2_;
	_vala_comment_unref0 (self->priv->_comment);
	self->priv->_comment = NULL;
	result = comment;
	return result;
}


static gboolean vala_genie_scanner_pp_whitespace (ValaGenieScanner* self) {
	gboolean result = FALSE;
	gboolean found = FALSE;
	g_return_val_if_fail (self != NULL, FALSE);
	found = FALSE;
	while (TRUE) {
		gboolean _tmp0_ = FALSE;
		gboolean _tmp1_ = FALSE;
		gchar* _tmp2_;
		gchar* _tmp3_;
		gchar* _tmp9_;
		gint _tmp10_;
		_tmp2_ = self->priv->current;
		_tmp3_ = self->priv->end;
		if (_tmp2_ < _tmp3_) {
			gchar* _tmp4_;
			gchar _tmp5_;
			gboolean _tmp6_;
			_tmp4_ = self->priv->current;
			_tmp5_ = _tmp4_[0];
			_tmp6_ = g_ascii_isspace (_tmp5_);
			_tmp1_ = _tmp6_;
		} else {
			_tmp1_ = FALSE;
		}
		if (_tmp1_) {
			gchar* _tmp7_;
			gchar _tmp8_;
			_tmp7_ = self->priv->current;
			_tmp8_ = _tmp7_[0];
			_tmp0_ = _tmp8_ != '\n';
		} else {
			_tmp0_ = FALSE;
		}
		if (!_tmp0_) {
			break;
		}
		found = TRUE;
		_tmp9_ = self->priv->current;
		self->priv->current = _tmp9_ + 1;
		_tmp10_ = self->priv->column;
		self->priv->column = _tmp10_ + 1;
	}
	result = found;
	return result;
}


static void vala_genie_scanner_pp_space (ValaGenieScanner* self) {
	g_return_if_fail (self != NULL);
	while (TRUE) {
		gboolean _tmp0_ = FALSE;
		gboolean _tmp1_;
		_tmp1_ = vala_genie_scanner_pp_whitespace (self);
		if (_tmp1_) {
			_tmp0_ = TRUE;
		} else {
			gboolean _tmp2_;
			_tmp2_ = vala_genie_scanner_comment (self, FALSE);
			_tmp0_ = _tmp2_;
		}
		if (!_tmp0_) {
			break;
		}
	}
}


static void vala_genie_scanner_pp_directive (ValaGenieScanner* self) {
	gchar* _tmp0_;
	gint _tmp1_;
	gchar* begin = NULL;
	gchar* _tmp2_;
	gint len = 0;
	gboolean _tmp12_ = FALSE;
	gint _tmp13_;
	gboolean _tmp32_ = FALSE;
	ValaGenieScannerConditional* _tmp33_;
	gint _tmp33__length1;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->current;
	self->priv->current = _tmp0_ + 1;
	_tmp1_ = self->priv->column;
	self->priv->column = _tmp1_ + 1;
	vala_genie_scanner_pp_space (self);
	_tmp2_ = self->priv->current;
	begin = _tmp2_;
	len = 0;
	while (TRUE) {
		gboolean _tmp3_ = FALSE;
		gchar* _tmp4_;
		gchar* _tmp5_;
		gchar* _tmp9_;
		gint _tmp10_;
		gint _tmp11_;
		_tmp4_ = self->priv->current;
		_tmp5_ = self->priv->end;
		if (_tmp4_ < _tmp5_) {
			gchar* _tmp6_;
			gchar _tmp7_;
			gboolean _tmp8_;
			_tmp6_ = self->priv->current;
			_tmp7_ = _tmp6_[0];
			_tmp8_ = g_ascii_isalnum (_tmp7_);
			_tmp3_ = _tmp8_;
		} else {
			_tmp3_ = FALSE;
		}
		if (!_tmp3_) {
			break;
		}
		_tmp9_ = self->priv->current;
		self->priv->current = _tmp9_ + 1;
		_tmp10_ = self->priv->column;
		self->priv->column = _tmp10_ + 1;
		_tmp11_ = len;
		len = _tmp11_ + 1;
	}
	_tmp13_ = len;
	if (_tmp13_ == 2) {
		gchar* _tmp14_;
		gboolean _tmp15_;
		_tmp14_ = begin;
		_tmp15_ = vala_genie_scanner_matches (_tmp14_, "if");
		_tmp12_ = _tmp15_;
	} else {
		_tmp12_ = FALSE;
	}
	if (_tmp12_) {
		vala_genie_scanner_parse_pp_if (self);
	} else {
		gboolean _tmp16_ = FALSE;
		gint _tmp17_;
		_tmp17_ = len;
		if (_tmp17_ == 4) {
			gchar* _tmp18_;
			gboolean _tmp19_;
			_tmp18_ = begin;
			_tmp19_ = vala_genie_scanner_matches (_tmp18_, "elif");
			_tmp16_ = _tmp19_;
		} else {
			_tmp16_ = FALSE;
		}
		if (_tmp16_) {
			vala_genie_scanner_parse_pp_elif (self);
		} else {
			gboolean _tmp20_ = FALSE;
			gint _tmp21_;
			_tmp21_ = len;
			if (_tmp21_ == 4) {
				gchar* _tmp22_;
				gboolean _tmp23_;
				_tmp22_ = begin;
				_tmp23_ = vala_genie_scanner_matches (_tmp22_, "else");
				_tmp20_ = _tmp23_;
			} else {
				_tmp20_ = FALSE;
			}
			if (_tmp20_) {
				vala_genie_scanner_parse_pp_else (self);
			} else {
				gboolean _tmp24_ = FALSE;
				gint _tmp25_;
				_tmp25_ = len;
				if (_tmp25_ == 5) {
					gchar* _tmp26_;
					gboolean _tmp27_;
					_tmp26_ = begin;
					_tmp27_ = vala_genie_scanner_matches (_tmp26_, "endif");
					_tmp24_ = _tmp27_;
				} else {
					_tmp24_ = FALSE;
				}
				if (_tmp24_) {
					vala_genie_scanner_parse_pp_endif (self);
				} else {
					gint _tmp28_;
					gint _tmp29_;
					ValaSourceReference* _tmp30_;
					ValaSourceReference* _tmp31_;
					_tmp28_ = len;
					_tmp29_ = len;
					_tmp30_ = vala_genie_scanner_get_source_reference (self, -_tmp28_, _tmp29_);
					_tmp31_ = _tmp30_;
					vala_report_error (_tmp31_, "syntax error, invalid preprocessing directive");
					_vala_source_reference_unref0 (_tmp31_);
				}
			}
		}
	}
	_tmp33_ = self->priv->conditional_stack;
	_tmp33__length1 = self->priv->conditional_stack_length1;
	if (_tmp33__length1 > 0) {
		ValaGenieScannerConditional* _tmp34_;
		gint _tmp34__length1;
		ValaGenieScannerConditional* _tmp35_;
		gint _tmp35__length1;
		ValaGenieScannerConditional _tmp36_;
		gboolean _tmp37_;
		_tmp34_ = self->priv->conditional_stack;
		_tmp34__length1 = self->priv->conditional_stack_length1;
		_tmp35_ = self->priv->conditional_stack;
		_tmp35__length1 = self->priv->conditional_stack_length1;
		_tmp36_ = _tmp34_[_tmp35__length1 - 1];
		_tmp37_ = _tmp36_.skip_section;
		_tmp32_ = _tmp37_;
	} else {
		_tmp32_ = FALSE;
	}
	if (_tmp32_) {
		gboolean bol = FALSE;
		bol = FALSE;
		while (TRUE) {
			gchar* _tmp38_;
			gchar* _tmp39_;
			gboolean _tmp40_ = FALSE;
			gboolean _tmp41_ = FALSE;
			gboolean _tmp42_;
			gchar* _tmp49_;
			gchar _tmp50_;
			gchar* _tmp55_;
			gint _tmp56_;
			_tmp38_ = self->priv->current;
			_tmp39_ = self->priv->end;
			if (!(_tmp38_ < _tmp39_)) {
				break;
			}
			_tmp42_ = bol;
			if (_tmp42_) {
				gchar* _tmp43_;
				gchar* _tmp44_;
				_tmp43_ = self->priv->current;
				_tmp44_ = self->priv->end;
				_tmp41_ = _tmp43_ < _tmp44_;
			} else {
				_tmp41_ = FALSE;
			}
			if (_tmp41_) {
				gchar* _tmp45_;
				gchar _tmp46_;
				_tmp45_ = self->priv->current;
				_tmp46_ = _tmp45_[0];
				_tmp40_ = _tmp46_ == '#';
			} else {
				_tmp40_ = FALSE;
			}
			if (_tmp40_) {
				gchar* _tmp47_;
				gint _tmp48_;
				_tmp47_ = self->priv->current;
				_tmp48_ = self->priv->column;
				self->priv->current = _tmp47_ - (_tmp48_ - 1);
				self->priv->column = 1;
				return;
			}
			_tmp49_ = self->priv->current;
			_tmp50_ = _tmp49_[0];
			if (_tmp50_ == '\n') {
				gint _tmp51_;
				_tmp51_ = self->priv->line;
				self->priv->line = _tmp51_ + 1;
				self->priv->column = 0;
				bol = TRUE;
			} else {
				gchar* _tmp52_;
				gchar _tmp53_;
				gboolean _tmp54_;
				_tmp52_ = self->priv->current;
				_tmp53_ = _tmp52_[0];
				_tmp54_ = g_ascii_isspace (_tmp53_);
				if (!_tmp54_) {
					bol = FALSE;
				}
			}
			_tmp55_ = self->priv->current;
			self->priv->current = _tmp55_ + 1;
			_tmp56_ = self->priv->column;
			self->priv->column = _tmp56_ + 1;
		}
	}
}


static void vala_genie_scanner_pp_eol (ValaGenieScanner* self) {
	gboolean _tmp0_ = FALSE;
	gchar* _tmp1_;
	gchar* _tmp2_;
	g_return_if_fail (self != NULL);
	vala_genie_scanner_pp_space (self);
	_tmp1_ = self->priv->current;
	_tmp2_ = self->priv->end;
	if (_tmp1_ >= _tmp2_) {
		_tmp0_ = TRUE;
	} else {
		gchar* _tmp3_;
		gchar _tmp4_;
		_tmp3_ = self->priv->current;
		_tmp4_ = _tmp3_[0];
		_tmp0_ = _tmp4_ != '\n';
	}
	if (_tmp0_) {
		ValaSourceReference* _tmp5_;
		ValaSourceReference* _tmp6_;
		_tmp5_ = vala_genie_scanner_get_source_reference (self, 0, 0);
		_tmp6_ = _tmp5_;
		vala_report_error (_tmp6_, "syntax error, expected newline");
		_vala_source_reference_unref0 (_tmp6_);
	}
}


static void _vala_array_add11 (ValaGenieScannerConditional* * array, int* length, int* size, const ValaGenieScannerConditional* value) {
	if ((*length) == (*size)) {
		*size = (*size) ? (2 * (*size)) : 4;
		*array = g_renew (ValaGenieScannerConditional, *array, *size);
	}
	(*array)[(*length)++] = *value;
}


static void vala_genie_scanner_parse_pp_if (ValaGenieScanner* self) {
	gboolean condition = FALSE;
	gboolean _tmp0_;
	ValaGenieScannerConditional* _tmp1_;
	gint _tmp1__length1;
	ValaGenieScannerConditional _tmp2_ = {0};
	gboolean _tmp3_ = FALSE;
	gboolean _tmp4_;
	g_return_if_fail (self != NULL);
	vala_genie_scanner_pp_space (self);
	_tmp0_ = vala_genie_scanner_parse_pp_expression (self);
	condition = _tmp0_;
	vala_genie_scanner_pp_eol (self);
	_tmp1_ = self->priv->conditional_stack;
	_tmp1__length1 = self->priv->conditional_stack_length1;
	memset (&_tmp2_, 0, sizeof (ValaGenieScannerConditional));
	_vala_array_add11 (&self->priv->conditional_stack, &self->priv->conditional_stack_length1, &self->priv->_conditional_stack_size_, &_tmp2_);
	_tmp4_ = condition;
	if (_tmp4_) {
		gboolean _tmp5_ = FALSE;
		ValaGenieScannerConditional* _tmp6_;
		gint _tmp6__length1;
		_tmp6_ = self->priv->conditional_stack;
		_tmp6__length1 = self->priv->conditional_stack_length1;
		if (_tmp6__length1 == 1) {
			_tmp5_ = TRUE;
		} else {
			ValaGenieScannerConditional* _tmp7_;
			gint _tmp7__length1;
			ValaGenieScannerConditional* _tmp8_;
			gint _tmp8__length1;
			ValaGenieScannerConditional _tmp9_;
			gboolean _tmp10_;
			_tmp7_ = self->priv->conditional_stack;
			_tmp7__length1 = self->priv->conditional_stack_length1;
			_tmp8_ = self->priv->conditional_stack;
			_tmp8__length1 = self->priv->conditional_stack_length1;
			_tmp9_ = _tmp7_[_tmp8__length1 - 2];
			_tmp10_ = _tmp9_.skip_section;
			_tmp5_ = !_tmp10_;
		}
		_tmp3_ = _tmp5_;
	} else {
		_tmp3_ = FALSE;
	}
	if (_tmp3_) {
		ValaGenieScannerConditional* _tmp11_;
		gint _tmp11__length1;
		ValaGenieScannerConditional* _tmp12_;
		gint _tmp12__length1;
		_tmp11_ = self->priv->conditional_stack;
		_tmp11__length1 = self->priv->conditional_stack_length1;
		_tmp12_ = self->priv->conditional_stack;
		_tmp12__length1 = self->priv->conditional_stack_length1;
		_tmp11_[_tmp12__length1 - 1].matched = TRUE;
	} else {
		ValaGenieScannerConditional* _tmp13_;
		gint _tmp13__length1;
		ValaGenieScannerConditional* _tmp14_;
		gint _tmp14__length1;
		_tmp13_ = self->priv->conditional_stack;
		_tmp13__length1 = self->priv->conditional_stack_length1;
		_tmp14_ = self->priv->conditional_stack;
		_tmp14__length1 = self->priv->conditional_stack_length1;
		_tmp13_[_tmp14__length1 - 1].skip_section = TRUE;
	}
}


static void vala_genie_scanner_parse_pp_elif (ValaGenieScanner* self) {
	gboolean condition = FALSE;
	gboolean _tmp0_;
	gboolean _tmp1_ = FALSE;
	ValaGenieScannerConditional* _tmp2_;
	gint _tmp2__length1;
	gboolean _tmp9_ = FALSE;
	gboolean _tmp10_ = FALSE;
	gboolean _tmp11_;
	g_return_if_fail (self != NULL);
	vala_genie_scanner_pp_space (self);
	_tmp0_ = vala_genie_scanner_parse_pp_expression (self);
	condition = _tmp0_;
	vala_genie_scanner_pp_eol (self);
	_tmp2_ = self->priv->conditional_stack;
	_tmp2__length1 = self->priv->conditional_stack_length1;
	if (_tmp2__length1 == 0) {
		_tmp1_ = TRUE;
	} else {
		ValaGenieScannerConditional* _tmp3_;
		gint _tmp3__length1;
		ValaGenieScannerConditional* _tmp4_;
		gint _tmp4__length1;
		ValaGenieScannerConditional _tmp5_;
		gboolean _tmp6_;
		_tmp3_ = self->priv->conditional_stack;
		_tmp3__length1 = self->priv->conditional_stack_length1;
		_tmp4_ = self->priv->conditional_stack;
		_tmp4__length1 = self->priv->conditional_stack_length1;
		_tmp5_ = _tmp3_[_tmp4__length1 - 1];
		_tmp6_ = _tmp5_.else_found;
		_tmp1_ = _tmp6_;
	}
	if (_tmp1_) {
		ValaSourceReference* _tmp7_;
		ValaSourceReference* _tmp8_;
		_tmp7_ = vala_genie_scanner_get_source_reference (self, 0, 0);
		_tmp8_ = _tmp7_;
		vala_report_error (_tmp8_, "syntax error, unexpected #elif");
		_vala_source_reference_unref0 (_tmp8_);
		return;
	}
	_tmp11_ = condition;
	if (_tmp11_) {
		ValaGenieScannerConditional* _tmp12_;
		gint _tmp12__length1;
		ValaGenieScannerConditional* _tmp13_;
		gint _tmp13__length1;
		ValaGenieScannerConditional _tmp14_;
		gboolean _tmp15_;
		_tmp12_ = self->priv->conditional_stack;
		_tmp12__length1 = self->priv->conditional_stack_length1;
		_tmp13_ = self->priv->conditional_stack;
		_tmp13__length1 = self->priv->conditional_stack_length1;
		_tmp14_ = _tmp12_[_tmp13__length1 - 1];
		_tmp15_ = _tmp14_.matched;
		_tmp10_ = !_tmp15_;
	} else {
		_tmp10_ = FALSE;
	}
	if (_tmp10_) {
		gboolean _tmp16_ = FALSE;
		ValaGenieScannerConditional* _tmp17_;
		gint _tmp17__length1;
		_tmp17_ = self->priv->conditional_stack;
		_tmp17__length1 = self->priv->conditional_stack_length1;
		if (_tmp17__length1 == 1) {
			_tmp16_ = TRUE;
		} else {
			ValaGenieScannerConditional* _tmp18_;
			gint _tmp18__length1;
			ValaGenieScannerConditional* _tmp19_;
			gint _tmp19__length1;
			ValaGenieScannerConditional _tmp20_;
			gboolean _tmp21_;
			_tmp18_ = self->priv->conditional_stack;
			_tmp18__length1 = self->priv->conditional_stack_length1;
			_tmp19_ = self->priv->conditional_stack;
			_tmp19__length1 = self->priv->conditional_stack_length1;
			_tmp20_ = _tmp18_[_tmp19__length1 - 2];
			_tmp21_ = _tmp20_.skip_section;
			_tmp16_ = !_tmp21_;
		}
		_tmp9_ = _tmp16_;
	} else {
		_tmp9_ = FALSE;
	}
	if (_tmp9_) {
		ValaGenieScannerConditional* _tmp22_;
		gint _tmp22__length1;
		ValaGenieScannerConditional* _tmp23_;
		gint _tmp23__length1;
		ValaGenieScannerConditional* _tmp24_;
		gint _tmp24__length1;
		ValaGenieScannerConditional* _tmp25_;
		gint _tmp25__length1;
		_tmp22_ = self->priv->conditional_stack;
		_tmp22__length1 = self->priv->conditional_stack_length1;
		_tmp23_ = self->priv->conditional_stack;
		_tmp23__length1 = self->priv->conditional_stack_length1;
		_tmp22_[_tmp23__length1 - 1].matched = TRUE;
		_tmp24_ = self->priv->conditional_stack;
		_tmp24__length1 = self->priv->conditional_stack_length1;
		_tmp25_ = self->priv->conditional_stack;
		_tmp25__length1 = self->priv->conditional_stack_length1;
		_tmp24_[_tmp25__length1 - 1].skip_section = FALSE;
	} else {
		ValaGenieScannerConditional* _tmp26_;
		gint _tmp26__length1;
		ValaGenieScannerConditional* _tmp27_;
		gint _tmp27__length1;
		_tmp26_ = self->priv->conditional_stack;
		_tmp26__length1 = self->priv->conditional_stack_length1;
		_tmp27_ = self->priv->conditional_stack;
		_tmp27__length1 = self->priv->conditional_stack_length1;
		_tmp26_[_tmp27__length1 - 1].skip_section = TRUE;
	}
}


static void vala_genie_scanner_parse_pp_else (ValaGenieScanner* self) {
	gboolean _tmp0_ = FALSE;
	ValaGenieScannerConditional* _tmp1_;
	gint _tmp1__length1;
	gboolean _tmp8_ = FALSE;
	ValaGenieScannerConditional* _tmp9_;
	gint _tmp9__length1;
	ValaGenieScannerConditional* _tmp10_;
	gint _tmp10__length1;
	ValaGenieScannerConditional _tmp11_;
	gboolean _tmp12_;
	g_return_if_fail (self != NULL);
	vala_genie_scanner_pp_eol (self);
	_tmp1_ = self->priv->conditional_stack;
	_tmp1__length1 = self->priv->conditional_stack_length1;
	if (_tmp1__length1 == 0) {
		_tmp0_ = TRUE;
	} else {
		ValaGenieScannerConditional* _tmp2_;
		gint _tmp2__length1;
		ValaGenieScannerConditional* _tmp3_;
		gint _tmp3__length1;
		ValaGenieScannerConditional _tmp4_;
		gboolean _tmp5_;
		_tmp2_ = self->priv->conditional_stack;
		_tmp2__length1 = self->priv->conditional_stack_length1;
		_tmp3_ = self->priv->conditional_stack;
		_tmp3__length1 = self->priv->conditional_stack_length1;
		_tmp4_ = _tmp2_[_tmp3__length1 - 1];
		_tmp5_ = _tmp4_.else_found;
		_tmp0_ = _tmp5_;
	}
	if (_tmp0_) {
		ValaSourceReference* _tmp6_;
		ValaSourceReference* _tmp7_;
		_tmp6_ = vala_genie_scanner_get_source_reference (self, 0, 0);
		_tmp7_ = _tmp6_;
		vala_report_error (_tmp7_, "syntax error, unexpected #else");
		_vala_source_reference_unref0 (_tmp7_);
		return;
	}
	_tmp9_ = self->priv->conditional_stack;
	_tmp9__length1 = self->priv->conditional_stack_length1;
	_tmp10_ = self->priv->conditional_stack;
	_tmp10__length1 = self->priv->conditional_stack_length1;
	_tmp11_ = _tmp9_[_tmp10__length1 - 1];
	_tmp12_ = _tmp11_.matched;
	if (!_tmp12_) {
		gboolean _tmp13_ = FALSE;
		ValaGenieScannerConditional* _tmp14_;
		gint _tmp14__length1;
		_tmp14_ = self->priv->conditional_stack;
		_tmp14__length1 = self->priv->conditional_stack_length1;
		if (_tmp14__length1 == 1) {
			_tmp13_ = TRUE;
		} else {
			ValaGenieScannerConditional* _tmp15_;
			gint _tmp15__length1;
			ValaGenieScannerConditional* _tmp16_;
			gint _tmp16__length1;
			ValaGenieScannerConditional _tmp17_;
			gboolean _tmp18_;
			_tmp15_ = self->priv->conditional_stack;
			_tmp15__length1 = self->priv->conditional_stack_length1;
			_tmp16_ = self->priv->conditional_stack;
			_tmp16__length1 = self->priv->conditional_stack_length1;
			_tmp17_ = _tmp15_[_tmp16__length1 - 2];
			_tmp18_ = _tmp17_.skip_section;
			_tmp13_ = !_tmp18_;
		}
		_tmp8_ = _tmp13_;
	} else {
		_tmp8_ = FALSE;
	}
	if (_tmp8_) {
		ValaGenieScannerConditional* _tmp19_;
		gint _tmp19__length1;
		ValaGenieScannerConditional* _tmp20_;
		gint _tmp20__length1;
		ValaGenieScannerConditional* _tmp21_;
		gint _tmp21__length1;
		ValaGenieScannerConditional* _tmp22_;
		gint _tmp22__length1;
		_tmp19_ = self->priv->conditional_stack;
		_tmp19__length1 = self->priv->conditional_stack_length1;
		_tmp20_ = self->priv->conditional_stack;
		_tmp20__length1 = self->priv->conditional_stack_length1;
		_tmp19_[_tmp20__length1 - 1].matched = TRUE;
		_tmp21_ = self->priv->conditional_stack;
		_tmp21__length1 = self->priv->conditional_stack_length1;
		_tmp22_ = self->priv->conditional_stack;
		_tmp22__length1 = self->priv->conditional_stack_length1;
		_tmp21_[_tmp22__length1 - 1].skip_section = FALSE;
	} else {
		ValaGenieScannerConditional* _tmp23_;
		gint _tmp23__length1;
		ValaGenieScannerConditional* _tmp24_;
		gint _tmp24__length1;
		_tmp23_ = self->priv->conditional_stack;
		_tmp23__length1 = self->priv->conditional_stack_length1;
		_tmp24_ = self->priv->conditional_stack;
		_tmp24__length1 = self->priv->conditional_stack_length1;
		_tmp23_[_tmp24__length1 - 1].skip_section = TRUE;
	}
}


static void vala_genie_scanner_parse_pp_endif (ValaGenieScanner* self) {
	ValaGenieScannerConditional* _tmp0_;
	gint _tmp0__length1;
	gint _tmp3_;
	g_return_if_fail (self != NULL);
	vala_genie_scanner_pp_eol (self);
	_tmp0_ = self->priv->conditional_stack;
	_tmp0__length1 = self->priv->conditional_stack_length1;
	if (_tmp0__length1 == 0) {
		ValaSourceReference* _tmp1_;
		ValaSourceReference* _tmp2_;
		_tmp1_ = vala_genie_scanner_get_source_reference (self, 0, 0);
		_tmp2_ = _tmp1_;
		vala_report_error (_tmp2_, "syntax error, unexpected #endif");
		_vala_source_reference_unref0 (_tmp2_);
		return;
	}
	_tmp3_ = self->priv->conditional_stack_length1;
	self->priv->conditional_stack_length1 = _tmp3_ - 1;
}


static gboolean vala_genie_scanner_parse_pp_symbol (ValaGenieScanner* self) {
	gboolean result = FALSE;
	gint len = 0;
	gint _tmp9_;
	gchar* identifier = NULL;
	gchar* _tmp12_;
	gint _tmp13_;
	gint _tmp14_;
	gchar* _tmp15_;
	gboolean defined = FALSE;
	const gchar* _tmp16_;
	g_return_val_if_fail (self != NULL, FALSE);
	len = 0;
	while (TRUE) {
		gboolean _tmp0_ = FALSE;
		gchar* _tmp1_;
		gchar* _tmp2_;
		gchar* _tmp6_;
		gint _tmp7_;
		gint _tmp8_;
		_tmp1_ = self->priv->current;
		_tmp2_ = self->priv->end;
		if (_tmp1_ < _tmp2_) {
			gchar* _tmp3_;
			gchar _tmp4_;
			gboolean _tmp5_;
			_tmp3_ = self->priv->current;
			_tmp4_ = _tmp3_[0];
			_tmp5_ = vala_genie_scanner_is_ident_char (self, _tmp4_);
			_tmp0_ = _tmp5_;
		} else {
			_tmp0_ = FALSE;
		}
		if (!_tmp0_) {
			break;
		}
		_tmp6_ = self->priv->current;
		self->priv->current = _tmp6_ + 1;
		_tmp7_ = self->priv->column;
		self->priv->column = _tmp7_ + 1;
		_tmp8_ = len;
		len = _tmp8_ + 1;
	}
	_tmp9_ = len;
	if (_tmp9_ == 0) {
		ValaSourceReference* _tmp10_;
		ValaSourceReference* _tmp11_;
		_tmp10_ = vala_genie_scanner_get_source_reference (self, 0, 0);
		_tmp11_ = _tmp10_;
		vala_report_error (_tmp11_, "syntax error, expected identifier");
		_vala_source_reference_unref0 (_tmp11_);
		result = FALSE;
		return result;
	}
	_tmp12_ = self->priv->current;
	_tmp13_ = len;
	_tmp14_ = len;
	_tmp15_ = string_substring ((const gchar*) (_tmp12_ - _tmp13_), (glong) 0, (glong) _tmp14_);
	identifier = _tmp15_;
	_tmp16_ = identifier;
	if (g_strcmp0 (_tmp16_, "true") == 0) {
		defined = TRUE;
	} else {
		const gchar* _tmp17_;
		_tmp17_ = identifier;
		if (g_strcmp0 (_tmp17_, "false") == 0) {
			defined = FALSE;
		} else {
			ValaSourceFile* _tmp18_;
			ValaCodeContext* _tmp19_;
			ValaCodeContext* _tmp20_;
			const gchar* _tmp21_;
			gboolean _tmp22_;
			_tmp18_ = self->priv->_source_file;
			_tmp19_ = vala_source_file_get_context (_tmp18_);
			_tmp20_ = _tmp19_;
			_tmp21_ = identifier;
			_tmp22_ = vala_code_context_is_defined (_tmp20_, _tmp21_);
			defined = _tmp22_;
		}
	}
	result = defined;
	_g_free0 (identifier);
	return result;
}


static gboolean vala_genie_scanner_parse_pp_primary_expression (ValaGenieScanner* self) {
	gboolean result = FALSE;
	gchar* _tmp0_;
	gchar* _tmp1_;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp0_ = self->priv->current;
	_tmp1_ = self->priv->end;
	if (_tmp0_ >= _tmp1_) {
		ValaSourceReference* _tmp2_;
		ValaSourceReference* _tmp3_;
		_tmp2_ = vala_genie_scanner_get_source_reference (self, 0, 0);
		_tmp3_ = _tmp2_;
		vala_report_error (_tmp3_, "syntax error, expected identifier");
		_vala_source_reference_unref0 (_tmp3_);
	} else {
		gchar* _tmp4_;
		gchar _tmp5_;
		gboolean _tmp6_;
		_tmp4_ = self->priv->current;
		_tmp5_ = _tmp4_[0];
		_tmp6_ = vala_genie_scanner_is_ident_char (self, _tmp5_);
		if (_tmp6_) {
			gboolean _tmp7_;
			_tmp7_ = vala_genie_scanner_parse_pp_symbol (self);
			result = _tmp7_;
			return result;
		} else {
			gchar* _tmp8_;
			gchar _tmp9_;
			_tmp8_ = self->priv->current;
			_tmp9_ = _tmp8_[0];
			if (_tmp9_ == '(') {
				gchar* _tmp10_;
				gint _tmp11_;
				gboolean _result_ = FALSE;
				gboolean _tmp12_;
				gboolean _tmp13_ = FALSE;
				gchar* _tmp14_;
				gchar* _tmp15_;
				_tmp10_ = self->priv->current;
				self->priv->current = _tmp10_ + 1;
				_tmp11_ = self->priv->column;
				self->priv->column = _tmp11_ + 1;
				vala_genie_scanner_pp_space (self);
				_tmp12_ = vala_genie_scanner_parse_pp_expression (self);
				_result_ = _tmp12_;
				vala_genie_scanner_pp_space (self);
				_tmp14_ = self->priv->current;
				_tmp15_ = self->priv->end;
				if (_tmp14_ < _tmp15_) {
					gchar* _tmp16_;
					gchar _tmp17_;
					_tmp16_ = self->priv->current;
					_tmp17_ = _tmp16_[0];
					_tmp13_ = _tmp17_ == ')';
				} else {
					_tmp13_ = FALSE;
				}
				if (_tmp13_) {
					gchar* _tmp18_;
					gint _tmp19_;
					_tmp18_ = self->priv->current;
					self->priv->current = _tmp18_ + 1;
					_tmp19_ = self->priv->column;
					self->priv->column = _tmp19_ + 1;
				} else {
					ValaSourceReference* _tmp20_;
					ValaSourceReference* _tmp21_;
					_tmp20_ = vala_genie_scanner_get_source_reference (self, 0, 0);
					_tmp21_ = _tmp20_;
					vala_report_error (_tmp21_, "syntax error, expected `)'");
					_vala_source_reference_unref0 (_tmp21_);
				}
				result = _result_;
				return result;
			} else {
				ValaSourceReference* _tmp22_;
				ValaSourceReference* _tmp23_;
				_tmp22_ = vala_genie_scanner_get_source_reference (self, 0, 0);
				_tmp23_ = _tmp22_;
				vala_report_error (_tmp23_, "syntax error, expected identifier");
				_vala_source_reference_unref0 (_tmp23_);
			}
		}
	}
	result = FALSE;
	return result;
}


static gboolean vala_genie_scanner_parse_pp_unary_expression (ValaGenieScanner* self) {
	gboolean result = FALSE;
	gboolean _tmp0_ = FALSE;
	gchar* _tmp1_;
	gchar* _tmp2_;
	gboolean _tmp8_;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp1_ = self->priv->current;
	_tmp2_ = self->priv->end;
	if (_tmp1_ < _tmp2_) {
		gchar* _tmp3_;
		gchar _tmp4_;
		_tmp3_ = self->priv->current;
		_tmp4_ = _tmp3_[0];
		_tmp0_ = _tmp4_ == '!';
	} else {
		_tmp0_ = FALSE;
	}
	if (_tmp0_) {
		gchar* _tmp5_;
		gint _tmp6_;
		gboolean _tmp7_;
		_tmp5_ = self->priv->current;
		self->priv->current = _tmp5_ + 1;
		_tmp6_ = self->priv->column;
		self->priv->column = _tmp6_ + 1;
		vala_genie_scanner_pp_space (self);
		_tmp7_ = vala_genie_scanner_parse_pp_unary_expression (self);
		result = !_tmp7_;
		return result;
	}
	_tmp8_ = vala_genie_scanner_parse_pp_primary_expression (self);
	result = _tmp8_;
	return result;
}


static gboolean vala_genie_scanner_parse_pp_equality_expression (ValaGenieScanner* self) {
	gboolean result = FALSE;
	gboolean left = FALSE;
	gboolean _tmp0_;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp0_ = vala_genie_scanner_parse_pp_unary_expression (self);
	left = _tmp0_;
	vala_genie_scanner_pp_space (self);
	while (TRUE) {
		gboolean _tmp1_ = FALSE;
		gboolean _tmp2_ = FALSE;
		gchar* _tmp3_;
		gchar* _tmp4_;
		_tmp3_ = self->priv->current;
		_tmp4_ = self->priv->end;
		if (_tmp3_ < (_tmp4_ - 1)) {
			gchar* _tmp5_;
			gchar _tmp6_;
			_tmp5_ = self->priv->current;
			_tmp6_ = _tmp5_[0];
			_tmp2_ = _tmp6_ == '=';
		} else {
			_tmp2_ = FALSE;
		}
		if (_tmp2_) {
			gchar* _tmp7_;
			gchar _tmp8_;
			_tmp7_ = self->priv->current;
			_tmp8_ = _tmp7_[1];
			_tmp1_ = _tmp8_ == '=';
		} else {
			_tmp1_ = FALSE;
		}
		if (_tmp1_) {
			gchar* _tmp9_;
			gint _tmp10_;
			gboolean right = FALSE;
			gboolean _tmp11_;
			gboolean _tmp12_;
			gboolean _tmp13_;
			_tmp9_ = self->priv->current;
			self->priv->current = _tmp9_ + 2;
			_tmp10_ = self->priv->column;
			self->priv->column = _tmp10_ + 2;
			vala_genie_scanner_pp_space (self);
			_tmp11_ = vala_genie_scanner_parse_pp_unary_expression (self);
			right = _tmp11_;
			_tmp12_ = left;
			_tmp13_ = right;
			left = _tmp12_ == _tmp13_;
		} else {
			gboolean _tmp14_ = FALSE;
			gboolean _tmp15_ = FALSE;
			gchar* _tmp16_;
			gchar* _tmp17_;
			_tmp16_ = self->priv->current;
			_tmp17_ = self->priv->end;
			if (_tmp16_ < (_tmp17_ - 1)) {
				gchar* _tmp18_;
				gchar _tmp19_;
				_tmp18_ = self->priv->current;
				_tmp19_ = _tmp18_[0];
				_tmp15_ = _tmp19_ == '!';
			} else {
				_tmp15_ = FALSE;
			}
			if (_tmp15_) {
				gchar* _tmp20_;
				gchar _tmp21_;
				_tmp20_ = self->priv->current;
				_tmp21_ = _tmp20_[1];
				_tmp14_ = _tmp21_ == '=';
			} else {
				_tmp14_ = FALSE;
			}
			if (_tmp14_) {
				gchar* _tmp22_;
				gint _tmp23_;
				gboolean right = FALSE;
				gboolean _tmp24_;
				gboolean _tmp25_;
				gboolean _tmp26_;
				_tmp22_ = self->priv->current;
				self->priv->current = _tmp22_ + 2;
				_tmp23_ = self->priv->column;
				self->priv->column = _tmp23_ + 2;
				vala_genie_scanner_pp_space (self);
				_tmp24_ = vala_genie_scanner_parse_pp_unary_expression (self);
				right = _tmp24_;
				_tmp25_ = left;
				_tmp26_ = right;
				left = _tmp25_ != _tmp26_;
			} else {
				break;
			}
		}
	}
	result = left;
	return result;
}


static gboolean vala_genie_scanner_parse_pp_and_expression (ValaGenieScanner* self) {
	gboolean result = FALSE;
	gboolean left = FALSE;
	gboolean _tmp0_;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp0_ = vala_genie_scanner_parse_pp_equality_expression (self);
	left = _tmp0_;
	vala_genie_scanner_pp_space (self);
	while (TRUE) {
		gboolean _tmp1_ = FALSE;
		gboolean _tmp2_ = FALSE;
		gchar* _tmp3_;
		gchar* _tmp4_;
		gchar* _tmp9_;
		gint _tmp10_;
		gboolean right = FALSE;
		gboolean _tmp11_;
		gboolean _tmp12_ = FALSE;
		gboolean _tmp13_;
		_tmp3_ = self->priv->current;
		_tmp4_ = self->priv->end;
		if (_tmp3_ < (_tmp4_ - 1)) {
			gchar* _tmp5_;
			gchar _tmp6_;
			_tmp5_ = self->priv->current;
			_tmp6_ = _tmp5_[0];
			_tmp2_ = _tmp6_ == '&';
		} else {
			_tmp2_ = FALSE;
		}
		if (_tmp2_) {
			gchar* _tmp7_;
			gchar _tmp8_;
			_tmp7_ = self->priv->current;
			_tmp8_ = _tmp7_[1];
			_tmp1_ = _tmp8_ == '&';
		} else {
			_tmp1_ = FALSE;
		}
		if (!_tmp1_) {
			break;
		}
		_tmp9_ = self->priv->current;
		self->priv->current = _tmp9_ + 2;
		_tmp10_ = self->priv->column;
		self->priv->column = _tmp10_ + 2;
		vala_genie_scanner_pp_space (self);
		_tmp11_ = vala_genie_scanner_parse_pp_equality_expression (self);
		right = _tmp11_;
		_tmp13_ = left;
		if (_tmp13_) {
			gboolean _tmp14_;
			_tmp14_ = right;
			_tmp12_ = _tmp14_;
		} else {
			_tmp12_ = FALSE;
		}
		left = _tmp12_;
	}
	result = left;
	return result;
}


static gboolean vala_genie_scanner_parse_pp_or_expression (ValaGenieScanner* self) {
	gboolean result = FALSE;
	gboolean left = FALSE;
	gboolean _tmp0_;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp0_ = vala_genie_scanner_parse_pp_and_expression (self);
	left = _tmp0_;
	vala_genie_scanner_pp_space (self);
	while (TRUE) {
		gboolean _tmp1_ = FALSE;
		gboolean _tmp2_ = FALSE;
		gchar* _tmp3_;
		gchar* _tmp4_;
		gchar* _tmp9_;
		gint _tmp10_;
		gboolean right = FALSE;
		gboolean _tmp11_;
		gboolean _tmp12_ = FALSE;
		gboolean _tmp13_;
		_tmp3_ = self->priv->current;
		_tmp4_ = self->priv->end;
		if (_tmp3_ < (_tmp4_ - 1)) {
			gchar* _tmp5_;
			gchar _tmp6_;
			_tmp5_ = self->priv->current;
			_tmp6_ = _tmp5_[0];
			_tmp2_ = _tmp6_ == '|';
		} else {
			_tmp2_ = FALSE;
		}
		if (_tmp2_) {
			gchar* _tmp7_;
			gchar _tmp8_;
			_tmp7_ = self->priv->current;
			_tmp8_ = _tmp7_[1];
			_tmp1_ = _tmp8_ == '|';
		} else {
			_tmp1_ = FALSE;
		}
		if (!_tmp1_) {
			break;
		}
		_tmp9_ = self->priv->current;
		self->priv->current = _tmp9_ + 2;
		_tmp10_ = self->priv->column;
		self->priv->column = _tmp10_ + 2;
		vala_genie_scanner_pp_space (self);
		_tmp11_ = vala_genie_scanner_parse_pp_and_expression (self);
		right = _tmp11_;
		_tmp13_ = left;
		if (_tmp13_) {
			_tmp12_ = TRUE;
		} else {
			gboolean _tmp14_;
			_tmp14_ = right;
			_tmp12_ = _tmp14_;
		}
		left = _tmp12_;
	}
	result = left;
	return result;
}


static gboolean vala_genie_scanner_parse_pp_expression (ValaGenieScanner* self) {
	gboolean result = FALSE;
	gboolean _tmp0_;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp0_ = vala_genie_scanner_parse_pp_or_expression (self);
	result = _tmp0_;
	return result;
}


ValaSourceFile* vala_genie_scanner_get_source_file (ValaGenieScanner* self) {
	ValaSourceFile* result;
	ValaSourceFile* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_source_file;
	result = _tmp0_;
	return result;
}


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


static void vala_genie_scanner_set_source_file (ValaGenieScanner* self, ValaSourceFile* value) {
	ValaSourceFile* _tmp0_;
	ValaSourceFile* _tmp1_;
	g_return_if_fail (self != NULL);
	_tmp0_ = value;
	_tmp1_ = _vala_source_file_ref0 (_tmp0_);
	_vala_source_file_unref0 (self->priv->_source_file);
	self->priv->_source_file = _tmp1_;
}


gint vala_genie_scanner_get_indent_spaces (ValaGenieScanner* self) {
	gint result;
	gint _tmp0_;
	g_return_val_if_fail (self != NULL, 0);
	_tmp0_ = self->priv->_indent_spaces;
	result = _tmp0_;
	return result;
}


void vala_genie_scanner_set_indent_spaces (ValaGenieScanner* self, gint value) {
	gint _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = value;
	self->priv->_indent_spaces = _tmp0_;
}


static ValaGenieScannerConditional* vala_genie_scanner_conditional_dup (const ValaGenieScannerConditional* self) {
	ValaGenieScannerConditional* dup;
	dup = g_new0 (ValaGenieScannerConditional, 1);
	memcpy (dup, self, sizeof (ValaGenieScannerConditional));
	return dup;
}


static void vala_genie_scanner_conditional_free (ValaGenieScannerConditional* self) {
	g_free (self);
}


static GType vala_genie_scanner_conditional_get_type (void) {
	static volatile gsize vala_genie_scanner_conditional_type_id__volatile = 0;
	if (g_once_init_enter (&vala_genie_scanner_conditional_type_id__volatile)) {
		GType vala_genie_scanner_conditional_type_id;
		vala_genie_scanner_conditional_type_id = g_boxed_type_register_static ("ValaGenieScannerConditional", (GBoxedCopyFunc) vala_genie_scanner_conditional_dup, (GBoxedFreeFunc) vala_genie_scanner_conditional_free);
		g_once_init_leave (&vala_genie_scanner_conditional_type_id__volatile, vala_genie_scanner_conditional_type_id);
	}
	return vala_genie_scanner_conditional_type_id__volatile;
}


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


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


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


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


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


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


GParamSpec* vala_genie_param_spec_scanner (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) {
	ValaGenieParamSpecScanner* spec;
	g_return_val_if_fail (g_type_is_a (object_type, VALA_GENIE_TYPE_SCANNER), 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);
}


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


void vala_genie_value_set_scanner (GValue* value, gpointer v_object) {
	ValaGenieScanner * old;
	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, VALA_GENIE_TYPE_SCANNER));
	old = value->data[0].v_pointer;
	if (v_object) {
		g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, VALA_GENIE_TYPE_SCANNER));
		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_genie_scanner_ref (value->data[0].v_pointer);
	} else {
		value->data[0].v_pointer = NULL;
	}
	if (old) {
		vala_genie_scanner_unref (old);
	}
}


void vala_genie_value_take_scanner (GValue* value, gpointer v_object) {
	ValaGenieScanner * old;
	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, VALA_GENIE_TYPE_SCANNER));
	old = value->data[0].v_pointer;
	if (v_object) {
		g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, VALA_GENIE_TYPE_SCANNER));
		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_genie_scanner_unref (old);
	}
}


static void vala_genie_scanner_class_init (ValaGenieScannerClass * klass) {
	vala_genie_scanner_parent_class = g_type_class_peek_parent (klass);
	((ValaGenieScannerClass *) klass)->finalize = vala_genie_scanner_finalize;
	g_type_class_add_private (klass, sizeof (ValaGenieScannerPrivate));
}


static void vala_genie_scanner_instance_init (ValaGenieScanner * self) {
	self->priv = VALA_GENIE_SCANNER_GET_PRIVATE (self);
	self->ref_count = 1;
}


static void vala_genie_scanner_finalize (ValaGenieScanner * obj) {
	ValaGenieScanner * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, VALA_GENIE_TYPE_SCANNER, ValaGenieScanner);
	g_signal_handlers_destroy (self);
	_vala_source_file_unref0 (self->priv->_source_file);
	_vala_comment_unref0 (self->priv->_comment);
	self->priv->conditional_stack = (g_free (self->priv->conditional_stack), NULL);
	self->priv->state_stack = (g_free (self->priv->state_stack), NULL);
}


/**
 * Lexical scanner for Genie source files.
 */
GType vala_genie_scanner_get_type (void) {
	static volatile gsize vala_genie_scanner_type_id__volatile = 0;
	if (g_once_init_enter (&vala_genie_scanner_type_id__volatile)) {
		static const GTypeValueTable g_define_type_value_table = { vala_genie_value_scanner_init, vala_genie_value_scanner_free_value, vala_genie_value_scanner_copy_value, vala_genie_value_scanner_peek_pointer, "p", vala_genie_value_scanner_collect_value, "p", vala_genie_value_scanner_lcopy_value };
		static const GTypeInfo g_define_type_info = { sizeof (ValaGenieScannerClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) vala_genie_scanner_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ValaGenieScanner), 0, (GInstanceInitFunc) vala_genie_scanner_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_genie_scanner_type_id;
		vala_genie_scanner_type_id = g_type_register_fundamental (g_type_fundamental_next (), "ValaGenieScanner", &g_define_type_info, &g_define_type_fundamental_info, 0);
		g_once_init_leave (&vala_genie_scanner_type_id__volatile, vala_genie_scanner_type_id);
	}
	return vala_genie_scanner_type_id__volatile;
}


gpointer vala_genie_scanner_ref (gpointer instance) {
	ValaGenieScanner * self;
	self = instance;
	g_atomic_int_inc (&self->ref_count);
	return instance;
}


void vala_genie_scanner_unref (gpointer instance) {
	ValaGenieScanner * self;
	self = instance;
	if (g_atomic_int_dec_and_test (&self->ref_count)) {
		VALA_GENIE_SCANNER_GET_CLASS (self)->finalize (self);
		g_type_free_instance ((GTypeInstance *) self);
	}
}



