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

#include <glib-object.h>
#include <stdlib.h>
#include <string.h>
#include <glib.h>
#include <gee.h>
#include <glib/gstdio.h>
#include <valaphp-runtime-core-0.01.h>
#include <valaphp-runtime-embed-0.01.h>

#if !defined(VALA_STRICT_C)
#if !defined(__clang__) && defined(__GNUC__) && (__GNUC__ >= 14)
#pragma GCC diagnostic warning "-Wincompatible-pointer-types"
#elif defined(__clang__) && (__clang_major__ >= 16)
#pragma clang diagnostic ignored "-Wincompatible-function-pointer-types"
#pragma clang diagnostic ignored "-Wincompatible-pointer-types"
#endif
#endif
#if !defined(VALA_EXTERN)
#if defined(_MSC_VER)
#define VALA_EXTERN __declspec(dllexport) extern
#elif __GNUC__ >= 4
#define VALA_EXTERN __attribute__((visibility("default"))) extern
#else
#define VALA_EXTERN extern
#endif
#endif

#define TYPE_PHP_TO_VALA_SOURCE_PARSER (php_to_vala_source_parser_get_type ())
#define PHP_TO_VALA_SOURCE_PARSER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PHP_TO_VALA_SOURCE_PARSER, PhpToValaSourceParser))
#define PHP_TO_VALA_SOURCE_PARSER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PHP_TO_VALA_SOURCE_PARSER, PhpToValaSourceParserClass))
#define IS_PHP_TO_VALA_SOURCE_PARSER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PHP_TO_VALA_SOURCE_PARSER))
#define IS_PHP_TO_VALA_SOURCE_PARSER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PHP_TO_VALA_SOURCE_PARSER))
#define PHP_TO_VALA_SOURCE_PARSER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PHP_TO_VALA_SOURCE_PARSER, PhpToValaSourceParserClass))

typedef struct _PhpToValaSourceParser PhpToValaSourceParser;
typedef struct _PhpToValaSourceParserClass PhpToValaSourceParserClass;
typedef struct _PhpToValaSourceParserPrivate PhpToValaSourceParserPrivate;
enum  {
	PHP_TO_VALA_SOURCE_PARSER_0_PROPERTY,
	PHP_TO_VALA_SOURCE_PARSER_NUM_PROPERTIES
};
static GParamSpec* php_to_vala_source_parser_properties[PHP_TO_VALA_SOURCE_PARSER_NUM_PROPERTIES];

#define TYPE_RESOLVED_SOURCE (resolved_source_get_type ())
#define RESOLVED_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_RESOLVED_SOURCE, ResolvedSource))
#define RESOLVED_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_RESOLVED_SOURCE, ResolvedSourceClass))
#define IS_RESOLVED_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_RESOLVED_SOURCE))
#define IS_RESOLVED_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_RESOLVED_SOURCE))
#define RESOLVED_SOURCE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_RESOLVED_SOURCE, ResolvedSourceClass))

typedef struct _ResolvedSource ResolvedSource;
typedef struct _ResolvedSourceClass ResolvedSourceClass;
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))

#define TYPE_PHP_TO_VALA_ERROR (php_to_vala_error_get_type ())
#define _g_free0(var) (var = (g_free (var), NULL))
#define _g_string_free0(var) ((var == NULL) ? NULL : (var = (g_string_free (var, TRUE), NULL)))
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
typedef struct _ResolvedSourcePrivate ResolvedSourcePrivate;

#define TYPE_SOURCE_PARTS (source_parts_get_type ())
#define SOURCE_PARTS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SOURCE_PARTS, SourceParts))
#define SOURCE_PARTS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SOURCE_PARTS, SourcePartsClass))
#define IS_SOURCE_PARTS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SOURCE_PARTS))
#define IS_SOURCE_PARTS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SOURCE_PARTS))
#define SOURCE_PARTS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SOURCE_PARTS, SourcePartsClass))

typedef struct _SourceParts SourceParts;
typedef struct _SourcePartsClass SourcePartsClass;

#define PHP_TO_VALA_SOURCE_PARSER_TYPE_PHP_SOURCE_TOKEN (php_to_vala_source_parser_php_source_token_get_type ())
#define PHP_TO_VALA_SOURCE_PARSER_PHP_SOURCE_TOKEN(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PHP_TO_VALA_SOURCE_PARSER_TYPE_PHP_SOURCE_TOKEN, PhpToValaSourceParserPhpSourceToken))
#define PHP_TO_VALA_SOURCE_PARSER_PHP_SOURCE_TOKEN_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PHP_TO_VALA_SOURCE_PARSER_TYPE_PHP_SOURCE_TOKEN, PhpToValaSourceParserPhpSourceTokenClass))
#define PHP_TO_VALA_SOURCE_PARSER_IS_PHP_SOURCE_TOKEN(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PHP_TO_VALA_SOURCE_PARSER_TYPE_PHP_SOURCE_TOKEN))
#define PHP_TO_VALA_SOURCE_PARSER_IS_PHP_SOURCE_TOKEN_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PHP_TO_VALA_SOURCE_PARSER_TYPE_PHP_SOURCE_TOKEN))
#define PHP_TO_VALA_SOURCE_PARSER_PHP_SOURCE_TOKEN_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PHP_TO_VALA_SOURCE_PARSER_TYPE_PHP_SOURCE_TOKEN, PhpToValaSourceParserPhpSourceTokenClass))

typedef struct _PhpToValaSourceParserPhpSourceToken PhpToValaSourceParserPhpSourceToken;
typedef struct _PhpToValaSourceParserPhpSourceTokenClass PhpToValaSourceParserPhpSourceTokenClass;

#define PHP_TO_VALA_SOURCE_PARSER_TYPE_SOURCE_SPAN (php_to_vala_source_parser_source_span_get_type ())
#define PHP_TO_VALA_SOURCE_PARSER_SOURCE_SPAN(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PHP_TO_VALA_SOURCE_PARSER_TYPE_SOURCE_SPAN, PhpToValaSourceParserSourceSpan))
#define PHP_TO_VALA_SOURCE_PARSER_SOURCE_SPAN_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PHP_TO_VALA_SOURCE_PARSER_TYPE_SOURCE_SPAN, PhpToValaSourceParserSourceSpanClass))
#define PHP_TO_VALA_SOURCE_PARSER_IS_SOURCE_SPAN(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PHP_TO_VALA_SOURCE_PARSER_TYPE_SOURCE_SPAN))
#define PHP_TO_VALA_SOURCE_PARSER_IS_SOURCE_SPAN_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PHP_TO_VALA_SOURCE_PARSER_TYPE_SOURCE_SPAN))
#define PHP_TO_VALA_SOURCE_PARSER_SOURCE_SPAN_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PHP_TO_VALA_SOURCE_PARSER_TYPE_SOURCE_SPAN, PhpToValaSourceParserSourceSpanClass))

typedef struct _PhpToValaSourceParserSourceSpan PhpToValaSourceParserSourceSpan;
typedef struct _PhpToValaSourceParserSourceSpanClass PhpToValaSourceParserSourceSpanClass;
typedef struct _PhpToValaSourceParserPhpSourceTokenPrivate PhpToValaSourceParserPhpSourceTokenPrivate;

#define TYPE_PHPCLASS (phpclass_get_type ())
#define PHPCLASS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PHPCLASS, PhpClass))
#define PHPCLASS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PHPCLASS, PhpClassClass))
#define IS_PHPCLASS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PHPCLASS))
#define IS_PHPCLASS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PHPCLASS))
#define PHPCLASS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PHPCLASS, PhpClassClass))

typedef struct _PhpClass PhpClass;
typedef struct _PhpClassClass PhpClassClass;
typedef struct _SourcePartsPrivate SourcePartsPrivate;

#define TYPE_LOCAL_FUNCTION (local_function_get_type ())
#define LOCAL_FUNCTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_LOCAL_FUNCTION, LocalFunction))
#define LOCAL_FUNCTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_LOCAL_FUNCTION, LocalFunctionClass))
#define IS_LOCAL_FUNCTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_LOCAL_FUNCTION))
#define IS_LOCAL_FUNCTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_LOCAL_FUNCTION))
#define LOCAL_FUNCTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_LOCAL_FUNCTION, LocalFunctionClass))

typedef struct _LocalFunction LocalFunction;
typedef struct _LocalFunctionClass LocalFunctionClass;
#define _php_zval_unref0(var) ((var == NULL) ? NULL : (var = (php_zval_unref (var), NULL)))
#define _g_regex_unref0(var) ((var == NULL) ? NULL : (var = (g_regex_unref (var), NULL)))
typedef struct _PhpClassPrivate PhpClassPrivate;

#define TYPE_LOCAL_PARAMETER (local_parameter_get_type ())
#define LOCAL_PARAMETER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_LOCAL_PARAMETER, LocalParameter))
#define LOCAL_PARAMETER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_LOCAL_PARAMETER, LocalParameterClass))
#define IS_LOCAL_PARAMETER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_LOCAL_PARAMETER))
#define IS_LOCAL_PARAMETER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_LOCAL_PARAMETER))
#define LOCAL_PARAMETER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_LOCAL_PARAMETER, LocalParameterClass))

typedef struct _LocalParameter LocalParameter;
typedef struct _LocalParameterClass LocalParameterClass;
typedef struct _PhpToValaSourceParserSourceSpanPrivate PhpToValaSourceParserSourceSpanPrivate;

#define TYPE_STATEMENTS (statements_get_type ())
#define STATEMENTS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_STATEMENTS, Statements))
#define STATEMENTS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_STATEMENTS, StatementsClass))
#define IS_STATEMENTS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_STATEMENTS))
#define IS_STATEMENTS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_STATEMENTS))
#define STATEMENTS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_STATEMENTS, StatementsClass))

typedef struct _Statements Statements;
typedef struct _StatementsClass StatementsClass;
typedef struct _StatementsPrivate StatementsPrivate;

#define PHP_TO_VALA_SOURCE_PARSER_TYPE_STATEMENT_SLICE (php_to_vala_source_parser_statement_slice_get_type ())
#define PHP_TO_VALA_SOURCE_PARSER_STATEMENT_SLICE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PHP_TO_VALA_SOURCE_PARSER_TYPE_STATEMENT_SLICE, PhpToValaSourceParserStatementSlice))
#define PHP_TO_VALA_SOURCE_PARSER_STATEMENT_SLICE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PHP_TO_VALA_SOURCE_PARSER_TYPE_STATEMENT_SLICE, PhpToValaSourceParserStatementSliceClass))
#define PHP_TO_VALA_SOURCE_PARSER_IS_STATEMENT_SLICE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PHP_TO_VALA_SOURCE_PARSER_TYPE_STATEMENT_SLICE))
#define PHP_TO_VALA_SOURCE_PARSER_IS_STATEMENT_SLICE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PHP_TO_VALA_SOURCE_PARSER_TYPE_STATEMENT_SLICE))
#define PHP_TO_VALA_SOURCE_PARSER_STATEMENT_SLICE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PHP_TO_VALA_SOURCE_PARSER_TYPE_STATEMENT_SLICE, PhpToValaSourceParserStatementSliceClass))

typedef struct _PhpToValaSourceParserStatementSlice PhpToValaSourceParserStatementSlice;
typedef struct _PhpToValaSourceParserStatementSliceClass PhpToValaSourceParserStatementSliceClass;
typedef struct _PhpToValaSourceParserStatementSlicePrivate PhpToValaSourceParserStatementSlicePrivate;
typedef struct _LocalParameterPrivate LocalParameterPrivate;
enum  {
	PHP_TO_VALA_SOURCE_PARSER_PHP_SOURCE_TOKEN_0_PROPERTY,
	PHP_TO_VALA_SOURCE_PARSER_PHP_SOURCE_TOKEN_NUM_PROPERTIES
};
static GParamSpec* php_to_vala_source_parser_php_source_token_properties[PHP_TO_VALA_SOURCE_PARSER_PHP_SOURCE_TOKEN_NUM_PROPERTIES];
enum  {
	PHP_TO_VALA_SOURCE_PARSER_SOURCE_SPAN_0_PROPERTY,
	PHP_TO_VALA_SOURCE_PARSER_SOURCE_SPAN_NUM_PROPERTIES
};
static GParamSpec* php_to_vala_source_parser_source_span_properties[PHP_TO_VALA_SOURCE_PARSER_SOURCE_SPAN_NUM_PROPERTIES];
enum  {
	PHP_TO_VALA_SOURCE_PARSER_STATEMENT_SLICE_0_PROPERTY,
	PHP_TO_VALA_SOURCE_PARSER_STATEMENT_SLICE_NUM_PROPERTIES
};
static GParamSpec* php_to_vala_source_parser_statement_slice_properties[PHP_TO_VALA_SOURCE_PARSER_STATEMENT_SLICE_NUM_PROPERTIES];

struct _PhpToValaSourceParser {
	GObject parent_instance;
	PhpToValaSourceParserPrivate * priv;
};

struct _PhpToValaSourceParserClass {
	GObjectClass parent_class;
};

typedef enum  {
	PHP_TO_VALA_ERROR_UNSUPPORTED
} PhpToValaError;
#define PHP_TO_VALA_ERROR php_to_vala_error_quark ()

struct _ResolvedSource {
	GObject parent_instance;
	ResolvedSourcePrivate * priv;
	gchar* source;
	GeeArrayList* files;
	GeeArrayList* lines;
};

struct _ResolvedSourceClass {
	GObjectClass parent_class;
};

struct _PhpToValaSourceParserPhpSourceToken {
	GObject parent_instance;
	PhpToValaSourceParserPhpSourceTokenPrivate * priv;
	gchar* name;
	gchar* text;
	gint line;
};

struct _PhpToValaSourceParserPhpSourceTokenClass {
	GObjectClass parent_class;
};

struct _SourceParts {
	GObject parent_instance;
	SourcePartsPrivate * priv;
	gchar* main_source;
	GeeArrayList* functions;
	GeeArrayList* classes;
};

struct _SourcePartsClass {
	GObjectClass parent_class;
};

struct _PhpClass {
	GObject parent_instance;
	PhpClassPrivate * priv;
	gchar* name;
	gint line;
	gchar* doc_comment;
	gchar* extends_name;
	GeeArrayList* methods;
};

struct _PhpClassClass {
	GObjectClass parent_class;
};

struct _PhpToValaSourceParserSourceSpan {
	GObject parent_instance;
	PhpToValaSourceParserSourceSpanPrivate * priv;
	gint start_line;
	gint end_line;
};

struct _PhpToValaSourceParserSourceSpanClass {
	GObjectClass parent_class;
};

struct _Statements {
	GObject parent_instance;
	StatementsPrivate * priv;
	GeeArrayList* texts;
	GeeArrayList* lines;
	GeeArrayList* columns;
};

struct _StatementsClass {
	GObjectClass parent_class;
};

struct _PhpToValaSourceParserStatementSlice {
	GObject parent_instance;
	PhpToValaSourceParserStatementSlicePrivate * priv;
	gchar* text;
	gint column;
};

struct _PhpToValaSourceParserStatementSliceClass {
	GObjectClass parent_class;
};

struct _LocalParameter {
	GObject parent_instance;
	LocalParameterPrivate * priv;
	gchar* name;
	gchar* type_name;
	gchar* default_value;
};

struct _LocalParameterClass {
	GObjectClass parent_class;
};

static gpointer php_to_vala_source_parser_parent_class = NULL;
static gpointer php_to_vala_source_parser_php_source_token_parent_class = NULL;
static gpointer php_to_vala_source_parser_source_span_parent_class = NULL;
static gpointer php_to_vala_source_parser_statement_slice_parent_class = NULL;

VALA_EXTERN GType php_to_vala_source_parser_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (PhpToValaSourceParser, g_object_unref)
VALA_EXTERN GType resolved_source_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ResolvedSource, g_object_unref)
VALA_EXTERN ResolvedSource* php_to_vala_source_parser_resolve_compile_time_includes (const gchar* source_path,
                                                                         const gchar* source,
                                                                         GError** error);
static ResolvedSource* php_to_vala_source_parser_resolve_compile_time_includes_inner (const gchar* source_path,
                                                                               const gchar* source,
                                                                               GeeHashMap* include_stack,
                                                                               GError** error);
static gchar* php_to_vala_source_parser_normalize_source_path (const gchar* source_path);
VALA_EXTERN GQuark php_to_vala_error_quark (void);
VALA_EXTERN GType php_to_vala_error_get_type (void) G_GNUC_CONST ;
VALA_EXTERN ResolvedSource* resolved_source_new (void);
VALA_EXTERN ResolvedSource* resolved_source_construct (GType object_type);
static gchar* php_to_vala_source_parser_parse_compile_time_include_path (const gchar* line,
                                                                  GError** error);
static void php_to_vala_source_parser_append_resolved_line (ResolvedSource* resolved,
                                                     GString* output,
                                                     const gchar* line,
                                                     const gchar* source_path,
                                                     gint source_line);
static void php_to_vala_source_parser_append_resolved_source (ResolvedSource* resolved,
                                                       GString* output,
                                                       ResolvedSource* included);
VALA_EXTERN gchar* php_to_vala_source_parser_strip_php_tags (const gchar* source);
VALA_EXTERN GType source_parts_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (SourceParts, g_object_unref)
VALA_EXTERN SourceParts* php_to_vala_source_parser_extract_local_functions (const gchar* source_path,
                                                                const gchar* source,
                                                                GError** error);
static SourceParts* php_to_vala_source_parser_extract_local_functions_with_php_tokens (const gchar* source_path,
                                                                                const gchar* source,
                                                                                GError** error);
VALA_EXTERN gchar* php_to_vala_source_parser_debug_tokens_for_source_line (const gchar* source_path,
                                                               const gchar* source,
                                                               gint php_line_number,
                                                               gint context_lines);
static GType php_to_vala_source_parser_php_source_token_get_type (void) G_GNUC_CONST  G_GNUC_UNUSED ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (PhpToValaSourceParserPhpSourceToken, g_object_unref)
static GeeArrayList* php_to_vala_source_parser_tokenize_php_source (const gchar* source_path,
                                                             const gchar* source,
                                                             GError** error);
static gchar* php_to_vala_source_parser_format_token_debug_context (GeeArrayList* tokens,
                                                             gint php_line_number,
                                                             gint context_lines);
VALA_EXTERN gchar* php_to_vala_source_parser_debug_tokens_for_snippet (const gchar* source_path,
                                                           const gchar* line,
                                                           gint php_line_number);
VALA_EXTERN SourceParts* source_parts_new (void);
VALA_EXTERN SourceParts* source_parts_construct (GType object_type);
static GType php_to_vala_source_parser_source_span_get_type (void) G_GNUC_CONST  G_GNUC_UNUSED ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (PhpToValaSourceParserSourceSpan, g_object_unref)
static gboolean php_to_vala_source_parser_php_source_token_is_token (PhpToValaSourceParserPhpSourceToken* self,
                                                              const gchar* value);
static gboolean php_to_vala_source_parser_is_class_token (GeeArrayList* tokens,
                                                   gint index);
VALA_EXTERN GType phpclass_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (PhpClass, g_object_unref)
static PhpClass* php_to_vala_source_parser_parse_php_class_from_tokens (const gchar* source_path,
                                                                 GeeArrayList* tokens,
                                                                 gint class_token_index,
                                                                 const gchar* doc_comment,
                                                                 gint* class_end_index,
                                                                 gint* class_start_line,
                                                                 gint* class_end_line,
                                                                 GError** error);
VALA_EXTERN GType local_function_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (LocalFunction, g_object_unref)
static PhpToValaSourceParserSourceSpan* php_to_vala_source_parser_source_span_new (gint start_line,
                                                                            gint end_line);
static PhpToValaSourceParserSourceSpan* php_to_vala_source_parser_source_span_construct (GType object_type,
                                                                                  gint start_line,
                                                                                  gint end_line);
static LocalFunction* php_to_vala_source_parser_parse_local_function_from_tokens (const gchar* source_path,
                                                                           GeeArrayList* tokens,
                                                                           gint function_index,
                                                                           gint end_limit,
                                                                           gboolean is_static,
                                                                           const gchar* doc_comment,
                                                                           gint* function_end_index,
                                                                           gint* function_start_line,
                                                                           gint* function_end_line,
                                                                           GError** error);
static gboolean php_to_vala_source_parser_php_source_token_is_symbol (PhpToValaSourceParserPhpSourceToken* self,
                                                               const gchar* value);
static gboolean php_to_vala_source_parser_is_ignorable_token (PhpToValaSourceParserPhpSourceToken* token);
static gchar* php_to_vala_source_parser_build_main_source_without_spans (const gchar* source,
                                                                  GeeArrayList* spans);
static PhpToValaSourceParserPhpSourceToken* php_to_vala_source_parser_php_source_token_new (const gchar* name,
                                                                                     const gchar* text,
                                                                                     gint line);
static PhpToValaSourceParserPhpSourceToken* php_to_vala_source_parser_php_source_token_construct (GType object_type,
                                                                                           const gchar* name,
                                                                                           const gchar* text,
                                                                                           gint line);
static gint php_to_vala_source_parser_count_newlines (const gchar* text);
static gchar* php_to_vala_source_parser_quote_debug_token_text (const gchar* text);
static gint php_to_vala_source_parser_next_significant_token_index (GeeArrayList* tokens,
                                                             gint start_index,
                                                             gint end_limit);
static gchar* php_to_vala_source_parser_collect_name_tokens (GeeArrayList* tokens,
                                                      gint start_index);
static gint php_to_vala_source_parser_find_matching_brace_token (GeeArrayList* tokens,
                                                          gint open_index,
                                                          gint end_limit);
VALA_EXTERN PhpClass* phpclass_new (const gchar* name,
                        gint line,
                        const gchar* doc_comment,
                        const gchar* extends_name);
VALA_EXTERN PhpClass* phpclass_construct (GType object_type,
                              const gchar* name,
                              gint line,
                              const gchar* doc_comment,
                              const gchar* extends_name);
static void php_to_vala_source_parser_parse_class_methods_from_tokens (const gchar* source_path,
                                                                GeeArrayList* tokens,
                                                                gint start_index,
                                                                gint end_index,
                                                                PhpClass* php_class,
                                                                GError** error);
static gboolean php_to_vala_source_parser_previous_method_modifiers_contain_static (GeeArrayList* tokens,
                                                                             gint class_start_index,
                                                                             gint function_index);
static gint php_to_vala_source_parser_next_symbol_token_index (GeeArrayList* tokens,
                                                        gint start_index,
                                                        gint end_limit,
                                                        const gchar* symbol);
static gint php_to_vala_source_parser_find_matching_symbol_token (GeeArrayList* tokens,
                                                           gint open_index,
                                                           gint end_limit,
                                                           const gchar* open_symbol,
                                                           const gchar* close_symbol);
static gchar* php_to_vala_source_parser_tokens_to_compact_source (GeeArrayList* tokens,
                                                           gint start_index,
                                                           gint end_index);
VALA_EXTERN GType local_parameter_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (LocalParameter, g_object_unref)
static void php_to_vala_source_parser_parse_local_function_header (const gchar* source_path,
                                                            const gchar* line,
                                                            gint php_line_number,
                                                            gchar** function_name,
                                                            GeeArrayList* parameters,
                                                            gchar** return_type,
                                                            GError** error);
static gchar* php_to_vala_source_parser_tokens_to_source (GeeArrayList* tokens,
                                                   gint start_index,
                                                   gint end_index,
                                                   gint first_line);
static GeeArrayList* php_to_vala_source_parser_copy_parameter_list (GeeArrayList* input);
VALA_EXTERN LocalFunction* local_function_new (const gchar* name,
                                   GeeArrayList* parameters,
                                   const gchar* return_type,
                                   const gchar* body,
                                   gint line,
                                   gboolean is_static,
                                   const gchar* doc_comment);
VALA_EXTERN LocalFunction* local_function_construct (GType object_type,
                                         const gchar* name,
                                         GeeArrayList* parameters,
                                         const gchar* return_type,
                                         const gchar* body,
                                         gint line,
                                         gboolean is_static,
                                         const gchar* doc_comment);
static gboolean php_to_vala_source_parser_line_is_inside_span (gint line_number,
                                                        GeeArrayList* spans);
VALA_EXTERN GType statements_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (Statements, g_object_unref)
VALA_EXTERN Statements* php_to_vala_source_parser_collect_statements (const gchar* body,
                                                          gint first_line_number);
VALA_EXTERN Statements* statements_new (void);
VALA_EXTERN Statements* statements_construct (GType object_type);
static gint php_to_vala_source_parser_first_non_whitespace_column (const gchar* line);
static gchar* php_to_vala_source_parser_strip_line_comment (const gchar* line);
static gint php_to_vala_source_parser_nesting_depth (const gchar* line);
static gboolean php_to_vala_source_parser_starts_multiline_assignment (const gchar* line);
static gboolean php_to_vala_source_parser_starts_multiline_parenthesized_statement (const gchar* line);
static void php_to_vala_source_parser_add_line_statements (Statements* statements,
                                                    const gchar* line,
                                                    gint php_line_number);
static GType php_to_vala_source_parser_statement_slice_get_type (void) G_GNUC_CONST  G_GNUC_UNUSED ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (PhpToValaSourceParserStatementSlice, g_object_unref)
static GeeArrayList* php_to_vala_source_parser_split_statement_line (const gchar* line);
static PhpToValaSourceParserStatementSlice* php_to_vala_source_parser_statement_slice_new (const gchar* text,
                                                                                    gint column);
static PhpToValaSourceParserStatementSlice* php_to_vala_source_parser_statement_slice_construct (GType object_type,
                                                                                          const gchar* text,
                                                                                          gint column);
static GError* php_to_vala_source_parser_unsupported_syntax (const gchar* source_path,
                                                      gint php_line_number,
                                                      const gchar* line);
static gboolean php_to_vala_source_parser_is_identifier (const gchar* name);
static GeeArrayList* php_to_vala_source_parser_split_top_level (const gchar* expression,
                                                         gchar separator);
static gchar* php_to_vala_source_parser_extract_parameter_name (const gchar* parameter);
static gchar* php_to_vala_source_parser_extract_parameter_type (const gchar* parameter);
VALA_EXTERN LocalParameter* local_parameter_new (const gchar* name,
                                     const gchar* type_name,
                                     const gchar* default_value);
VALA_EXTERN LocalParameter* local_parameter_construct (GType object_type,
                                           const gchar* name,
                                           const gchar* type_name,
                                           const gchar* default_value);
VALA_EXTERN PhpToValaSourceParser* php_to_vala_source_parser_new (void);
VALA_EXTERN PhpToValaSourceParser* php_to_vala_source_parser_construct (GType object_type);
static void php_to_vala_source_parser_php_source_token_finalize (GObject * obj);
static GType php_to_vala_source_parser_php_source_token_get_type_once (void);
static void php_to_vala_source_parser_source_span_finalize (GObject * obj);
static GType php_to_vala_source_parser_source_span_get_type_once (void);
static void php_to_vala_source_parser_statement_slice_finalize (GObject * obj);
static GType php_to_vala_source_parser_statement_slice_get_type_once (void);
static GType php_to_vala_source_parser_get_type_once (void);
static void _vala_array_destroy (gpointer array,
                          gssize array_length,
                          GDestroyNotify destroy_func);
static void _vala_array_free (gpointer array,
                       gssize array_length,
                       GDestroyNotify destroy_func);
static gssize _vala_array_length (gpointer array);

ResolvedSource*
php_to_vala_source_parser_resolve_compile_time_includes (const gchar* source_path,
                                                         const gchar* source,
                                                         GError** error)
{
	GeeHashMap* include_stack = NULL;
	GeeHashMap* _tmp0_;
	ResolvedSource* _tmp1_ = NULL;
	ResolvedSource* _tmp2_;
	ResolvedSource* _tmp3_;
	GError* _inner_error0_ = NULL;
	ResolvedSource* result;
#line 4 "../src/source_parser.vala"
	g_return_val_if_fail (source_path != NULL, NULL);
#line 4 "../src/source_parser.vala"
	g_return_val_if_fail (source != NULL, NULL);
#line 5 "../src/source_parser.vala"
	_tmp0_ = gee_hash_map_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, (GDestroyNotify) g_free, G_TYPE_BOOLEAN, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
#line 5 "../src/source_parser.vala"
	include_stack = _tmp0_;
#line 6 "../src/source_parser.vala"
	_tmp2_ = php_to_vala_source_parser_resolve_compile_time_includes_inner (source_path, source, include_stack, &_inner_error0_);
#line 6 "../src/source_parser.vala"
	_tmp1_ = _tmp2_;
#line 6 "../src/source_parser.vala"
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
#line 6 "../src/source_parser.vala"
		g_propagate_error (error, _inner_error0_);
#line 6 "../src/source_parser.vala"
		_g_object_unref0 (include_stack);
#line 6 "../src/source_parser.vala"
		return NULL;
#line 538 "source_parser.c"
	}
#line 6 "../src/source_parser.vala"
	_tmp3_ = _tmp1_;
#line 6 "../src/source_parser.vala"
	_tmp1_ = NULL;
#line 6 "../src/source_parser.vala"
	result = _tmp3_;
#line 6 "../src/source_parser.vala"
	_g_object_unref0 (_tmp1_);
#line 6 "../src/source_parser.vala"
	_g_object_unref0 (include_stack);
#line 6 "../src/source_parser.vala"
	return result;
#line 552 "source_parser.c"
}

static gchar*
string_strip (const gchar* self)
{
	gchar* _result_ = NULL;
	gchar* _tmp0_;
	gchar* result;
#line 1413 "glib-2.0.vapi"
	g_return_val_if_fail (self != NULL, NULL);
#line 1414 "glib-2.0.vapi"
	_tmp0_ = g_strdup (self);
#line 1414 "glib-2.0.vapi"
	_result_ = _tmp0_;
#line 1415 "glib-2.0.vapi"
	g_strstrip (_result_);
#line 1416 "glib-2.0.vapi"
	result = _result_;
#line 1416 "glib-2.0.vapi"
	return result;
#line 573 "source_parser.c"
}

static ResolvedSource*
php_to_vala_source_parser_resolve_compile_time_includes_inner (const gchar* source_path,
                                                               const gchar* source,
                                                               GeeHashMap* include_stack,
                                                               GError** error)
{
	gchar* normalized_source_path = NULL;
	gchar* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp3_;
	ResolvedSource* resolved = NULL;
	ResolvedSource* _tmp4_;
	GString* output = NULL;
	GString* _tmp5_;
	gchar** lines = NULL;
	gchar** _tmp6_;
	gchar** _tmp7_;
	gint lines_length1;
	gint _lines_size_;
	gchar* source_dir = NULL;
	gchar* _tmp8_;
	const gchar* _tmp53_;
	ResolvedSource* _tmp54_;
	GString* _tmp55_;
	const gchar* _tmp56_;
	gchar* _tmp57_;
	GError* _inner_error0_ = NULL;
	ResolvedSource* result;
#line 9 "../src/source_parser.vala"
	g_return_val_if_fail (source_path != NULL, NULL);
#line 9 "../src/source_parser.vala"
	g_return_val_if_fail (source != NULL, NULL);
#line 9 "../src/source_parser.vala"
	g_return_val_if_fail (include_stack != NULL, NULL);
#line 10 "../src/source_parser.vala"
	_tmp0_ = php_to_vala_source_parser_normalize_source_path (source_path);
#line 10 "../src/source_parser.vala"
	normalized_source_path = _tmp0_;
#line 11 "../src/source_parser.vala"
	_tmp1_ = normalized_source_path;
#line 11 "../src/source_parser.vala"
	if (gee_abstract_map_has_key ((GeeAbstractMap*) include_stack, _tmp1_)) {
#line 618 "source_parser.c"
		GError* _tmp2_;
#line 12 "../src/source_parser.vala"
		_tmp2_ = g_error_new (PHP_TO_VALA_ERROR, PHP_TO_VALA_ERROR_UNSUPPORTED, "Recursive compile-time include detected for %s", source_path);
#line 12 "../src/source_parser.vala"
		_inner_error0_ = _tmp2_;
#line 12 "../src/source_parser.vala"
		g_propagate_error (error, _inner_error0_);
#line 12 "../src/source_parser.vala"
		_g_free0 (normalized_source_path);
#line 12 "../src/source_parser.vala"
		return NULL;
#line 630 "source_parser.c"
	}
#line 18 "../src/source_parser.vala"
	_tmp3_ = normalized_source_path;
#line 18 "../src/source_parser.vala"
	gee_abstract_map_set ((GeeAbstractMap*) include_stack, _tmp3_, (gpointer) ((gintptr) TRUE));
#line 19 "../src/source_parser.vala"
	_tmp4_ = resolved_source_new ();
#line 19 "../src/source_parser.vala"
	resolved = _tmp4_;
#line 20 "../src/source_parser.vala"
	_tmp5_ = g_string_new ("");
#line 20 "../src/source_parser.vala"
	output = _tmp5_;
#line 21 "../src/source_parser.vala"
	_tmp7_ = _tmp6_ = g_strsplit (source, "\n", 0);
#line 21 "../src/source_parser.vala"
	lines = _tmp7_;
#line 21 "../src/source_parser.vala"
	lines_length1 = _vala_array_length (_tmp6_);
#line 21 "../src/source_parser.vala"
	_lines_size_ = lines_length1;
#line 22 "../src/source_parser.vala"
	_tmp8_ = g_path_get_dirname (source_path);
#line 22 "../src/source_parser.vala"
	source_dir = _tmp8_;
#line 656 "source_parser.c"
	{
		gint i = 0;
#line 24 "../src/source_parser.vala"
		i = 0;
#line 661 "source_parser.c"
		{
			gboolean _tmp9_ = FALSE;
#line 24 "../src/source_parser.vala"
			_tmp9_ = TRUE;
#line 24 "../src/source_parser.vala"
			while (TRUE) {
#line 668 "source_parser.c"
				gchar** _tmp11_;
				gint _tmp11__length1;
				gchar* raw_line = NULL;
				gchar** _tmp12_;
				gint _tmp12__length1;
				const gchar* _tmp13_;
				gchar* _tmp14_;
				gchar* line = NULL;
				const gchar* _tmp15_;
				gchar* _tmp16_;
				gchar* include_path = NULL;
				const gchar* _tmp17_;
				gchar* _tmp18_;
				const gchar* _tmp19_;
				gchar* _tmp23_ = NULL;
				const gchar* _tmp24_;
				gchar* resolved_path = NULL;
				gchar* _tmp30_;
				gchar* included_source = NULL;
				ResolvedSource* _tmp37_;
				GString* _tmp38_;
				const gchar* _tmp39_;
				gchar* _tmp40_;
				gchar* _tmp41_;
				ResolvedSource* included = NULL;
				const gchar* _tmp42_;
				const gchar* _tmp43_;
				ResolvedSource* _tmp44_;
				ResolvedSource* _tmp45_;
				GString* _tmp46_;
				ResolvedSource* _tmp47_;
				ResolvedSource* _tmp48_;
				GString* _tmp49_;
				const gchar* _tmp50_;
				gchar* _tmp51_;
				gchar* _tmp52_;
#line 24 "../src/source_parser.vala"
				if (!_tmp9_) {
#line 707 "source_parser.c"
					gint _tmp10_;
#line 24 "../src/source_parser.vala"
					_tmp10_ = i;
#line 24 "../src/source_parser.vala"
					i = _tmp10_ + 1;
#line 713 "source_parser.c"
				}
#line 24 "../src/source_parser.vala"
				_tmp9_ = FALSE;
#line 24 "../src/source_parser.vala"
				_tmp11_ = lines;
#line 24 "../src/source_parser.vala"
				_tmp11__length1 = lines_length1;
#line 24 "../src/source_parser.vala"
				if (!(i < _tmp11__length1)) {
#line 24 "../src/source_parser.vala"
					break;
#line 725 "source_parser.c"
				}
#line 25 "../src/source_parser.vala"
				_tmp12_ = lines;
#line 25 "../src/source_parser.vala"
				_tmp12__length1 = lines_length1;
#line 25 "../src/source_parser.vala"
				_tmp13_ = _tmp12_[i];
#line 25 "../src/source_parser.vala"
				_tmp14_ = g_strdup (_tmp13_);
#line 25 "../src/source_parser.vala"
				raw_line = _tmp14_;
#line 26 "../src/source_parser.vala"
				_tmp15_ = raw_line;
#line 26 "../src/source_parser.vala"
				_tmp16_ = string_strip (_tmp15_);
#line 26 "../src/source_parser.vala"
				line = _tmp16_;
#line 27 "../src/source_parser.vala"
				_tmp17_ = line;
#line 27 "../src/source_parser.vala"
				_tmp18_ = php_to_vala_source_parser_parse_compile_time_include_path (_tmp17_, &_inner_error0_);
#line 27 "../src/source_parser.vala"
				include_path = _tmp18_;
#line 27 "../src/source_parser.vala"
				if (G_UNLIKELY (_inner_error0_ != NULL)) {
#line 27 "../src/source_parser.vala"
					g_propagate_error (error, _inner_error0_);
#line 27 "../src/source_parser.vala"
					_g_free0 (line);
#line 27 "../src/source_parser.vala"
					_g_free0 (raw_line);
#line 27 "../src/source_parser.vala"
					_g_free0 (source_dir);
#line 27 "../src/source_parser.vala"
					lines = (_vala_array_free (lines, lines_length1, (GDestroyNotify) g_free), NULL);
#line 27 "../src/source_parser.vala"
					_g_string_free0 (output);
#line 27 "../src/source_parser.vala"
					_g_object_unref0 (resolved);
#line 27 "../src/source_parser.vala"
					_g_free0 (normalized_source_path);
#line 27 "../src/source_parser.vala"
					return NULL;
#line 769 "source_parser.c"
				}
#line 29 "../src/source_parser.vala"
				_tmp19_ = include_path;
#line 29 "../src/source_parser.vala"
				if (_tmp19_ == NULL) {
#line 775 "source_parser.c"
					ResolvedSource* _tmp20_;
					GString* _tmp21_;
					const gchar* _tmp22_;
#line 30 "../src/source_parser.vala"
					_tmp20_ = resolved;
#line 30 "../src/source_parser.vala"
					_tmp21_ = output;
#line 30 "../src/source_parser.vala"
					_tmp22_ = raw_line;
#line 30 "../src/source_parser.vala"
					php_to_vala_source_parser_append_resolved_line (_tmp20_, _tmp21_, _tmp22_, source_path, i + 1);
#line 31 "../src/source_parser.vala"
					_g_free0 (include_path);
#line 31 "../src/source_parser.vala"
					_g_free0 (line);
#line 31 "../src/source_parser.vala"
					_g_free0 (raw_line);
#line 31 "../src/source_parser.vala"
					continue;
#line 795 "source_parser.c"
				}
#line 34 "../src/source_parser.vala"
				_tmp24_ = include_path;
#line 34 "../src/source_parser.vala"
				if (g_path_is_absolute (_tmp24_)) {
#line 801 "source_parser.c"
					const gchar* _tmp25_;
					gchar* _tmp26_;
#line 35 "../src/source_parser.vala"
					_tmp25_ = include_path;
#line 35 "../src/source_parser.vala"
					_tmp26_ = g_strdup (_tmp25_);
#line 35 "../src/source_parser.vala"
					_g_free0 (_tmp23_);
#line 35 "../src/source_parser.vala"
					_tmp23_ = _tmp26_;
#line 812 "source_parser.c"
				} else {
					const gchar* _tmp27_;
					const gchar* _tmp28_;
					gchar* _tmp29_;
#line 36 "../src/source_parser.vala"
					_tmp27_ = source_dir;
#line 36 "../src/source_parser.vala"
					_tmp28_ = include_path;
#line 36 "../src/source_parser.vala"
					_tmp29_ = g_build_filename (_tmp27_, _tmp28_, NULL);
#line 36 "../src/source_parser.vala"
					_g_free0 (_tmp23_);
#line 36 "../src/source_parser.vala"
					_tmp23_ = _tmp29_;
#line 827 "source_parser.c"
				}
#line 34 "../src/source_parser.vala"
				_tmp30_ = _tmp23_;
#line 34 "../src/source_parser.vala"
				_tmp23_ = NULL;
#line 34 "../src/source_parser.vala"
				resolved_path = _tmp30_;
#line 835 "source_parser.c"
				{
					const gchar* _tmp31_;
					gchar* _tmp32_ = NULL;
#line 40 "../src/source_parser.vala"
					_tmp31_ = resolved_path;
#line 40 "../src/source_parser.vala"
					g_file_get_contents (_tmp31_, &_tmp32_, NULL, &_inner_error0_);
#line 40 "../src/source_parser.vala"
					_g_free0 (included_source);
#line 40 "../src/source_parser.vala"
					included_source = _tmp32_;
#line 40 "../src/source_parser.vala"
					if (G_UNLIKELY (_inner_error0_ != NULL)) {
#line 849 "source_parser.c"
						goto __catch0_g_error;
					}
				}
				goto __finally0;
				__catch0_g_error:
				{
					GError* e = NULL;
					const gchar* _tmp33_;
					GError* _tmp34_;
					const gchar* _tmp35_;
					GError* _tmp36_;
#line 39 "../src/source_parser.vala"
					e = _inner_error0_;
#line 39 "../src/source_parser.vala"
					_inner_error0_ = NULL;
#line 42 "../src/source_parser.vala"
					_tmp33_ = resolved_path;
#line 42 "../src/source_parser.vala"
					_tmp34_ = e;
#line 42 "../src/source_parser.vala"
					_tmp35_ = _tmp34_->message;
#line 42 "../src/source_parser.vala"
					_tmp36_ = g_error_new (PHP_TO_VALA_ERROR, PHP_TO_VALA_ERROR_UNSUPPORTED, "Compile-time include failed at %s:%d: cannot read %s: %s", source_path, i + 1, _tmp33_, _tmp35_);
#line 42 "../src/source_parser.vala"
					_inner_error0_ = _tmp36_;
#line 42 "../src/source_parser.vala"
					_g_error_free0 (e);
#line 877 "source_parser.c"
					goto __finally0;
				}
				__finally0:
#line 39 "../src/source_parser.vala"
				if (G_UNLIKELY (_inner_error0_ != NULL)) {
#line 39 "../src/source_parser.vala"
					g_propagate_error (error, _inner_error0_);
#line 39 "../src/source_parser.vala"
					_g_free0 (included_source);
#line 39 "../src/source_parser.vala"
					_g_free0 (resolved_path);
#line 39 "../src/source_parser.vala"
					_g_free0 (_tmp23_);
#line 39 "../src/source_parser.vala"
					_g_free0 (include_path);
#line 39 "../src/source_parser.vala"
					_g_free0 (line);
#line 39 "../src/source_parser.vala"
					_g_free0 (raw_line);
#line 39 "../src/source_parser.vala"
					_g_free0 (source_dir);
#line 39 "../src/source_parser.vala"
					lines = (_vala_array_free (lines, lines_length1, (GDestroyNotify) g_free), NULL);
#line 39 "../src/source_parser.vala"
					_g_string_free0 (output);
#line 39 "../src/source_parser.vala"
					_g_object_unref0 (resolved);
#line 39 "../src/source_parser.vala"
					_g_free0 (normalized_source_path);
#line 39 "../src/source_parser.vala"
					return NULL;
#line 909 "source_parser.c"
				}
#line 51 "../src/source_parser.vala"
				_tmp37_ = resolved;
#line 51 "../src/source_parser.vala"
				_tmp38_ = output;
#line 51 "../src/source_parser.vala"
				_tmp39_ = resolved_path;
#line 51 "../src/source_parser.vala"
				_tmp40_ = g_strdup_printf ("/* php2vala compile-time include: %s */", _tmp39_);
#line 51 "../src/source_parser.vala"
				_tmp41_ = _tmp40_;
#line 51 "../src/source_parser.vala"
				php_to_vala_source_parser_append_resolved_line (_tmp37_, _tmp38_, _tmp41_, source_path, i + 1);
#line 51 "../src/source_parser.vala"
				_g_free0 (_tmp41_);
#line 52 "../src/source_parser.vala"
				_tmp42_ = resolved_path;
#line 52 "../src/source_parser.vala"
				_tmp43_ = included_source;
#line 52 "../src/source_parser.vala"
				_tmp44_ = php_to_vala_source_parser_resolve_compile_time_includes_inner (_tmp42_, _tmp43_, include_stack, &_inner_error0_);
#line 52 "../src/source_parser.vala"
				included = _tmp44_;
#line 52 "../src/source_parser.vala"
				if (G_UNLIKELY (_inner_error0_ != NULL)) {
#line 52 "../src/source_parser.vala"
					g_propagate_error (error, _inner_error0_);
#line 52 "../src/source_parser.vala"
					_g_free0 (included_source);
#line 52 "../src/source_parser.vala"
					_g_free0 (resolved_path);
#line 52 "../src/source_parser.vala"
					_g_free0 (_tmp23_);
#line 52 "../src/source_parser.vala"
					_g_free0 (include_path);
#line 52 "../src/source_parser.vala"
					_g_free0 (line);
#line 52 "../src/source_parser.vala"
					_g_free0 (raw_line);
#line 52 "../src/source_parser.vala"
					_g_free0 (source_dir);
#line 52 "../src/source_parser.vala"
					lines = (_vala_array_free (lines, lines_length1, (GDestroyNotify) g_free), NULL);
#line 52 "../src/source_parser.vala"
					_g_string_free0 (output);
#line 52 "../src/source_parser.vala"
					_g_object_unref0 (resolved);
#line 52 "../src/source_parser.vala"
					_g_free0 (normalized_source_path);
#line 52 "../src/source_parser.vala"
					return NULL;
#line 961 "source_parser.c"
				}
#line 53 "../src/source_parser.vala"
				_tmp45_ = resolved;
#line 53 "../src/source_parser.vala"
				_tmp46_ = output;
#line 53 "../src/source_parser.vala"
				_tmp47_ = included;
#line 53 "../src/source_parser.vala"
				php_to_vala_source_parser_append_resolved_source (_tmp45_, _tmp46_, _tmp47_);
#line 54 "../src/source_parser.vala"
				_tmp48_ = resolved;
#line 54 "../src/source_parser.vala"
				_tmp49_ = output;
#line 54 "../src/source_parser.vala"
				_tmp50_ = resolved_path;
#line 54 "../src/source_parser.vala"
				_tmp51_ = g_strdup_printf ("/* php2vala end compile-time include: %s */", _tmp50_);
#line 54 "../src/source_parser.vala"
				_tmp52_ = _tmp51_;
#line 54 "../src/source_parser.vala"
				php_to_vala_source_parser_append_resolved_line (_tmp48_, _tmp49_, _tmp52_, source_path, i + 1);
#line 54 "../src/source_parser.vala"
				_g_free0 (_tmp52_);
#line 24 "../src/source_parser.vala"
				_g_object_unref0 (included);
#line 24 "../src/source_parser.vala"
				_g_free0 (included_source);
#line 24 "../src/source_parser.vala"
				_g_free0 (resolved_path);
#line 24 "../src/source_parser.vala"
				_g_free0 (_tmp23_);
#line 24 "../src/source_parser.vala"
				_g_free0 (include_path);
#line 24 "../src/source_parser.vala"
				_g_free0 (line);
#line 24 "../src/source_parser.vala"
				_g_free0 (raw_line);
#line 999 "source_parser.c"
			}
		}
	}
#line 57 "../src/source_parser.vala"
	_tmp53_ = normalized_source_path;
#line 57 "../src/source_parser.vala"
	gee_abstract_map_unset ((GeeAbstractMap*) include_stack, _tmp53_, NULL);
#line 58 "../src/source_parser.vala"
	_tmp54_ = resolved;
#line 58 "../src/source_parser.vala"
	_tmp55_ = output;
#line 58 "../src/source_parser.vala"
	_tmp56_ = _tmp55_->str;
#line 58 "../src/source_parser.vala"
	_tmp57_ = g_strdup (_tmp56_);
#line 58 "../src/source_parser.vala"
	_g_free0 (_tmp54_->source);
#line 58 "../src/source_parser.vala"
	_tmp54_->source = _tmp57_;
#line 59 "../src/source_parser.vala"
	result = resolved;
#line 59 "../src/source_parser.vala"
	_g_free0 (source_dir);
#line 59 "../src/source_parser.vala"
	lines = (_vala_array_free (lines, lines_length1, (GDestroyNotify) g_free), NULL);
#line 59 "../src/source_parser.vala"
	_g_string_free0 (output);
#line 59 "../src/source_parser.vala"
	_g_free0 (normalized_source_path);
#line 59 "../src/source_parser.vala"
	return result;
#line 1031 "source_parser.c"
}

static void
php_to_vala_source_parser_append_resolved_line (ResolvedSource* resolved,
                                                GString* output,
                                                const gchar* line,
                                                const gchar* source_path,
                                                gint source_line)
{
	GeeArrayList* _tmp0_;
	GeeArrayList* _tmp1_;
#line 62 "../src/source_parser.vala"
	g_return_if_fail (resolved != NULL);
#line 62 "../src/source_parser.vala"
	g_return_if_fail (output != NULL);
#line 62 "../src/source_parser.vala"
	g_return_if_fail (line != NULL);
#line 62 "../src/source_parser.vala"
	g_return_if_fail (source_path != NULL);
#line 63 "../src/source_parser.vala"
	g_string_append (output, line);
#line 64 "../src/source_parser.vala"
	g_string_append (output, "\n");
#line 65 "../src/source_parser.vala"
	_tmp0_ = resolved->files;
#line 65 "../src/source_parser.vala"
	gee_abstract_collection_add ((GeeAbstractCollection*) _tmp0_, source_path);
#line 66 "../src/source_parser.vala"
	_tmp1_ = resolved->lines;
#line 66 "../src/source_parser.vala"
	gee_abstract_collection_add ((GeeAbstractCollection*) _tmp1_, (gpointer) ((gintptr) source_line));
#line 1063 "source_parser.c"
}

static void
php_to_vala_source_parser_append_resolved_source (ResolvedSource* resolved,
                                                  GString* output,
                                                  ResolvedSource* included)
{
	const gchar* _tmp0_;
#line 69 "../src/source_parser.vala"
	g_return_if_fail (resolved != NULL);
#line 69 "../src/source_parser.vala"
	g_return_if_fail (output != NULL);
#line 69 "../src/source_parser.vala"
	g_return_if_fail (included != NULL);
#line 70 "../src/source_parser.vala"
	_tmp0_ = included->source;
#line 70 "../src/source_parser.vala"
	g_string_append (output, _tmp0_);
#line 1082 "source_parser.c"
	{
		GeeArrayList* _file_list = NULL;
		GeeArrayList* _tmp1_;
		gint _file_size = 0;
		GeeArrayList* _tmp2_;
		gint _tmp3_;
		gint _tmp4_;
		gint _file_index = 0;
#line 71 "../src/source_parser.vala"
		_tmp1_ = included->files;
#line 71 "../src/source_parser.vala"
		_file_list = _tmp1_;
#line 71 "../src/source_parser.vala"
		_tmp2_ = _file_list;
#line 71 "../src/source_parser.vala"
		_tmp3_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp2_);
#line 71 "../src/source_parser.vala"
		_tmp4_ = _tmp3_;
#line 71 "../src/source_parser.vala"
		_file_size = _tmp4_;
#line 71 "../src/source_parser.vala"
		_file_index = -1;
#line 71 "../src/source_parser.vala"
		while (TRUE) {
#line 1107 "source_parser.c"
			gint _tmp5_;
			gint _tmp6_;
			gchar* file = NULL;
			GeeArrayList* _tmp7_;
			gpointer _tmp8_;
			GeeArrayList* _tmp9_;
			const gchar* _tmp10_;
#line 71 "../src/source_parser.vala"
			_file_index = _file_index + 1;
#line 71 "../src/source_parser.vala"
			_tmp5_ = _file_index;
#line 71 "../src/source_parser.vala"
			_tmp6_ = _file_size;
#line 71 "../src/source_parser.vala"
			if (!(_tmp5_ < _tmp6_)) {
#line 71 "../src/source_parser.vala"
				break;
#line 1125 "source_parser.c"
			}
#line 71 "../src/source_parser.vala"
			_tmp7_ = _file_list;
#line 71 "../src/source_parser.vala"
			_tmp8_ = gee_abstract_list_get ((GeeAbstractList*) _tmp7_, _file_index);
#line 71 "../src/source_parser.vala"
			file = (gchar*) _tmp8_;
#line 72 "../src/source_parser.vala"
			_tmp9_ = resolved->files;
#line 72 "../src/source_parser.vala"
			_tmp10_ = file;
#line 72 "../src/source_parser.vala"
			gee_abstract_collection_add ((GeeAbstractCollection*) _tmp9_, _tmp10_);
#line 71 "../src/source_parser.vala"
			_g_free0 (file);
#line 1141 "source_parser.c"
		}
	}
	{
		GeeArrayList* _line_list = NULL;
		GeeArrayList* _tmp11_;
		gint _line_size = 0;
		GeeArrayList* _tmp12_;
		gint _tmp13_;
		gint _tmp14_;
		gint _line_index = 0;
#line 74 "../src/source_parser.vala"
		_tmp11_ = included->lines;
#line 74 "../src/source_parser.vala"
		_line_list = _tmp11_;
#line 74 "../src/source_parser.vala"
		_tmp12_ = _line_list;
#line 74 "../src/source_parser.vala"
		_tmp13_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp12_);
#line 74 "../src/source_parser.vala"
		_tmp14_ = _tmp13_;
#line 74 "../src/source_parser.vala"
		_line_size = _tmp14_;
#line 74 "../src/source_parser.vala"
		_line_index = -1;
#line 74 "../src/source_parser.vala"
		while (TRUE) {
#line 1168 "source_parser.c"
			gint _tmp15_;
			gint _tmp16_;
			gint line = 0;
			GeeArrayList* _tmp17_;
			gpointer _tmp18_;
			GeeArrayList* _tmp19_;
#line 74 "../src/source_parser.vala"
			_line_index = _line_index + 1;
#line 74 "../src/source_parser.vala"
			_tmp15_ = _line_index;
#line 74 "../src/source_parser.vala"
			_tmp16_ = _line_size;
#line 74 "../src/source_parser.vala"
			if (!(_tmp15_ < _tmp16_)) {
#line 74 "../src/source_parser.vala"
				break;
#line 1185 "source_parser.c"
			}
#line 74 "../src/source_parser.vala"
			_tmp17_ = _line_list;
#line 74 "../src/source_parser.vala"
			_tmp18_ = gee_abstract_list_get ((GeeAbstractList*) _tmp17_, _line_index);
#line 74 "../src/source_parser.vala"
			line = (gint) ((gintptr) _tmp18_);
#line 75 "../src/source_parser.vala"
			_tmp19_ = resolved->lines;
#line 75 "../src/source_parser.vala"
			gee_abstract_collection_add ((GeeAbstractCollection*) _tmp19_, (gpointer) ((gintptr) line));
#line 1197 "source_parser.c"
		}
	}
}

static gchar*
php_to_vala_source_parser_normalize_source_path (const gchar* source_path)
{
	gchar* _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
	gchar* _tmp4_;
	gchar* result;
#line 79 "../src/source_parser.vala"
	g_return_val_if_fail (source_path != NULL, NULL);
#line 80 "../src/source_parser.vala"
	if (g_path_is_absolute (source_path)) {
#line 1214 "source_parser.c"
		gchar* _tmp0_;
#line 81 "../src/source_parser.vala"
		_tmp0_ = g_strdup (source_path);
#line 81 "../src/source_parser.vala"
		result = _tmp0_;
#line 81 "../src/source_parser.vala"
		return result;
#line 1222 "source_parser.c"
	}
#line 83 "../src/source_parser.vala"
	_tmp1_ = g_get_current_dir ();
#line 83 "../src/source_parser.vala"
	_tmp2_ = _tmp1_;
#line 83 "../src/source_parser.vala"
	_tmp3_ = g_build_filename (_tmp2_, source_path, NULL);
#line 83 "../src/source_parser.vala"
	_tmp4_ = _tmp3_;
#line 83 "../src/source_parser.vala"
	_g_free0 (_tmp2_);
#line 83 "../src/source_parser.vala"
	result = _tmp4_;
#line 83 "../src/source_parser.vala"
	return result;
#line 1238 "source_parser.c"
}

static glong
string_strnlen (gchar* str,
                glong maxlen)
{
	gchar* end = NULL;
	gchar* _tmp0_;
	gchar* _tmp1_;
	glong result;
#line 1501 "glib-2.0.vapi"
	_tmp0_ = memchr (str, 0, (gsize) maxlen);
#line 1501 "glib-2.0.vapi"
	end = _tmp0_;
#line 1502 "glib-2.0.vapi"
	_tmp1_ = end;
#line 1502 "glib-2.0.vapi"
	if (_tmp1_ == NULL) {
#line 1503 "glib-2.0.vapi"
		result = maxlen;
#line 1503 "glib-2.0.vapi"
		return result;
#line 1261 "source_parser.c"
	} else {
		gchar* _tmp2_;
#line 1505 "glib-2.0.vapi"
		_tmp2_ = end;
#line 1505 "glib-2.0.vapi"
		result = (glong) (_tmp2_ - str);
#line 1505 "glib-2.0.vapi"
		return result;
#line 1270 "source_parser.c"
	}
}

static gchar*
string_substring (const gchar* self,
                  glong offset,
                  glong len)
{
	glong string_length = 0L;
	gboolean _tmp0_ = FALSE;
	gchar* _tmp3_;
	gchar* result;
#line 1512 "glib-2.0.vapi"
	g_return_val_if_fail (self != NULL, NULL);
#line 1514 "glib-2.0.vapi"
	if (offset >= ((glong) 0)) {
#line 1514 "glib-2.0.vapi"
		_tmp0_ = len >= ((glong) 0);
#line 1289 "source_parser.c"
	} else {
#line 1514 "glib-2.0.vapi"
		_tmp0_ = FALSE;
#line 1293 "source_parser.c"
	}
#line 1514 "glib-2.0.vapi"
	if (_tmp0_) {
#line 1516 "glib-2.0.vapi"
		string_length = string_strnlen ((gchar*) self, offset + len);
#line 1299 "source_parser.c"
	} else {
		gint _tmp1_;
		gint _tmp2_;
#line 1518 "glib-2.0.vapi"
		_tmp1_ = strlen (self);
#line 1518 "glib-2.0.vapi"
		_tmp2_ = _tmp1_;
#line 1518 "glib-2.0.vapi"
		string_length = (glong) _tmp2_;
#line 1309 "source_parser.c"
	}
#line 1521 "glib-2.0.vapi"
	if (offset < ((glong) 0)) {
#line 1522 "glib-2.0.vapi"
		offset = string_length + offset;
#line 1523 "glib-2.0.vapi"
		g_return_val_if_fail (offset >= ((glong) 0), NULL);
#line 1317 "source_parser.c"
	} else {
#line 1525 "glib-2.0.vapi"
		g_return_val_if_fail (offset <= string_length, NULL);
#line 1321 "source_parser.c"
	}
#line 1527 "glib-2.0.vapi"
	if (len < ((glong) 0)) {
#line 1528 "glib-2.0.vapi"
		len = string_length - offset;
#line 1327 "source_parser.c"
	}
#line 1530 "glib-2.0.vapi"
	g_return_val_if_fail ((offset + len) <= string_length, NULL);
#line 1531 "glib-2.0.vapi"
	_tmp3_ = g_strndup (((gchar*) self) + offset, (gsize) len);
#line 1531 "glib-2.0.vapi"
	result = _tmp3_;
#line 1531 "glib-2.0.vapi"
	return result;
#line 1337 "source_parser.c"
}

static gchar*
php_to_vala_source_parser_parse_compile_time_include_path (const gchar* line,
                                                           GError** error)
{
	gchar* expression = NULL;
	const gchar* _tmp20_;
	const gchar* _tmp21_;
	const gchar* _tmp23_;
	const gchar* _tmp24_;
	gint _tmp25_;
	gint _tmp26_;
	gchar* _tmp27_;
	gchar* _tmp28_;
	gchar* _tmp29_;
	gboolean _tmp30_ = FALSE;
	const gchar* _tmp31_;
	gboolean _tmp40_ = FALSE;
	gboolean _tmp41_ = FALSE;
	const gchar* _tmp42_;
	GError* _tmp52_;
	GError* _inner_error0_ = NULL;
	gchar* result;
#line 86 "../src/source_parser.vala"
	g_return_val_if_fail (line != NULL, NULL);
#line 87 "../src/source_parser.vala"
	expression = NULL;
#line 88 "../src/source_parser.vala"
	if (g_str_has_prefix (line, "include_once")) {
#line 1368 "source_parser.c"
		gint _tmp0_;
		gint _tmp1_;
		gchar* _tmp2_;
		gchar* _tmp3_;
		gchar* _tmp4_;
#line 89 "../src/source_parser.vala"
		_tmp0_ = strlen ("include_once");
#line 89 "../src/source_parser.vala"
		_tmp1_ = _tmp0_;
#line 89 "../src/source_parser.vala"
		_tmp2_ = string_substring (line, (glong) _tmp1_, (glong) -1);
#line 89 "../src/source_parser.vala"
		_tmp3_ = _tmp2_;
#line 89 "../src/source_parser.vala"
		_tmp4_ = string_strip (_tmp3_);
#line 89 "../src/source_parser.vala"
		_g_free0 (expression);
#line 89 "../src/source_parser.vala"
		expression = _tmp4_;
#line 89 "../src/source_parser.vala"
		_g_free0 (_tmp3_);
#line 1390 "source_parser.c"
	} else {
#line 90 "../src/source_parser.vala"
		if (g_str_has_prefix (line, "require_once")) {
#line 1394 "source_parser.c"
			gint _tmp5_;
			gint _tmp6_;
			gchar* _tmp7_;
			gchar* _tmp8_;
			gchar* _tmp9_;
#line 91 "../src/source_parser.vala"
			_tmp5_ = strlen ("require_once");
#line 91 "../src/source_parser.vala"
			_tmp6_ = _tmp5_;
#line 91 "../src/source_parser.vala"
			_tmp7_ = string_substring (line, (glong) _tmp6_, (glong) -1);
#line 91 "../src/source_parser.vala"
			_tmp8_ = _tmp7_;
#line 91 "../src/source_parser.vala"
			_tmp9_ = string_strip (_tmp8_);
#line 91 "../src/source_parser.vala"
			_g_free0 (expression);
#line 91 "../src/source_parser.vala"
			expression = _tmp9_;
#line 91 "../src/source_parser.vala"
			_g_free0 (_tmp8_);
#line 1416 "source_parser.c"
		} else {
#line 92 "../src/source_parser.vala"
			if (g_str_has_prefix (line, "include")) {
#line 1420 "source_parser.c"
				gint _tmp10_;
				gint _tmp11_;
				gchar* _tmp12_;
				gchar* _tmp13_;
				gchar* _tmp14_;
#line 93 "../src/source_parser.vala"
				_tmp10_ = strlen ("include");
#line 93 "../src/source_parser.vala"
				_tmp11_ = _tmp10_;
#line 93 "../src/source_parser.vala"
				_tmp12_ = string_substring (line, (glong) _tmp11_, (glong) -1);
#line 93 "../src/source_parser.vala"
				_tmp13_ = _tmp12_;
#line 93 "../src/source_parser.vala"
				_tmp14_ = string_strip (_tmp13_);
#line 93 "../src/source_parser.vala"
				_g_free0 (expression);
#line 93 "../src/source_parser.vala"
				expression = _tmp14_;
#line 93 "../src/source_parser.vala"
				_g_free0 (_tmp13_);
#line 1442 "source_parser.c"
			} else {
#line 94 "../src/source_parser.vala"
				if (g_str_has_prefix (line, "require")) {
#line 1446 "source_parser.c"
					gint _tmp15_;
					gint _tmp16_;
					gchar* _tmp17_;
					gchar* _tmp18_;
					gchar* _tmp19_;
#line 95 "../src/source_parser.vala"
					_tmp15_ = strlen ("require");
#line 95 "../src/source_parser.vala"
					_tmp16_ = _tmp15_;
#line 95 "../src/source_parser.vala"
					_tmp17_ = string_substring (line, (glong) _tmp16_, (glong) -1);
#line 95 "../src/source_parser.vala"
					_tmp18_ = _tmp17_;
#line 95 "../src/source_parser.vala"
					_tmp19_ = string_strip (_tmp18_);
#line 95 "../src/source_parser.vala"
					_g_free0 (expression);
#line 95 "../src/source_parser.vala"
					expression = _tmp19_;
#line 95 "../src/source_parser.vala"
					_g_free0 (_tmp18_);
#line 1468 "source_parser.c"
				}
			}
		}
	}
#line 98 "../src/source_parser.vala"
	_tmp20_ = expression;
#line 98 "../src/source_parser.vala"
	if (_tmp20_ == NULL) {
#line 99 "../src/source_parser.vala"
		result = NULL;
#line 99 "../src/source_parser.vala"
		_g_free0 (expression);
#line 99 "../src/source_parser.vala"
		return result;
#line 1483 "source_parser.c"
	}
#line 102 "../src/source_parser.vala"
	_tmp21_ = expression;
#line 102 "../src/source_parser.vala"
	if (!g_str_has_suffix (_tmp21_, ";")) {
#line 1489 "source_parser.c"
		GError* _tmp22_;
#line 103 "../src/source_parser.vala"
		_tmp22_ = g_error_new (PHP_TO_VALA_ERROR, PHP_TO_VALA_ERROR_UNSUPPORTED, "Only statement-style compile-time include/require is supported: %s", line);
#line 103 "../src/source_parser.vala"
		_inner_error0_ = _tmp22_;
#line 103 "../src/source_parser.vala"
		g_propagate_error (error, _inner_error0_);
#line 103 "../src/source_parser.vala"
		_g_free0 (expression);
#line 103 "../src/source_parser.vala"
		return NULL;
#line 1501 "source_parser.c"
	}
#line 109 "../src/source_parser.vala"
	_tmp23_ = expression;
#line 109 "../src/source_parser.vala"
	_tmp24_ = expression;
#line 109 "../src/source_parser.vala"
	_tmp25_ = strlen (_tmp24_);
#line 109 "../src/source_parser.vala"
	_tmp26_ = _tmp25_;
#line 109 "../src/source_parser.vala"
	_tmp27_ = string_substring (_tmp23_, (glong) 0, (glong) (_tmp26_ - 1));
#line 109 "../src/source_parser.vala"
	_tmp28_ = _tmp27_;
#line 109 "../src/source_parser.vala"
	_tmp29_ = string_strip (_tmp28_);
#line 109 "../src/source_parser.vala"
	_g_free0 (expression);
#line 109 "../src/source_parser.vala"
	expression = _tmp29_;
#line 109 "../src/source_parser.vala"
	_g_free0 (_tmp28_);
#line 110 "../src/source_parser.vala"
	_tmp31_ = expression;
#line 110 "../src/source_parser.vala"
	if (g_str_has_prefix (_tmp31_, "(")) {
#line 1527 "source_parser.c"
		const gchar* _tmp32_;
#line 110 "../src/source_parser.vala"
		_tmp32_ = expression;
#line 110 "../src/source_parser.vala"
		_tmp30_ = g_str_has_suffix (_tmp32_, ")");
#line 1533 "source_parser.c"
	} else {
#line 110 "../src/source_parser.vala"
		_tmp30_ = FALSE;
#line 1537 "source_parser.c"
	}
#line 110 "../src/source_parser.vala"
	if (_tmp30_) {
#line 1541 "source_parser.c"
		const gchar* _tmp33_;
		const gchar* _tmp34_;
		gint _tmp35_;
		gint _tmp36_;
		gchar* _tmp37_;
		gchar* _tmp38_;
		gchar* _tmp39_;
#line 111 "../src/source_parser.vala"
		_tmp33_ = expression;
#line 111 "../src/source_parser.vala"
		_tmp34_ = expression;
#line 111 "../src/source_parser.vala"
		_tmp35_ = strlen (_tmp34_);
#line 111 "../src/source_parser.vala"
		_tmp36_ = _tmp35_;
#line 111 "../src/source_parser.vala"
		_tmp37_ = string_substring (_tmp33_, (glong) 1, (glong) (_tmp36_ - 2));
#line 111 "../src/source_parser.vala"
		_tmp38_ = _tmp37_;
#line 111 "../src/source_parser.vala"
		_tmp39_ = string_strip (_tmp38_);
#line 111 "../src/source_parser.vala"
		_g_free0 (expression);
#line 111 "../src/source_parser.vala"
		expression = _tmp39_;
#line 111 "../src/source_parser.vala"
		_g_free0 (_tmp38_);
#line 1569 "source_parser.c"
	}
#line 114 "../src/source_parser.vala"
	_tmp42_ = expression;
#line 114 "../src/source_parser.vala"
	if (g_str_has_prefix (_tmp42_, "\"")) {
#line 1575 "source_parser.c"
		const gchar* _tmp43_;
#line 114 "../src/source_parser.vala"
		_tmp43_ = expression;
#line 114 "../src/source_parser.vala"
		_tmp41_ = g_str_has_suffix (_tmp43_, "\"");
#line 1581 "source_parser.c"
	} else {
#line 114 "../src/source_parser.vala"
		_tmp41_ = FALSE;
#line 1585 "source_parser.c"
	}
#line 114 "../src/source_parser.vala"
	if (_tmp41_) {
#line 114 "../src/source_parser.vala"
		_tmp40_ = TRUE;
#line 1591 "source_parser.c"
	} else {
		gboolean _tmp44_ = FALSE;
		const gchar* _tmp45_;
#line 115 "../src/source_parser.vala"
		_tmp45_ = expression;
#line 115 "../src/source_parser.vala"
		if (g_str_has_prefix (_tmp45_, "'")) {
#line 1599 "source_parser.c"
			const gchar* _tmp46_;
#line 115 "../src/source_parser.vala"
			_tmp46_ = expression;
#line 115 "../src/source_parser.vala"
			_tmp44_ = g_str_has_suffix (_tmp46_, "'");
#line 1605 "source_parser.c"
		} else {
#line 115 "../src/source_parser.vala"
			_tmp44_ = FALSE;
#line 1609 "source_parser.c"
		}
#line 115 "../src/source_parser.vala"
		_tmp40_ = _tmp44_;
#line 1613 "source_parser.c"
	}
#line 114 "../src/source_parser.vala"
	if (_tmp40_) {
#line 1617 "source_parser.c"
		const gchar* _tmp47_;
		const gchar* _tmp48_;
		gint _tmp49_;
		gint _tmp50_;
		gchar* _tmp51_;
#line 116 "../src/source_parser.vala"
		_tmp47_ = expression;
#line 116 "../src/source_parser.vala"
		_tmp48_ = expression;
#line 116 "../src/source_parser.vala"
		_tmp49_ = strlen (_tmp48_);
#line 116 "../src/source_parser.vala"
		_tmp50_ = _tmp49_;
#line 116 "../src/source_parser.vala"
		_tmp51_ = string_substring (_tmp47_, (glong) 1, (glong) (_tmp50_ - 2));
#line 116 "../src/source_parser.vala"
		result = _tmp51_;
#line 116 "../src/source_parser.vala"
		_g_free0 (expression);
#line 116 "../src/source_parser.vala"
		return result;
#line 1639 "source_parser.c"
	}
#line 119 "../src/source_parser.vala"
	_tmp52_ = g_error_new (PHP_TO_VALA_ERROR, PHP_TO_VALA_ERROR_UNSUPPORTED, "Only string-literal compile-time include/require is supported: %s", line);
#line 119 "../src/source_parser.vala"
	_inner_error0_ = _tmp52_;
#line 119 "../src/source_parser.vala"
	g_propagate_error (error, _inner_error0_);
#line 119 "../src/source_parser.vala"
	_g_free0 (expression);
#line 119 "../src/source_parser.vala"
	return NULL;
#line 1651 "source_parser.c"
}

static gint
string_index_of (const gchar* self,
                 const gchar* needle,
                 gint start_index)
{
	gchar* _result_ = NULL;
	gchar* _tmp0_;
	gchar* _tmp1_;
	gint result;
#line 1184 "glib-2.0.vapi"
	g_return_val_if_fail (self != NULL, -1);
#line 1184 "glib-2.0.vapi"
	g_return_val_if_fail (needle != NULL, -1);
#line 1185 "glib-2.0.vapi"
	_tmp0_ = strstr (((gchar*) self) + start_index, (gchar*) needle);
#line 1185 "glib-2.0.vapi"
	_result_ = _tmp0_;
#line 1187 "glib-2.0.vapi"
	_tmp1_ = _result_;
#line 1187 "glib-2.0.vapi"
	if (_tmp1_ != NULL) {
#line 1675 "source_parser.c"
		gchar* _tmp2_;
#line 1188 "glib-2.0.vapi"
		_tmp2_ = _result_;
#line 1188 "glib-2.0.vapi"
		result = (gint) (_tmp2_ - ((gchar*) self));
#line 1188 "glib-2.0.vapi"
		return result;
#line 1683 "source_parser.c"
	} else {
#line 1190 "glib-2.0.vapi"
		result = -1;
#line 1190 "glib-2.0.vapi"
		return result;
#line 1689 "source_parser.c"
	}
}

static gboolean
string_contains (const gchar* self,
                 const gchar* needle)
{
	gchar* _tmp0_;
	gboolean result;
#line 1584 "glib-2.0.vapi"
	g_return_val_if_fail (self != NULL, FALSE);
#line 1584 "glib-2.0.vapi"
	g_return_val_if_fail (needle != NULL, FALSE);
#line 1585 "glib-2.0.vapi"
	_tmp0_ = strstr ((gchar*) self, (gchar*) needle);
#line 1585 "glib-2.0.vapi"
	result = _tmp0_ != NULL;
#line 1585 "glib-2.0.vapi"
	return result;
#line 1709 "source_parser.c"
}

static gint
string_last_index_of (const gchar* self,
                      const gchar* needle,
                      gint start_index)
{
	gchar* _result_ = NULL;
	gchar* _tmp0_;
	gchar* _tmp1_;
	gint result;
#line 1194 "glib-2.0.vapi"
	g_return_val_if_fail (self != NULL, -1);
#line 1194 "glib-2.0.vapi"
	g_return_val_if_fail (needle != NULL, -1);
#line 1195 "glib-2.0.vapi"
	_tmp0_ = g_strrstr (((gchar*) self) + start_index, (gchar*) needle);
#line 1195 "glib-2.0.vapi"
	_result_ = _tmp0_;
#line 1197 "glib-2.0.vapi"
	_tmp1_ = _result_;
#line 1197 "glib-2.0.vapi"
	if (_tmp1_ != NULL) {
#line 1733 "source_parser.c"
		gchar* _tmp2_;
#line 1198 "glib-2.0.vapi"
		_tmp2_ = _result_;
#line 1198 "glib-2.0.vapi"
		result = (gint) (_tmp2_ - ((gchar*) self));
#line 1198 "glib-2.0.vapi"
		return result;
#line 1741 "source_parser.c"
	} else {
#line 1200 "glib-2.0.vapi"
		result = -1;
#line 1200 "glib-2.0.vapi"
		return result;
#line 1747 "source_parser.c"
	}
}

gchar*
php_to_vala_source_parser_strip_php_tags (const gchar* source)
{
	GString* output = NULL;
	GString* _tmp0_;
	gchar** lines = NULL;
	gchar** _tmp1_;
	gchar** _tmp2_;
	gint lines_length1;
	gint _lines_size_;
	GString* _tmp50_;
	const gchar* _tmp51_;
	gchar* _tmp52_;
	gchar* result;
#line 125 "../src/source_parser.vala"
	g_return_val_if_fail (source != NULL, NULL);
#line 126 "../src/source_parser.vala"
	_tmp0_ = g_string_new ("");
#line 126 "../src/source_parser.vala"
	output = _tmp0_;
#line 127 "../src/source_parser.vala"
	_tmp2_ = _tmp1_ = g_strsplit (source, "\n", 0);
#line 127 "../src/source_parser.vala"
	lines = _tmp2_;
#line 127 "../src/source_parser.vala"
	lines_length1 = _vala_array_length (_tmp1_);
#line 127 "../src/source_parser.vala"
	_lines_size_ = lines_length1;
#line 1779 "source_parser.c"
	{
		gint i = 0;
#line 128 "../src/source_parser.vala"
		i = 0;
#line 1784 "source_parser.c"
		{
			gboolean _tmp3_ = FALSE;
#line 128 "../src/source_parser.vala"
			_tmp3_ = TRUE;
#line 128 "../src/source_parser.vala"
			while (TRUE) {
#line 1791 "source_parser.c"
				gchar** _tmp5_;
				gint _tmp5__length1;
				gchar* line = NULL;
				gchar** _tmp6_;
				gint _tmp6__length1;
				const gchar* _tmp7_;
				gchar* _tmp8_;
				gchar* stripped = NULL;
				const gchar* _tmp9_;
				gchar* _tmp10_;
				const gchar* _tmp11_;
				gchar* stripped_line = NULL;
				const gchar* _tmp29_;
				gchar* _tmp30_;
				const gchar* _tmp31_;
				GString* _tmp46_;
				const gchar* _tmp47_;
				gchar** _tmp48_;
				gint _tmp48__length1;
#line 128 "../src/source_parser.vala"
				if (!_tmp3_) {
#line 1813 "source_parser.c"
					gint _tmp4_;
#line 128 "../src/source_parser.vala"
					_tmp4_ = i;
#line 128 "../src/source_parser.vala"
					i = _tmp4_ + 1;
#line 1819 "source_parser.c"
				}
#line 128 "../src/source_parser.vala"
				_tmp3_ = FALSE;
#line 128 "../src/source_parser.vala"
				_tmp5_ = lines;
#line 128 "../src/source_parser.vala"
				_tmp5__length1 = lines_length1;
#line 128 "../src/source_parser.vala"
				if (!(i < _tmp5__length1)) {
#line 128 "../src/source_parser.vala"
					break;
#line 1831 "source_parser.c"
				}
#line 129 "../src/source_parser.vala"
				_tmp6_ = lines;
#line 129 "../src/source_parser.vala"
				_tmp6__length1 = lines_length1;
#line 129 "../src/source_parser.vala"
				_tmp7_ = _tmp6_[i];
#line 129 "../src/source_parser.vala"
				_tmp8_ = g_strdup (_tmp7_);
#line 129 "../src/source_parser.vala"
				line = _tmp8_;
#line 130 "../src/source_parser.vala"
				_tmp9_ = line;
#line 130 "../src/source_parser.vala"
				_tmp10_ = string_strip (_tmp9_);
#line 130 "../src/source_parser.vala"
				stripped = _tmp10_;
#line 131 "../src/source_parser.vala"
				_tmp11_ = stripped;
#line 131 "../src/source_parser.vala"
				if (g_str_has_prefix (_tmp11_, "<?php")) {
#line 1853 "source_parser.c"
					gint index = 0;
					const gchar* _tmp12_;
					const gchar* _tmp13_;
					gchar* _tmp14_;
					gchar* _tmp15_;
					const gchar* _tmp16_;
					gchar* _tmp17_;
					gchar* _tmp18_;
					gchar* _tmp19_;
#line 132 "../src/source_parser.vala"
					_tmp12_ = line;
#line 132 "../src/source_parser.vala"
					index = string_index_of (_tmp12_, "<?php", 0);
#line 133 "../src/source_parser.vala"
					_tmp13_ = line;
#line 133 "../src/source_parser.vala"
					_tmp14_ = string_substring (_tmp13_, (glong) 0, (glong) index);
#line 133 "../src/source_parser.vala"
					_tmp15_ = _tmp14_;
#line 133 "../src/source_parser.vala"
					_tmp16_ = line;
#line 133 "../src/source_parser.vala"
					_tmp17_ = string_substring (_tmp16_, (glong) (index + 5), (glong) -1);
#line 133 "../src/source_parser.vala"
					_tmp18_ = _tmp17_;
#line 133 "../src/source_parser.vala"
					_tmp19_ = g_strconcat (_tmp15_, _tmp18_, NULL);
#line 133 "../src/source_parser.vala"
					_g_free0 (line);
#line 133 "../src/source_parser.vala"
					line = _tmp19_;
#line 133 "../src/source_parser.vala"
					_g_free0 (_tmp18_);
#line 133 "../src/source_parser.vala"
					_g_free0 (_tmp15_);
#line 1889 "source_parser.c"
				} else {
					const gchar* _tmp20_;
#line 134 "../src/source_parser.vala"
					_tmp20_ = stripped;
#line 134 "../src/source_parser.vala"
					if (g_str_has_prefix (_tmp20_, "<?")) {
#line 1896 "source_parser.c"
						gint index = 0;
						const gchar* _tmp21_;
						const gchar* _tmp22_;
						gchar* _tmp23_;
						gchar* _tmp24_;
						const gchar* _tmp25_;
						gchar* _tmp26_;
						gchar* _tmp27_;
						gchar* _tmp28_;
#line 135 "../src/source_parser.vala"
						_tmp21_ = line;
#line 135 "../src/source_parser.vala"
						index = string_index_of (_tmp21_, "<?", 0);
#line 136 "../src/source_parser.vala"
						_tmp22_ = line;
#line 136 "../src/source_parser.vala"
						_tmp23_ = string_substring (_tmp22_, (glong) 0, (glong) index);
#line 136 "../src/source_parser.vala"
						_tmp24_ = _tmp23_;
#line 136 "../src/source_parser.vala"
						_tmp25_ = line;
#line 136 "../src/source_parser.vala"
						_tmp26_ = string_substring (_tmp25_, (glong) (index + 2), (glong) -1);
#line 136 "../src/source_parser.vala"
						_tmp27_ = _tmp26_;
#line 136 "../src/source_parser.vala"
						_tmp28_ = g_strconcat (_tmp24_, _tmp27_, NULL);
#line 136 "../src/source_parser.vala"
						_g_free0 (line);
#line 136 "../src/source_parser.vala"
						line = _tmp28_;
#line 136 "../src/source_parser.vala"
						_g_free0 (_tmp27_);
#line 136 "../src/source_parser.vala"
						_g_free0 (_tmp24_);
#line 1932 "source_parser.c"
					}
				}
#line 138 "../src/source_parser.vala"
				_tmp29_ = line;
#line 138 "../src/source_parser.vala"
				_tmp30_ = string_strip (_tmp29_);
#line 138 "../src/source_parser.vala"
				stripped_line = _tmp30_;
#line 139 "../src/source_parser.vala"
				_tmp31_ = stripped_line;
#line 139 "../src/source_parser.vala"
				if (g_strcmp0 (_tmp31_, "?>") == 0) {
#line 1945 "source_parser.c"
					gchar* _tmp32_;
#line 140 "../src/source_parser.vala"
					_tmp32_ = g_strdup ("");
#line 140 "../src/source_parser.vala"
					_g_free0 (line);
#line 140 "../src/source_parser.vala"
					line = _tmp32_;
#line 1953 "source_parser.c"
				} else {
					gboolean _tmp33_ = FALSE;
					gboolean _tmp34_ = FALSE;
					const gchar* _tmp35_;
#line 141 "../src/source_parser.vala"
					_tmp35_ = stripped_line;
#line 141 "../src/source_parser.vala"
					if (g_str_has_suffix (_tmp35_, "?>")) {
#line 1962 "source_parser.c"
						const gchar* _tmp36_;
#line 141 "../src/source_parser.vala"
						_tmp36_ = line;
#line 141 "../src/source_parser.vala"
						_tmp34_ = !string_contains (_tmp36_, "\"?>\"");
#line 1968 "source_parser.c"
					} else {
#line 141 "../src/source_parser.vala"
						_tmp34_ = FALSE;
#line 1972 "source_parser.c"
					}
#line 141 "../src/source_parser.vala"
					if (_tmp34_) {
#line 1976 "source_parser.c"
						const gchar* _tmp37_;
#line 141 "../src/source_parser.vala"
						_tmp37_ = line;
#line 141 "../src/source_parser.vala"
						_tmp33_ = !string_contains (_tmp37_, "'?>'");
#line 1982 "source_parser.c"
					} else {
#line 141 "../src/source_parser.vala"
						_tmp33_ = FALSE;
#line 1986 "source_parser.c"
					}
#line 141 "../src/source_parser.vala"
					if (_tmp33_) {
#line 1990 "source_parser.c"
						gint index = 0;
						const gchar* _tmp38_;
#line 142 "../src/source_parser.vala"
						_tmp38_ = line;
#line 142 "../src/source_parser.vala"
						index = string_last_index_of (_tmp38_, "?>", 0);
#line 143 "../src/source_parser.vala"
						if (index >= 0) {
#line 1999 "source_parser.c"
							const gchar* _tmp39_;
							gchar* _tmp40_;
							gchar* _tmp41_;
							const gchar* _tmp42_;
							gchar* _tmp43_;
							gchar* _tmp44_;
							gchar* _tmp45_;
#line 144 "../src/source_parser.vala"
							_tmp39_ = line;
#line 144 "../src/source_parser.vala"
							_tmp40_ = string_substring (_tmp39_, (glong) 0, (glong) index);
#line 144 "../src/source_parser.vala"
							_tmp41_ = _tmp40_;
#line 144 "../src/source_parser.vala"
							_tmp42_ = line;
#line 144 "../src/source_parser.vala"
							_tmp43_ = string_substring (_tmp42_, (glong) (index + 2), (glong) -1);
#line 144 "../src/source_parser.vala"
							_tmp44_ = _tmp43_;
#line 144 "../src/source_parser.vala"
							_tmp45_ = g_strconcat (_tmp41_, _tmp44_, NULL);
#line 144 "../src/source_parser.vala"
							_g_free0 (line);
#line 144 "../src/source_parser.vala"
							line = _tmp45_;
#line 144 "../src/source_parser.vala"
							_g_free0 (_tmp44_);
#line 144 "../src/source_parser.vala"
							_g_free0 (_tmp41_);
#line 2029 "source_parser.c"
						}
					}
				}
#line 147 "../src/source_parser.vala"
				_tmp46_ = output;
#line 147 "../src/source_parser.vala"
				_tmp47_ = line;
#line 147 "../src/source_parser.vala"
				g_string_append (_tmp46_, _tmp47_);
#line 148 "../src/source_parser.vala"
				_tmp48_ = lines;
#line 148 "../src/source_parser.vala"
				_tmp48__length1 = lines_length1;
#line 148 "../src/source_parser.vala"
				if ((i + 1) < _tmp48__length1) {
#line 2045 "source_parser.c"
					GString* _tmp49_;
#line 149 "../src/source_parser.vala"
					_tmp49_ = output;
#line 149 "../src/source_parser.vala"
					g_string_append_c (_tmp49_, '\n');
#line 2051 "source_parser.c"
				}
#line 128 "../src/source_parser.vala"
				_g_free0 (stripped_line);
#line 128 "../src/source_parser.vala"
				_g_free0 (stripped);
#line 128 "../src/source_parser.vala"
				_g_free0 (line);
#line 2059 "source_parser.c"
			}
		}
	}
#line 152 "../src/source_parser.vala"
	_tmp50_ = output;
#line 152 "../src/source_parser.vala"
	_tmp51_ = _tmp50_->str;
#line 152 "../src/source_parser.vala"
	_tmp52_ = g_strdup (_tmp51_);
#line 152 "../src/source_parser.vala"
	result = _tmp52_;
#line 152 "../src/source_parser.vala"
	lines = (_vala_array_free (lines, lines_length1, (GDestroyNotify) g_free), NULL);
#line 152 "../src/source_parser.vala"
	_g_string_free0 (output);
#line 152 "../src/source_parser.vala"
	return result;
#line 2077 "source_parser.c"
}

SourceParts*
php_to_vala_source_parser_extract_local_functions (const gchar* source_path,
                                                   const gchar* source,
                                                   GError** error)
{
	SourceParts* _tmp0_ = NULL;
	SourceParts* _tmp1_;
	SourceParts* _tmp2_;
	GError* _inner_error0_ = NULL;
	SourceParts* result;
#line 155 "../src/source_parser.vala"
	g_return_val_if_fail (source_path != NULL, NULL);
#line 155 "../src/source_parser.vala"
	g_return_val_if_fail (source != NULL, NULL);
#line 156 "../src/source_parser.vala"
	_tmp1_ = php_to_vala_source_parser_extract_local_functions_with_php_tokens (source_path, source, &_inner_error0_);
#line 156 "../src/source_parser.vala"
	_tmp0_ = _tmp1_;
#line 156 "../src/source_parser.vala"
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
#line 156 "../src/source_parser.vala"
		g_propagate_error (error, _inner_error0_);
#line 156 "../src/source_parser.vala"
		return NULL;
#line 2104 "source_parser.c"
	}
#line 156 "../src/source_parser.vala"
	_tmp2_ = _tmp0_;
#line 156 "../src/source_parser.vala"
	_tmp0_ = NULL;
#line 156 "../src/source_parser.vala"
	result = _tmp2_;
#line 156 "../src/source_parser.vala"
	_g_object_unref0 (_tmp0_);
#line 156 "../src/source_parser.vala"
	return result;
#line 2116 "source_parser.c"
}

gchar*
php_to_vala_source_parser_debug_tokens_for_source_line (const gchar* source_path,
                                                        const gchar* source,
                                                        gint php_line_number,
                                                        gint context_lines)
{
	GError* _inner_error0_ = NULL;
	gchar* result;
#line 159 "../src/source_parser.vala"
	g_return_val_if_fail (source_path != NULL, NULL);
#line 159 "../src/source_parser.vala"
	g_return_val_if_fail (source != NULL, NULL);
#line 2131 "source_parser.c"
	{
		GeeArrayList* tokens = NULL;
		GeeArrayList* _tmp0_;
		gchar* _tmp1_;
#line 161 "../src/source_parser.vala"
		_tmp0_ = php_to_vala_source_parser_tokenize_php_source (source_path, source, &_inner_error0_);
#line 161 "../src/source_parser.vala"
		tokens = _tmp0_;
#line 161 "../src/source_parser.vala"
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
#line 2142 "source_parser.c"
			goto __catch0_g_error;
		}
#line 162 "../src/source_parser.vala"
		_tmp1_ = php_to_vala_source_parser_format_token_debug_context (tokens, php_line_number, context_lines);
#line 162 "../src/source_parser.vala"
		result = _tmp1_;
#line 162 "../src/source_parser.vala"
		_g_object_unref0 (tokens);
#line 162 "../src/source_parser.vala"
		return result;
#line 2153 "source_parser.c"
	}
	goto __finally0;
	__catch0_g_error:
	{
		GError* e = NULL;
		GError* _tmp2_;
		const gchar* _tmp3_;
		gchar* _tmp4_;
#line 160 "../src/source_parser.vala"
		e = _inner_error0_;
#line 160 "../src/source_parser.vala"
		_inner_error0_ = NULL;
#line 164 "../src/source_parser.vala"
		_tmp2_ = e;
#line 164 "../src/source_parser.vala"
		_tmp3_ = _tmp2_->message;
#line 164 "../src/source_parser.vala"
		_tmp4_ = g_strdup_printf ("PHP tokens near line %d: <tokenize failed: %s>", php_line_number, _tmp3_);
#line 164 "../src/source_parser.vala"
		result = _tmp4_;
#line 164 "../src/source_parser.vala"
		_g_error_free0 (e);
#line 164 "../src/source_parser.vala"
		return result;
#line 2178 "source_parser.c"
	}
	__finally0:
#line 160 "../src/source_parser.vala"
	g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
#line 160 "../src/source_parser.vala"
	g_clear_error (&_inner_error0_);
#line 160 "../src/source_parser.vala"
	return NULL;
#line 2187 "source_parser.c"
}

gchar*
php_to_vala_source_parser_debug_tokens_for_snippet (const gchar* source_path,
                                                    const gchar* line,
                                                    gint php_line_number)
{
	GError* _inner_error0_ = NULL;
	gchar* result;
#line 168 "../src/source_parser.vala"
	g_return_val_if_fail (source_path != NULL, NULL);
#line 168 "../src/source_parser.vala"
	g_return_val_if_fail (line != NULL, NULL);
#line 2201 "source_parser.c"
	{
		GeeArrayList* tokens = NULL;
		GeeArrayList* _tmp0_;
		gchar* _tmp1_;
#line 170 "../src/source_parser.vala"
		_tmp0_ = php_to_vala_source_parser_tokenize_php_source (source_path, line, &_inner_error0_);
#line 170 "../src/source_parser.vala"
		tokens = _tmp0_;
#line 170 "../src/source_parser.vala"
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
#line 2212 "source_parser.c"
			goto __catch0_g_error;
		}
#line 171 "../src/source_parser.vala"
		_tmp1_ = php_to_vala_source_parser_format_token_debug_context (tokens, php_line_number, 0);
#line 171 "../src/source_parser.vala"
		result = _tmp1_;
#line 171 "../src/source_parser.vala"
		_g_object_unref0 (tokens);
#line 171 "../src/source_parser.vala"
		return result;
#line 2223 "source_parser.c"
	}
	goto __finally0;
	__catch0_g_error:
	{
		GError* e = NULL;
		GError* _tmp2_;
		const gchar* _tmp3_;
		gchar* _tmp4_;
#line 169 "../src/source_parser.vala"
		e = _inner_error0_;
#line 169 "../src/source_parser.vala"
		_inner_error0_ = NULL;
#line 173 "../src/source_parser.vala"
		_tmp2_ = e;
#line 173 "../src/source_parser.vala"
		_tmp3_ = _tmp2_->message;
#line 173 "../src/source_parser.vala"
		_tmp4_ = g_strdup_printf ("PHP tokens near line %d: <tokenize failed: %s>", php_line_number, _tmp3_);
#line 173 "../src/source_parser.vala"
		result = _tmp4_;
#line 173 "../src/source_parser.vala"
		_g_error_free0 (e);
#line 173 "../src/source_parser.vala"
		return result;
#line 2248 "source_parser.c"
	}
	__finally0:
#line 169 "../src/source_parser.vala"
	g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
#line 169 "../src/source_parser.vala"
	g_clear_error (&_inner_error0_);
#line 169 "../src/source_parser.vala"
	return NULL;
#line 2257 "source_parser.c"
}

static SourceParts*
php_to_vala_source_parser_extract_local_functions_with_php_tokens (const gchar* source_path,
                                                                   const gchar* source,
                                                                   GError** error)
{
	SourceParts* parts = NULL;
	SourceParts* _tmp0_;
	GeeArrayList* tokens = NULL;
	GeeArrayList* _tmp1_;
	GeeArrayList* extracted_spans = NULL;
	GeeArrayList* _tmp2_;
	gchar* pending_doc_comment = NULL;
	gchar* _tmp3_;
	gint pending_doc_line = 0;
	gint brace_depth = 0;
	SourceParts* _tmp62_;
	GeeArrayList* _tmp63_;
	gchar* _tmp64_;
	GError* _inner_error0_ = NULL;
	SourceParts* result;
#line 207 "../src/source_parser.vala"
	g_return_val_if_fail (source_path != NULL, NULL);
#line 207 "../src/source_parser.vala"
	g_return_val_if_fail (source != NULL, NULL);
#line 208 "../src/source_parser.vala"
	_tmp0_ = source_parts_new ();
#line 208 "../src/source_parser.vala"
	parts = _tmp0_;
#line 209 "../src/source_parser.vala"
	_tmp1_ = php_to_vala_source_parser_tokenize_php_source (source_path, source, &_inner_error0_);
#line 209 "../src/source_parser.vala"
	tokens = _tmp1_;
#line 209 "../src/source_parser.vala"
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
#line 209 "../src/source_parser.vala"
		g_propagate_error (error, _inner_error0_);
#line 209 "../src/source_parser.vala"
		_g_object_unref0 (parts);
#line 209 "../src/source_parser.vala"
		return NULL;
#line 2300 "source_parser.c"
	}
#line 210 "../src/source_parser.vala"
	_tmp2_ = gee_array_list_new (PHP_TO_VALA_SOURCE_PARSER_TYPE_SOURCE_SPAN, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL);
#line 210 "../src/source_parser.vala"
	extracted_spans = _tmp2_;
#line 212 "../src/source_parser.vala"
	_tmp3_ = g_strdup ("");
#line 212 "../src/source_parser.vala"
	pending_doc_comment = _tmp3_;
#line 213 "../src/source_parser.vala"
	pending_doc_line = 0;
#line 214 "../src/source_parser.vala"
	brace_depth = 0;
#line 2314 "source_parser.c"
	{
		gint i = 0;
#line 216 "../src/source_parser.vala"
		i = 0;
#line 2319 "source_parser.c"
		{
			gboolean _tmp4_ = FALSE;
#line 216 "../src/source_parser.vala"
			_tmp4_ = TRUE;
#line 216 "../src/source_parser.vala"
			while (TRUE) {
#line 2326 "source_parser.c"
				GeeArrayList* _tmp6_;
				gint _tmp7_;
				gint _tmp8_;
				PhpToValaSourceParserPhpSourceToken* token = NULL;
				GeeArrayList* _tmp9_;
				gpointer _tmp10_;
				gboolean _tmp11_ = FALSE;
				gboolean _tmp17_ = FALSE;
				gboolean _tmp34_ = FALSE;
				PhpToValaSourceParserPhpSourceToken* _tmp54_;
#line 216 "../src/source_parser.vala"
				if (!_tmp4_) {
#line 2339 "source_parser.c"
					gint _tmp5_;
#line 216 "../src/source_parser.vala"
					_tmp5_ = i;
#line 216 "../src/source_parser.vala"
					i = _tmp5_ + 1;
#line 2345 "source_parser.c"
				}
#line 216 "../src/source_parser.vala"
				_tmp4_ = FALSE;
#line 216 "../src/source_parser.vala"
				_tmp6_ = tokens;
#line 216 "../src/source_parser.vala"
				_tmp7_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp6_);
#line 216 "../src/source_parser.vala"
				_tmp8_ = _tmp7_;
#line 216 "../src/source_parser.vala"
				if (!(i < _tmp8_)) {
#line 216 "../src/source_parser.vala"
					break;
#line 2359 "source_parser.c"
				}
#line 217 "../src/source_parser.vala"
				_tmp9_ = tokens;
#line 217 "../src/source_parser.vala"
				_tmp10_ = gee_abstract_list_get ((GeeAbstractList*) _tmp9_, i);
#line 217 "../src/source_parser.vala"
				token = (PhpToValaSourceParserPhpSourceToken*) _tmp10_;
#line 219 "../src/source_parser.vala"
				if (brace_depth == 0) {
#line 2369 "source_parser.c"
					PhpToValaSourceParserPhpSourceToken* _tmp12_;
#line 219 "../src/source_parser.vala"
					_tmp12_ = token;
#line 219 "../src/source_parser.vala"
					_tmp11_ = php_to_vala_source_parser_php_source_token_is_token (_tmp12_, "T_DOC_COMMENT");
#line 2375 "source_parser.c"
				} else {
#line 219 "../src/source_parser.vala"
					_tmp11_ = FALSE;
#line 2379 "source_parser.c"
				}
#line 219 "../src/source_parser.vala"
				if (_tmp11_) {
#line 2383 "source_parser.c"
					PhpToValaSourceParserPhpSourceToken* _tmp13_;
					const gchar* _tmp14_;
					gchar* _tmp15_;
					PhpToValaSourceParserPhpSourceToken* _tmp16_;
#line 220 "../src/source_parser.vala"
					_tmp13_ = token;
#line 220 "../src/source_parser.vala"
					_tmp14_ = _tmp13_->text;
#line 220 "../src/source_parser.vala"
					_tmp15_ = g_strdup (_tmp14_);
#line 220 "../src/source_parser.vala"
					_g_free0 (pending_doc_comment);
#line 220 "../src/source_parser.vala"
					pending_doc_comment = _tmp15_;
#line 221 "../src/source_parser.vala"
					_tmp16_ = token;
#line 221 "../src/source_parser.vala"
					pending_doc_line = _tmp16_->line;
#line 222 "../src/source_parser.vala"
					_g_object_unref0 (token);
#line 222 "../src/source_parser.vala"
					continue;
#line 2406 "source_parser.c"
				}
#line 225 "../src/source_parser.vala"
				if (brace_depth == 0) {
#line 2410 "source_parser.c"
					GeeArrayList* _tmp18_;
#line 225 "../src/source_parser.vala"
					_tmp18_ = tokens;
#line 225 "../src/source_parser.vala"
					_tmp17_ = php_to_vala_source_parser_is_class_token (_tmp18_, i);
#line 2416 "source_parser.c"
				} else {
#line 225 "../src/source_parser.vala"
					_tmp17_ = FALSE;
#line 2420 "source_parser.c"
				}
#line 225 "../src/source_parser.vala"
				if (_tmp17_) {
#line 2424 "source_parser.c"
					gint class_end_index = 0;
					gint class_start_line = 0;
					gint class_end_line = 0;
					PhpClass* php_class = NULL;
					GeeArrayList* _tmp19_;
					const gchar* _tmp20_;
					gint _tmp21_ = 0;
					gint _tmp22_ = 0;
					gint _tmp23_ = 0;
					PhpClass* _tmp24_;
					PhpClass* _tmp25_;
#line 229 "../src/source_parser.vala"
					_tmp19_ = tokens;
#line 229 "../src/source_parser.vala"
					_tmp20_ = pending_doc_comment;
#line 229 "../src/source_parser.vala"
					_tmp24_ = php_to_vala_source_parser_parse_php_class_from_tokens (source_path, _tmp19_, i, _tmp20_, &_tmp21_, &_tmp22_, &_tmp23_, &_inner_error0_);
#line 229 "../src/source_parser.vala"
					class_end_index = _tmp21_;
#line 229 "../src/source_parser.vala"
					class_start_line = _tmp22_;
#line 229 "../src/source_parser.vala"
					class_end_line = _tmp23_;
#line 229 "../src/source_parser.vala"
					php_class = _tmp24_;
#line 229 "../src/source_parser.vala"
					if (G_UNLIKELY (_inner_error0_ != NULL)) {
#line 229 "../src/source_parser.vala"
						g_propagate_error (error, _inner_error0_);
#line 229 "../src/source_parser.vala"
						_g_object_unref0 (token);
#line 229 "../src/source_parser.vala"
						_g_free0 (pending_doc_comment);
#line 229 "../src/source_parser.vala"
						_g_object_unref0 (extracted_spans);
#line 229 "../src/source_parser.vala"
						_g_object_unref0 (tokens);
#line 229 "../src/source_parser.vala"
						_g_object_unref0 (parts);
#line 229 "../src/source_parser.vala"
						return NULL;
#line 2466 "source_parser.c"
					}
#line 230 "../src/source_parser.vala"
					_tmp25_ = php_class;
#line 230 "../src/source_parser.vala"
					if (_tmp25_ != NULL) {
#line 2472 "source_parser.c"
						SourceParts* _tmp26_;
						GeeArrayList* _tmp27_;
						PhpClass* _tmp28_;
						gint _tmp29_ = 0;
						GeeArrayList* _tmp30_;
						PhpToValaSourceParserSourceSpan* _tmp31_;
						PhpToValaSourceParserSourceSpan* _tmp32_;
						gchar* _tmp33_;
#line 231 "../src/source_parser.vala"
						_tmp26_ = parts;
#line 231 "../src/source_parser.vala"
						_tmp27_ = _tmp26_->classes;
#line 231 "../src/source_parser.vala"
						_tmp28_ = php_class;
#line 231 "../src/source_parser.vala"
						gee_abstract_collection_add ((GeeAbstractCollection*) _tmp27_, _tmp28_);
#line 232 "../src/source_parser.vala"
						if (pending_doc_line > 0) {
#line 232 "../src/source_parser.vala"
							_tmp29_ = pending_doc_line;
#line 2493 "source_parser.c"
						} else {
#line 232 "../src/source_parser.vala"
							_tmp29_ = class_start_line;
#line 2497 "source_parser.c"
						}
#line 232 "../src/source_parser.vala"
						_tmp30_ = extracted_spans;
#line 232 "../src/source_parser.vala"
						_tmp31_ = php_to_vala_source_parser_source_span_new (_tmp29_, class_end_line);
#line 232 "../src/source_parser.vala"
						_tmp32_ = _tmp31_;
#line 232 "../src/source_parser.vala"
						gee_abstract_collection_add ((GeeAbstractCollection*) _tmp30_, _tmp32_);
#line 232 "../src/source_parser.vala"
						_g_object_unref0 (_tmp32_);
#line 233 "../src/source_parser.vala"
						_tmp33_ = g_strdup ("");
#line 233 "../src/source_parser.vala"
						_g_free0 (pending_doc_comment);
#line 233 "../src/source_parser.vala"
						pending_doc_comment = _tmp33_;
#line 234 "../src/source_parser.vala"
						pending_doc_line = 0;
#line 235 "../src/source_parser.vala"
						i = class_end_index;
#line 236 "../src/source_parser.vala"
						_g_object_unref0 (php_class);
#line 236 "../src/source_parser.vala"
						_g_object_unref0 (token);
#line 236 "../src/source_parser.vala"
						continue;
#line 2525 "source_parser.c"
					}
#line 225 "../src/source_parser.vala"
					_g_object_unref0 (php_class);
#line 2529 "source_parser.c"
				}
#line 240 "../src/source_parser.vala"
				if (brace_depth == 0) {
#line 2533 "source_parser.c"
					PhpToValaSourceParserPhpSourceToken* _tmp35_;
#line 240 "../src/source_parser.vala"
					_tmp35_ = token;
#line 240 "../src/source_parser.vala"
					_tmp34_ = php_to_vala_source_parser_php_source_token_is_token (_tmp35_, "T_FUNCTION");
#line 2539 "source_parser.c"
				} else {
#line 240 "../src/source_parser.vala"
					_tmp34_ = FALSE;
#line 2543 "source_parser.c"
				}
#line 240 "../src/source_parser.vala"
				if (_tmp34_) {
#line 2547 "source_parser.c"
					gint function_end_index = 0;
					gint function_start_line = 0;
					gint function_end_line = 0;
					LocalFunction* local_function = NULL;
					GeeArrayList* _tmp36_;
					GeeArrayList* _tmp37_;
					gint _tmp38_;
					gint _tmp39_;
					const gchar* _tmp40_;
					gint _tmp41_ = 0;
					gint _tmp42_ = 0;
					gint _tmp43_ = 0;
					LocalFunction* _tmp44_;
					LocalFunction* _tmp45_;
#line 244 "../src/source_parser.vala"
					_tmp36_ = tokens;
#line 244 "../src/source_parser.vala"
					_tmp37_ = tokens;
#line 244 "../src/source_parser.vala"
					_tmp38_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp37_);
#line 244 "../src/source_parser.vala"
					_tmp39_ = _tmp38_;
#line 244 "../src/source_parser.vala"
					_tmp40_ = pending_doc_comment;
#line 244 "../src/source_parser.vala"
					_tmp44_ = php_to_vala_source_parser_parse_local_function_from_tokens (source_path, _tmp36_, i, _tmp39_, TRUE, _tmp40_, &_tmp41_, &_tmp42_, &_tmp43_, &_inner_error0_);
#line 244 "../src/source_parser.vala"
					function_end_index = _tmp41_;
#line 244 "../src/source_parser.vala"
					function_start_line = _tmp42_;
#line 244 "../src/source_parser.vala"
					function_end_line = _tmp43_;
#line 244 "../src/source_parser.vala"
					local_function = _tmp44_;
#line 244 "../src/source_parser.vala"
					if (G_UNLIKELY (_inner_error0_ != NULL)) {
#line 244 "../src/source_parser.vala"
						g_propagate_error (error, _inner_error0_);
#line 244 "../src/source_parser.vala"
						_g_object_unref0 (token);
#line 244 "../src/source_parser.vala"
						_g_free0 (pending_doc_comment);
#line 244 "../src/source_parser.vala"
						_g_object_unref0 (extracted_spans);
#line 244 "../src/source_parser.vala"
						_g_object_unref0 (tokens);
#line 244 "../src/source_parser.vala"
						_g_object_unref0 (parts);
#line 244 "../src/source_parser.vala"
						return NULL;
#line 2598 "source_parser.c"
					}
#line 245 "../src/source_parser.vala"
					_tmp45_ = local_function;
#line 245 "../src/source_parser.vala"
					if (_tmp45_ != NULL) {
#line 2604 "source_parser.c"
						SourceParts* _tmp46_;
						GeeArrayList* _tmp47_;
						LocalFunction* _tmp48_;
						gint _tmp49_ = 0;
						GeeArrayList* _tmp50_;
						PhpToValaSourceParserSourceSpan* _tmp51_;
						PhpToValaSourceParserSourceSpan* _tmp52_;
						gchar* _tmp53_;
#line 246 "../src/source_parser.vala"
						_tmp46_ = parts;
#line 246 "../src/source_parser.vala"
						_tmp47_ = _tmp46_->functions;
#line 246 "../src/source_parser.vala"
						_tmp48_ = local_function;
#line 246 "../src/source_parser.vala"
						gee_abstract_collection_add ((GeeAbstractCollection*) _tmp47_, _tmp48_);
#line 247 "../src/source_parser.vala"
						if (pending_doc_line > 0) {
#line 247 "../src/source_parser.vala"
							_tmp49_ = pending_doc_line;
#line 2625 "source_parser.c"
						} else {
#line 247 "../src/source_parser.vala"
							_tmp49_ = function_start_line;
#line 2629 "source_parser.c"
						}
#line 247 "../src/source_parser.vala"
						_tmp50_ = extracted_spans;
#line 247 "../src/source_parser.vala"
						_tmp51_ = php_to_vala_source_parser_source_span_new (_tmp49_, function_end_line);
#line 247 "../src/source_parser.vala"
						_tmp52_ = _tmp51_;
#line 247 "../src/source_parser.vala"
						gee_abstract_collection_add ((GeeAbstractCollection*) _tmp50_, _tmp52_);
#line 247 "../src/source_parser.vala"
						_g_object_unref0 (_tmp52_);
#line 248 "../src/source_parser.vala"
						_tmp53_ = g_strdup ("");
#line 248 "../src/source_parser.vala"
						_g_free0 (pending_doc_comment);
#line 248 "../src/source_parser.vala"
						pending_doc_comment = _tmp53_;
#line 249 "../src/source_parser.vala"
						pending_doc_line = 0;
#line 250 "../src/source_parser.vala"
						i = function_end_index;
#line 251 "../src/source_parser.vala"
						_g_object_unref0 (local_function);
#line 251 "../src/source_parser.vala"
						_g_object_unref0 (token);
#line 251 "../src/source_parser.vala"
						continue;
#line 2657 "source_parser.c"
					}
#line 240 "../src/source_parser.vala"
					_g_object_unref0 (local_function);
#line 2661 "source_parser.c"
				}
#line 255 "../src/source_parser.vala"
				_tmp54_ = token;
#line 255 "../src/source_parser.vala"
				if (php_to_vala_source_parser_php_source_token_is_symbol (_tmp54_, "{")) {
#line 2667 "source_parser.c"
					gint _tmp55_;
					gchar* _tmp56_;
#line 256 "../src/source_parser.vala"
					_tmp55_ = brace_depth;
#line 256 "../src/source_parser.vala"
					brace_depth = _tmp55_ + 1;
#line 257 "../src/source_parser.vala"
					_tmp56_ = g_strdup ("");
#line 257 "../src/source_parser.vala"
					_g_free0 (pending_doc_comment);
#line 257 "../src/source_parser.vala"
					pending_doc_comment = _tmp56_;
#line 258 "../src/source_parser.vala"
					pending_doc_line = 0;
#line 2682 "source_parser.c"
				} else {
					PhpToValaSourceParserPhpSourceToken* _tmp57_;
#line 259 "../src/source_parser.vala"
					_tmp57_ = token;
#line 259 "../src/source_parser.vala"
					if (php_to_vala_source_parser_php_source_token_is_symbol (_tmp57_, "}")) {
#line 2689 "source_parser.c"
						gint _tmp58_;
						gchar* _tmp59_;
#line 260 "../src/source_parser.vala"
						_tmp58_ = brace_depth;
#line 260 "../src/source_parser.vala"
						brace_depth = _tmp58_ - 1;
#line 261 "../src/source_parser.vala"
						if (brace_depth < 0) {
#line 262 "../src/source_parser.vala"
							brace_depth = 0;
#line 2700 "source_parser.c"
						}
#line 264 "../src/source_parser.vala"
						_tmp59_ = g_strdup ("");
#line 264 "../src/source_parser.vala"
						_g_free0 (pending_doc_comment);
#line 264 "../src/source_parser.vala"
						pending_doc_comment = _tmp59_;
#line 265 "../src/source_parser.vala"
						pending_doc_line = 0;
#line 2710 "source_parser.c"
					} else {
						PhpToValaSourceParserPhpSourceToken* _tmp60_;
#line 266 "../src/source_parser.vala"
						_tmp60_ = token;
#line 266 "../src/source_parser.vala"
						if (!php_to_vala_source_parser_is_ignorable_token (_tmp60_)) {
#line 2717 "source_parser.c"
							gchar* _tmp61_;
#line 267 "../src/source_parser.vala"
							_tmp61_ = g_strdup ("");
#line 267 "../src/source_parser.vala"
							_g_free0 (pending_doc_comment);
#line 267 "../src/source_parser.vala"
							pending_doc_comment = _tmp61_;
#line 268 "../src/source_parser.vala"
							pending_doc_line = 0;
#line 2727 "source_parser.c"
						}
					}
				}
#line 216 "../src/source_parser.vala"
				_g_object_unref0 (token);
#line 2733 "source_parser.c"
			}
		}
	}
#line 272 "../src/source_parser.vala"
	_tmp62_ = parts;
#line 272 "../src/source_parser.vala"
	_tmp63_ = extracted_spans;
#line 272 "../src/source_parser.vala"
	_tmp64_ = php_to_vala_source_parser_build_main_source_without_spans (source, _tmp63_);
#line 272 "../src/source_parser.vala"
	_g_free0 (_tmp62_->main_source);
#line 272 "../src/source_parser.vala"
	_tmp62_->main_source = _tmp64_;
#line 273 "../src/source_parser.vala"
	result = parts;
#line 273 "../src/source_parser.vala"
	_g_free0 (pending_doc_comment);
#line 273 "../src/source_parser.vala"
	_g_object_unref0 (extracted_spans);
#line 273 "../src/source_parser.vala"
	_g_object_unref0 (tokens);
#line 273 "../src/source_parser.vala"
	return result;
#line 2757 "source_parser.c"
}

static GeeArrayList*
php_to_vala_source_parser_tokenize_php_source (const gchar* source_path,
                                               const gchar* source,
                                               GError** error)
{
	gint line_offset = 0;
	gchar* php_source = NULL;
	gchar* _tmp0_;
	gchar* leading = NULL;
	const gchar* _tmp1_;
	gchar* _tmp2_;
	gboolean _tmp3_ = FALSE;
	const gchar* _tmp4_;
	Phpzval* token_list = NULL;
	const gchar* _tmp8_;
	Phpzval* _tmp9_;
	GeeArrayList* tokens = NULL;
	GeeArrayList* _tmp10_;
	gint current_line = 0;
	GError* _inner_error0_ = NULL;
	GeeArrayList* result;
#line 276 "../src/source_parser.vala"
	g_return_val_if_fail (source_path != NULL, NULL);
#line 276 "../src/source_parser.vala"
	g_return_val_if_fail (source != NULL, NULL);
#line 277 "../src/source_parser.vala"
	line_offset = 0;
#line 278 "../src/source_parser.vala"
	_tmp0_ = g_strdup (source);
#line 278 "../src/source_parser.vala"
	php_source = _tmp0_;
#line 279 "../src/source_parser.vala"
	_tmp1_ = php_source;
#line 279 "../src/source_parser.vala"
	_tmp2_ = string_strip (_tmp1_);
#line 279 "../src/source_parser.vala"
	leading = _tmp2_;
#line 280 "../src/source_parser.vala"
	_tmp4_ = leading;
#line 280 "../src/source_parser.vala"
	if (!g_str_has_prefix (_tmp4_, "<?php")) {
#line 2801 "source_parser.c"
		const gchar* _tmp5_;
#line 280 "../src/source_parser.vala"
		_tmp5_ = leading;
#line 280 "../src/source_parser.vala"
		_tmp3_ = !g_str_has_prefix (_tmp5_, "<?");
#line 2807 "source_parser.c"
	} else {
#line 280 "../src/source_parser.vala"
		_tmp3_ = FALSE;
#line 2811 "source_parser.c"
	}
#line 280 "../src/source_parser.vala"
	if (_tmp3_) {
#line 2815 "source_parser.c"
		const gchar* _tmp6_;
		gchar* _tmp7_;
#line 281 "../src/source_parser.vala"
		_tmp6_ = php_source;
#line 281 "../src/source_parser.vala"
		_tmp7_ = g_strconcat ("<?php\n", _tmp6_, NULL);
#line 281 "../src/source_parser.vala"
		_g_free0 (php_source);
#line 281 "../src/source_parser.vala"
		php_source = _tmp7_;
#line 282 "../src/source_parser.vala"
		line_offset = 1;
#line 2828 "source_parser.c"
	}
#line 285 "../src/source_parser.vala"
	_tmp8_ = php_source;
#line 285 "../src/source_parser.vala"
	_tmp9_ = php_embed_token_get_all_zval (_tmp8_, TRUE, source_path, 1, &_inner_error0_);
#line 285 "../src/source_parser.vala"
	token_list = _tmp9_;
#line 285 "../src/source_parser.vala"
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
#line 285 "../src/source_parser.vala"
		g_propagate_error (error, _inner_error0_);
#line 285 "../src/source_parser.vala"
		_g_free0 (leading);
#line 285 "../src/source_parser.vala"
		_g_free0 (php_source);
#line 285 "../src/source_parser.vala"
		return NULL;
#line 2846 "source_parser.c"
	}
#line 286 "../src/source_parser.vala"
	_tmp10_ = gee_array_list_new (PHP_TO_VALA_SOURCE_PARSER_TYPE_PHP_SOURCE_TOKEN, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL);
#line 286 "../src/source_parser.vala"
	tokens = _tmp10_;
#line 287 "../src/source_parser.vala"
	current_line = 1;
#line 2854 "source_parser.c"
	{
		GeeArrayList* _token_value_list = NULL;
		Phpzval* _tmp11_;
		GeeArrayList* _tmp12_;
		gint _token_value_size = 0;
		GeeArrayList* _tmp13_;
		gint _tmp14_;
		gint _tmp15_;
		gint _token_value_index = 0;
#line 289 "../src/source_parser.vala"
		_tmp11_ = token_list;
#line 289 "../src/source_parser.vala"
		_tmp12_ = php_array_values (_tmp11_);
#line 289 "../src/source_parser.vala"
		_token_value_list = _tmp12_;
#line 289 "../src/source_parser.vala"
		_tmp13_ = _token_value_list;
#line 289 "../src/source_parser.vala"
		_tmp14_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp13_);
#line 289 "../src/source_parser.vala"
		_tmp15_ = _tmp14_;
#line 289 "../src/source_parser.vala"
		_token_value_size = _tmp15_;
#line 289 "../src/source_parser.vala"
		_token_value_index = -1;
#line 289 "../src/source_parser.vala"
		while (TRUE) {
#line 2882 "source_parser.c"
			gint _tmp16_;
			gint _tmp17_;
			Phpzval* token_value = NULL;
			GeeArrayList* _tmp18_;
			gpointer _tmp19_;
			gchar* token_name = NULL;
			gchar* token_text = NULL;
			gint token_line = 0;
			Phpzval* _tmp20_;
			gint output_line = 0;
			GeeArrayList* _tmp48_;
			const gchar* _tmp49_;
			const gchar* _tmp50_;
			PhpToValaSourceParserPhpSourceToken* _tmp51_;
			PhpToValaSourceParserPhpSourceToken* _tmp52_;
			const gchar* _tmp53_;
#line 289 "../src/source_parser.vala"
			_token_value_index = _token_value_index + 1;
#line 289 "../src/source_parser.vala"
			_tmp16_ = _token_value_index;
#line 289 "../src/source_parser.vala"
			_tmp17_ = _token_value_size;
#line 289 "../src/source_parser.vala"
			if (!(_tmp16_ < _tmp17_)) {
#line 289 "../src/source_parser.vala"
				break;
#line 2909 "source_parser.c"
			}
#line 289 "../src/source_parser.vala"
			_tmp18_ = _token_value_list;
#line 289 "../src/source_parser.vala"
			_tmp19_ = gee_abstract_list_get ((GeeAbstractList*) _tmp18_, _token_value_index);
#line 289 "../src/source_parser.vala"
			token_value = (Phpzval*) _tmp19_;
#line 294 "../src/source_parser.vala"
			_tmp20_ = token_value;
#line 294 "../src/source_parser.vala"
			if (php_zval_get_value_type (_tmp20_) == PHP_VALUE_TYPE_STRING) {
#line 2921 "source_parser.c"
				Phpzval* _tmp21_;
				gchar* _tmp22_;
				const gchar* _tmp23_;
				gchar* _tmp24_;
#line 295 "../src/source_parser.vala"
				_tmp21_ = token_value;
#line 295 "../src/source_parser.vala"
				_tmp22_ = php_zval_as_string (_tmp21_);
#line 295 "../src/source_parser.vala"
				_g_free0 (token_name);
#line 295 "../src/source_parser.vala"
				token_name = _tmp22_;
#line 296 "../src/source_parser.vala"
				_tmp23_ = token_name;
#line 296 "../src/source_parser.vala"
				_tmp24_ = g_strdup (_tmp23_);
#line 296 "../src/source_parser.vala"
				_g_free0 (token_text);
#line 296 "../src/source_parser.vala"
				token_text = _tmp24_;
#line 297 "../src/source_parser.vala"
				token_line = current_line;
#line 2944 "source_parser.c"
			} else {
				Phpzval* token_id_value = NULL;
				Phpzval* _tmp25_;
				Phpzval* _tmp26_;
				Phpzval* _tmp27_;
				Phpzval* _tmp28_;
				Phpzval* _tmp29_;
				Phpzval* token_text_value = NULL;
				Phpzval* _tmp30_;
				Phpzval* _tmp31_;
				Phpzval* _tmp32_;
				Phpzval* _tmp33_;
				Phpzval* _tmp34_;
				Phpzval* token_line_value = NULL;
				Phpzval* _tmp35_;
				Phpzval* _tmp36_;
				Phpzval* _tmp37_;
				Phpzval* _tmp38_;
				Phpzval* _tmp39_;
				gint token_id = 0;
				Phpzval* _tmp40_;
				gchar* _tmp41_ = NULL;
				Phpzval* _tmp42_;
				gchar* _tmp43_;
				gchar* _tmp44_;
				Phpzval* _tmp45_;
				gchar* _tmp46_;
				Phpzval* _tmp47_;
#line 299 "../src/source_parser.vala"
				_tmp25_ = token_value;
#line 299 "../src/source_parser.vala"
				_tmp26_ = php_zval_integer ((gint64) 0);
#line 299 "../src/source_parser.vala"
				_tmp27_ = _tmp26_;
#line 299 "../src/source_parser.vala"
				_tmp28_ = php_array_get (_tmp25_, _tmp27_);
#line 299 "../src/source_parser.vala"
				_tmp29_ = _tmp28_;
#line 299 "../src/source_parser.vala"
				_php_zval_unref0 (_tmp27_);
#line 299 "../src/source_parser.vala"
				token_id_value = _tmp29_;
#line 300 "../src/source_parser.vala"
				_tmp30_ = token_value;
#line 300 "../src/source_parser.vala"
				_tmp31_ = php_zval_integer ((gint64) 1);
#line 300 "../src/source_parser.vala"
				_tmp32_ = _tmp31_;
#line 300 "../src/source_parser.vala"
				_tmp33_ = php_array_get (_tmp30_, _tmp32_);
#line 300 "../src/source_parser.vala"
				_tmp34_ = _tmp33_;
#line 300 "../src/source_parser.vala"
				_php_zval_unref0 (_tmp32_);
#line 300 "../src/source_parser.vala"
				token_text_value = _tmp34_;
#line 301 "../src/source_parser.vala"
				_tmp35_ = token_value;
#line 301 "../src/source_parser.vala"
				_tmp36_ = php_zval_integer ((gint64) 2);
#line 301 "../src/source_parser.vala"
				_tmp37_ = _tmp36_;
#line 301 "../src/source_parser.vala"
				_tmp38_ = php_array_get (_tmp35_, _tmp37_);
#line 301 "../src/source_parser.vala"
				_tmp39_ = _tmp38_;
#line 301 "../src/source_parser.vala"
				_php_zval_unref0 (_tmp37_);
#line 301 "../src/source_parser.vala"
				token_line_value = _tmp39_;
#line 302 "../src/source_parser.vala"
				_tmp40_ = token_id_value;
#line 302 "../src/source_parser.vala"
				token_id = php_zval_to_int (_tmp40_);
#line 304 "../src/source_parser.vala"
				_tmp42_ = token_line_value;
#line 304 "../src/source_parser.vala"
				_tmp43_ = php_embed_token_name_static (token_id, source_path, php_zval_to_int (_tmp42_), &_inner_error0_);
#line 304 "../src/source_parser.vala"
				_tmp41_ = _tmp43_;
#line 304 "../src/source_parser.vala"
				if (G_UNLIKELY (_inner_error0_ != NULL)) {
#line 304 "../src/source_parser.vala"
					g_propagate_error (error, _inner_error0_);
#line 304 "../src/source_parser.vala"
					_php_zval_unref0 (token_line_value);
#line 304 "../src/source_parser.vala"
					_php_zval_unref0 (token_text_value);
#line 304 "../src/source_parser.vala"
					_php_zval_unref0 (token_id_value);
#line 304 "../src/source_parser.vala"
					_g_free0 (token_text);
#line 304 "../src/source_parser.vala"
					_g_free0 (token_name);
#line 304 "../src/source_parser.vala"
					_php_zval_unref0 (token_value);
#line 304 "../src/source_parser.vala"
					_g_object_unref0 (_token_value_list);
#line 304 "../src/source_parser.vala"
					_g_object_unref0 (tokens);
#line 304 "../src/source_parser.vala"
					_php_zval_unref0 (token_list);
#line 304 "../src/source_parser.vala"
					_g_free0 (leading);
#line 304 "../src/source_parser.vala"
					_g_free0 (php_source);
#line 304 "../src/source_parser.vala"
					return NULL;
#line 3053 "source_parser.c"
				}
#line 304 "../src/source_parser.vala"
				_tmp44_ = _tmp41_;
#line 304 "../src/source_parser.vala"
				_tmp41_ = NULL;
#line 304 "../src/source_parser.vala"
				_g_free0 (token_name);
#line 304 "../src/source_parser.vala"
				token_name = _tmp44_;
#line 305 "../src/source_parser.vala"
				_tmp45_ = token_text_value;
#line 305 "../src/source_parser.vala"
				_tmp46_ = php_zval_to_string (_tmp45_);
#line 305 "../src/source_parser.vala"
				_g_free0 (token_text);
#line 305 "../src/source_parser.vala"
				token_text = _tmp46_;
#line 306 "../src/source_parser.vala"
				_tmp47_ = token_line_value;
#line 306 "../src/source_parser.vala"
				token_line = php_zval_to_int (_tmp47_);
#line 294 "../src/source_parser.vala"
				_g_free0 (_tmp41_);
#line 294 "../src/source_parser.vala"
				_php_zval_unref0 (token_line_value);
#line 294 "../src/source_parser.vala"
				_php_zval_unref0 (token_text_value);
#line 294 "../src/source_parser.vala"
				_php_zval_unref0 (token_id_value);
#line 3083 "source_parser.c"
			}
#line 309 "../src/source_parser.vala"
			output_line = token_line - line_offset;
#line 310 "../src/source_parser.vala"
			if (output_line < 1) {
#line 311 "../src/source_parser.vala"
				output_line = 1;
#line 3091 "source_parser.c"
			}
#line 313 "../src/source_parser.vala"
			_tmp48_ = tokens;
#line 313 "../src/source_parser.vala"
			_tmp49_ = token_name;
#line 313 "../src/source_parser.vala"
			_tmp50_ = token_text;
#line 313 "../src/source_parser.vala"
			_tmp51_ = php_to_vala_source_parser_php_source_token_new (_tmp49_, _tmp50_, output_line);
#line 313 "../src/source_parser.vala"
			_tmp52_ = _tmp51_;
#line 313 "../src/source_parser.vala"
			gee_abstract_collection_add ((GeeAbstractCollection*) _tmp48_, _tmp52_);
#line 313 "../src/source_parser.vala"
			_g_object_unref0 (_tmp52_);
#line 314 "../src/source_parser.vala"
			_tmp53_ = token_text;
#line 314 "../src/source_parser.vala"
			current_line = token_line + php_to_vala_source_parser_count_newlines (_tmp53_);
#line 289 "../src/source_parser.vala"
			_g_free0 (token_text);
#line 289 "../src/source_parser.vala"
			_g_free0 (token_name);
#line 289 "../src/source_parser.vala"
			_php_zval_unref0 (token_value);
#line 3117 "source_parser.c"
		}
#line 289 "../src/source_parser.vala"
		_g_object_unref0 (_token_value_list);
#line 3121 "source_parser.c"
	}
#line 317 "../src/source_parser.vala"
	result = tokens;
#line 317 "../src/source_parser.vala"
	_php_zval_unref0 (token_list);
#line 317 "../src/source_parser.vala"
	_g_free0 (leading);
#line 317 "../src/source_parser.vala"
	_g_free0 (php_source);
#line 317 "../src/source_parser.vala"
	return result;
#line 3133 "source_parser.c"
}

static gchar*
php_to_vala_source_parser_format_token_debug_context (GeeArrayList* tokens,
                                                      gint php_line_number,
                                                      gint context_lines)
{
	gint first_line = 0;
	gint last_line = 0;
	GString* output = NULL;
	GString* _tmp0_;
	GString* _tmp1_;
	gboolean found = FALSE;
	GString* _tmp22_;
	const gchar* _tmp23_;
	gchar* _tmp24_;
	gchar* result;
#line 320 "../src/source_parser.vala"
	g_return_val_if_fail (tokens != NULL, NULL);
#line 321 "../src/source_parser.vala"
	first_line = MAX (1, php_line_number - context_lines);
#line 322 "../src/source_parser.vala"
	last_line = php_line_number + context_lines;
#line 323 "../src/source_parser.vala"
	_tmp0_ = g_string_new ("");
#line 323 "../src/source_parser.vala"
	output = _tmp0_;
#line 324 "../src/source_parser.vala"
	_tmp1_ = output;
#line 324 "../src/source_parser.vala"
	g_string_append_printf (_tmp1_, "PHP tokens near line %d:", php_line_number);
#line 325 "../src/source_parser.vala"
	found = FALSE;
#line 3167 "source_parser.c"
	{
		GeeArrayList* _token_list = NULL;
		gint _token_size = 0;
		GeeArrayList* _tmp2_;
		gint _tmp3_;
		gint _tmp4_;
		gint _token_index = 0;
#line 327 "../src/source_parser.vala"
		_token_list = tokens;
#line 327 "../src/source_parser.vala"
		_tmp2_ = _token_list;
#line 327 "../src/source_parser.vala"
		_tmp3_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp2_);
#line 327 "../src/source_parser.vala"
		_tmp4_ = _tmp3_;
#line 327 "../src/source_parser.vala"
		_token_size = _tmp4_;
#line 327 "../src/source_parser.vala"
		_token_index = -1;
#line 327 "../src/source_parser.vala"
		while (TRUE) {
#line 3189 "source_parser.c"
			gint _tmp5_;
			gint _tmp6_;
			PhpToValaSourceParserPhpSourceToken* token = NULL;
			GeeArrayList* _tmp7_;
			gpointer _tmp8_;
			gboolean _tmp9_ = FALSE;
			PhpToValaSourceParserPhpSourceToken* _tmp10_;
			PhpToValaSourceParserPhpSourceToken* _tmp12_;
			GString* _tmp13_;
			PhpToValaSourceParserPhpSourceToken* _tmp14_;
			PhpToValaSourceParserPhpSourceToken* _tmp15_;
			const gchar* _tmp16_;
			PhpToValaSourceParserPhpSourceToken* _tmp17_;
			const gchar* _tmp18_;
			gchar* _tmp19_;
			gchar* _tmp20_;
#line 327 "../src/source_parser.vala"
			_token_index = _token_index + 1;
#line 327 "../src/source_parser.vala"
			_tmp5_ = _token_index;
#line 327 "../src/source_parser.vala"
			_tmp6_ = _token_size;
#line 327 "../src/source_parser.vala"
			if (!(_tmp5_ < _tmp6_)) {
#line 327 "../src/source_parser.vala"
				break;
#line 3216 "source_parser.c"
			}
#line 327 "../src/source_parser.vala"
			_tmp7_ = _token_list;
#line 327 "../src/source_parser.vala"
			_tmp8_ = gee_abstract_list_get ((GeeAbstractList*) _tmp7_, _token_index);
#line 327 "../src/source_parser.vala"
			token = (PhpToValaSourceParserPhpSourceToken*) _tmp8_;
#line 328 "../src/source_parser.vala"
			_tmp10_ = token;
#line 328 "../src/source_parser.vala"
			if (_tmp10_->line < first_line) {
#line 328 "../src/source_parser.vala"
				_tmp9_ = TRUE;
#line 3230 "source_parser.c"
			} else {
				PhpToValaSourceParserPhpSourceToken* _tmp11_;
#line 328 "../src/source_parser.vala"
				_tmp11_ = token;
#line 328 "../src/source_parser.vala"
				_tmp9_ = _tmp11_->line > last_line;
#line 3237 "source_parser.c"
			}
#line 328 "../src/source_parser.vala"
			if (_tmp9_) {
#line 329 "../src/source_parser.vala"
				_g_object_unref0 (token);
#line 329 "../src/source_parser.vala"
				continue;
#line 3245 "source_parser.c"
			}
#line 331 "../src/source_parser.vala"
			_tmp12_ = token;
#line 331 "../src/source_parser.vala"
			if (php_to_vala_source_parser_php_source_token_is_token (_tmp12_, "T_WHITESPACE")) {
#line 332 "../src/source_parser.vala"
				_g_object_unref0 (token);
#line 332 "../src/source_parser.vala"
				continue;
#line 3255 "source_parser.c"
			}
#line 334 "../src/source_parser.vala"
			found = TRUE;
#line 335 "../src/source_parser.vala"
			_tmp13_ = output;
#line 335 "../src/source_parser.vala"
			_tmp14_ = token;
#line 335 "../src/source_parser.vala"
			_tmp15_ = token;
#line 335 "../src/source_parser.vala"
			_tmp16_ = _tmp15_->name;
#line 335 "../src/source_parser.vala"
			_tmp17_ = token;
#line 335 "../src/source_parser.vala"
			_tmp18_ = _tmp17_->text;
#line 335 "../src/source_parser.vala"
			_tmp19_ = php_to_vala_source_parser_quote_debug_token_text (_tmp18_);
#line 335 "../src/source_parser.vala"
			_tmp20_ = _tmp19_;
#line 335 "../src/source_parser.vala"
			g_string_append_printf (_tmp13_, "\n  %d: %s %s", _tmp14_->line, _tmp16_, _tmp20_);
#line 335 "../src/source_parser.vala"
			_g_free0 (_tmp20_);
#line 327 "../src/source_parser.vala"
			_g_object_unref0 (token);
#line 3281 "source_parser.c"
		}
	}
#line 343 "../src/source_parser.vala"
	if (!found) {
#line 3286 "source_parser.c"
		GString* _tmp21_;
#line 344 "../src/source_parser.vala"
		_tmp21_ = output;
#line 344 "../src/source_parser.vala"
		g_string_append (_tmp21_, " <no non-whitespace tokens>");
#line 3292 "source_parser.c"
	}
#line 346 "../src/source_parser.vala"
	_tmp22_ = output;
#line 346 "../src/source_parser.vala"
	_tmp23_ = _tmp22_->str;
#line 346 "../src/source_parser.vala"
	_tmp24_ = g_strdup (_tmp23_);
#line 346 "../src/source_parser.vala"
	result = _tmp24_;
#line 346 "../src/source_parser.vala"
	_g_string_free0 (output);
#line 346 "../src/source_parser.vala"
	return result;
#line 3306 "source_parser.c"
}

static gchar*
string_replace (const gchar* self,
                const gchar* old,
                const gchar* replacement)
{
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_ = FALSE;
	GError* _inner_error0_ = NULL;
	gchar* result;
#line 1588 "glib-2.0.vapi"
	g_return_val_if_fail (self != NULL, NULL);
#line 1588 "glib-2.0.vapi"
	g_return_val_if_fail (old != NULL, NULL);
#line 1588 "glib-2.0.vapi"
	g_return_val_if_fail (replacement != NULL, NULL);
#line 1589 "glib-2.0.vapi"
	if ((*((gchar*) self)) == '\0') {
#line 1589 "glib-2.0.vapi"
		_tmp1_ = TRUE;
#line 3328 "source_parser.c"
	} else {
#line 1589 "glib-2.0.vapi"
		_tmp1_ = (*((gchar*) old)) == '\0';
#line 3332 "source_parser.c"
	}
#line 1589 "glib-2.0.vapi"
	if (_tmp1_) {
#line 1589 "glib-2.0.vapi"
		_tmp0_ = TRUE;
#line 3338 "source_parser.c"
	} else {
#line 1589 "glib-2.0.vapi"
		_tmp0_ = g_strcmp0 (old, replacement) == 0;
#line 3342 "source_parser.c"
	}
#line 1589 "glib-2.0.vapi"
	if (_tmp0_) {
#line 3346 "source_parser.c"
		gchar* _tmp2_;
#line 1590 "glib-2.0.vapi"
		_tmp2_ = g_strdup (self);
#line 1590 "glib-2.0.vapi"
		result = _tmp2_;
#line 1590 "glib-2.0.vapi"
		return result;
#line 3354 "source_parser.c"
	}
	{
		GRegex* regex = NULL;
		gchar* _tmp3_;
		gchar* _tmp4_;
		GRegex* _tmp5_;
		GRegex* _tmp6_;
		gchar* _tmp7_ = NULL;
		GRegex* _tmp8_;
		gchar* _tmp9_;
		gchar* _tmp10_;
#line 1593 "glib-2.0.vapi"
		_tmp3_ = g_regex_escape_string (old, -1);
#line 1593 "glib-2.0.vapi"
		_tmp4_ = _tmp3_;
#line 1593 "glib-2.0.vapi"
		_tmp5_ = g_regex_new (_tmp4_, 0, 0, &_inner_error0_);
#line 1593 "glib-2.0.vapi"
		_tmp6_ = _tmp5_;
#line 1593 "glib-2.0.vapi"
		_g_free0 (_tmp4_);
#line 1593 "glib-2.0.vapi"
		regex = _tmp6_;
#line 1593 "glib-2.0.vapi"
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
#line 1593 "glib-2.0.vapi"
			if (_inner_error0_->domain == G_REGEX_ERROR) {
#line 3382 "source_parser.c"
				goto __catch0_g_regex_error;
			}
#line 1593 "glib-2.0.vapi"
			g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
#line 1593 "glib-2.0.vapi"
			g_clear_error (&_inner_error0_);
#line 1593 "glib-2.0.vapi"
			return NULL;
#line 3391 "source_parser.c"
		}
#line 1594 "glib-2.0.vapi"
		_tmp8_ = regex;
#line 1594 "glib-2.0.vapi"
		_tmp9_ = g_regex_replace_literal (_tmp8_, self, (gssize) -1, 0, replacement, 0, &_inner_error0_);
#line 1594 "glib-2.0.vapi"
		_tmp7_ = _tmp9_;
#line 1594 "glib-2.0.vapi"
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
#line 1594 "glib-2.0.vapi"
			_g_regex_unref0 (regex);
#line 1594 "glib-2.0.vapi"
			if (_inner_error0_->domain == G_REGEX_ERROR) {
#line 3405 "source_parser.c"
				goto __catch0_g_regex_error;
			}
#line 1594 "glib-2.0.vapi"
			g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
#line 1594 "glib-2.0.vapi"
			g_clear_error (&_inner_error0_);
#line 1594 "glib-2.0.vapi"
			return NULL;
#line 3414 "source_parser.c"
		}
#line 1594 "glib-2.0.vapi"
		_tmp10_ = _tmp7_;
#line 1594 "glib-2.0.vapi"
		_tmp7_ = NULL;
#line 1594 "glib-2.0.vapi"
		result = _tmp10_;
#line 1594 "glib-2.0.vapi"
		_g_free0 (_tmp7_);
#line 1594 "glib-2.0.vapi"
		_g_regex_unref0 (regex);
#line 1594 "glib-2.0.vapi"
		return result;
#line 3428 "source_parser.c"
	}
	goto __finally0;
	__catch0_g_regex_error:
	{
#line 1592 "glib-2.0.vapi"
		g_clear_error (&_inner_error0_);
#line 1596 "glib-2.0.vapi"
		g_assert_not_reached ();
#line 3437 "source_parser.c"
	}
	__finally0:
#line 1592 "glib-2.0.vapi"
	g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
#line 1592 "glib-2.0.vapi"
	g_clear_error (&_inner_error0_);
#line 1592 "glib-2.0.vapi"
	return NULL;
#line 3446 "source_parser.c"
}

static gchar*
php_to_vala_source_parser_quote_debug_token_text (const gchar* text)
{
	gchar* escaped = NULL;
	gchar* _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
	gchar* _tmp4_;
	gchar* _tmp5_;
	gchar* _tmp6_;
	gchar* _tmp7_;
	gchar* _tmp8_;
	gchar* _tmp9_;
	const gchar* _tmp10_;
	gint _tmp11_;
	gint _tmp12_;
	const gchar* _tmp17_;
	gchar* _tmp18_;
	gchar* result;
#line 349 "../src/source_parser.vala"
	g_return_val_if_fail (text != NULL, NULL);
#line 350 "../src/source_parser.vala"
	_tmp0_ = string_replace (text, "\\", "\\\\");
#line 350 "../src/source_parser.vala"
	_tmp1_ = _tmp0_;
#line 350 "../src/source_parser.vala"
	_tmp2_ = string_replace (_tmp1_, "\n", "\\n");
#line 350 "../src/source_parser.vala"
	_tmp3_ = _tmp2_;
#line 350 "../src/source_parser.vala"
	_tmp4_ = string_replace (_tmp3_, "\r", "\\r");
#line 350 "../src/source_parser.vala"
	_tmp5_ = _tmp4_;
#line 350 "../src/source_parser.vala"
	_tmp6_ = string_replace (_tmp5_, "\t", "\\t");
#line 350 "../src/source_parser.vala"
	_tmp7_ = _tmp6_;
#line 350 "../src/source_parser.vala"
	_tmp8_ = string_replace (_tmp7_, "\"", "\\\"");
#line 350 "../src/source_parser.vala"
	_tmp9_ = _tmp8_;
#line 350 "../src/source_parser.vala"
	_g_free0 (_tmp7_);
#line 350 "../src/source_parser.vala"
	_g_free0 (_tmp5_);
#line 350 "../src/source_parser.vala"
	_g_free0 (_tmp3_);
#line 350 "../src/source_parser.vala"
	_g_free0 (_tmp1_);
#line 350 "../src/source_parser.vala"
	escaped = _tmp9_;
#line 356 "../src/source_parser.vala"
	_tmp10_ = escaped;
#line 356 "../src/source_parser.vala"
	_tmp11_ = strlen (_tmp10_);
#line 356 "../src/source_parser.vala"
	_tmp12_ = _tmp11_;
#line 356 "../src/source_parser.vala"
	if (_tmp12_ > 80) {
#line 3509 "source_parser.c"
		const gchar* _tmp13_;
		gchar* _tmp14_;
		gchar* _tmp15_;
		gchar* _tmp16_;
#line 357 "../src/source_parser.vala"
		_tmp13_ = escaped;
#line 357 "../src/source_parser.vala"
		_tmp14_ = string_substring (_tmp13_, (glong) 0, (glong) 77);
#line 357 "../src/source_parser.vala"
		_tmp15_ = _tmp14_;
#line 357 "../src/source_parser.vala"
		_tmp16_ = g_strconcat (_tmp15_, "...", NULL);
#line 357 "../src/source_parser.vala"
		_g_free0 (escaped);
#line 357 "../src/source_parser.vala"
		escaped = _tmp16_;
#line 357 "../src/source_parser.vala"
		_g_free0 (_tmp15_);
#line 3528 "source_parser.c"
	}
#line 359 "../src/source_parser.vala"
	_tmp17_ = escaped;
#line 359 "../src/source_parser.vala"
	_tmp18_ = g_strdup_printf ("\"%s\"", _tmp17_);
#line 359 "../src/source_parser.vala"
	result = _tmp18_;
#line 359 "../src/source_parser.vala"
	_g_free0 (escaped);
#line 359 "../src/source_parser.vala"
	return result;
#line 3540 "source_parser.c"
}

static gboolean
php_to_vala_source_parser_is_class_token (GeeArrayList* tokens,
                                          gint index)
{
	PhpToValaSourceParserPhpSourceToken* token = NULL;
	gpointer _tmp0_;
	PhpToValaSourceParserPhpSourceToken* _tmp1_;
	PhpToValaSourceParserPhpSourceToken* _tmp2_;
	gint next = 0;
	gint _tmp3_;
	gint _tmp4_;
	gboolean _tmp5_ = FALSE;
	gboolean result;
#line 362 "../src/source_parser.vala"
	g_return_val_if_fail (tokens != NULL, FALSE);
#line 363 "../src/source_parser.vala"
	_tmp0_ = gee_abstract_list_get ((GeeAbstractList*) tokens, index);
#line 363 "../src/source_parser.vala"
	token = (PhpToValaSourceParserPhpSourceToken*) _tmp0_;
#line 364 "../src/source_parser.vala"
	_tmp1_ = token;
#line 364 "../src/source_parser.vala"
	if (php_to_vala_source_parser_php_source_token_is_token (_tmp1_, "T_CLASS")) {
#line 365 "../src/source_parser.vala"
		result = TRUE;
#line 365 "../src/source_parser.vala"
		_g_object_unref0 (token);
#line 365 "../src/source_parser.vala"
		return result;
#line 3572 "source_parser.c"
	}
#line 367 "../src/source_parser.vala"
	_tmp2_ = token;
#line 367 "../src/source_parser.vala"
	if (!php_to_vala_source_parser_php_source_token_is_token (_tmp2_, "T_ABSTRACT")) {
#line 368 "../src/source_parser.vala"
		result = FALSE;
#line 368 "../src/source_parser.vala"
		_g_object_unref0 (token);
#line 368 "../src/source_parser.vala"
		return result;
#line 3584 "source_parser.c"
	}
#line 370 "../src/source_parser.vala"
	_tmp3_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) tokens);
#line 370 "../src/source_parser.vala"
	_tmp4_ = _tmp3_;
#line 370 "../src/source_parser.vala"
	next = php_to_vala_source_parser_next_significant_token_index (tokens, index + 1, _tmp4_);
#line 371 "../src/source_parser.vala"
	if (next >= 0) {
#line 3594 "source_parser.c"
		gpointer _tmp6_;
		PhpToValaSourceParserPhpSourceToken* _tmp7_;
#line 371 "../src/source_parser.vala"
		_tmp6_ = gee_abstract_list_get ((GeeAbstractList*) tokens, next);
#line 371 "../src/source_parser.vala"
		_tmp7_ = (PhpToValaSourceParserPhpSourceToken*) _tmp6_;
#line 371 "../src/source_parser.vala"
		_tmp5_ = php_to_vala_source_parser_php_source_token_is_token (_tmp7_, "T_CLASS");
#line 371 "../src/source_parser.vala"
		_g_object_unref0 (_tmp7_);
#line 3605 "source_parser.c"
	} else {
#line 371 "../src/source_parser.vala"
		_tmp5_ = FALSE;
#line 3609 "source_parser.c"
	}
#line 371 "../src/source_parser.vala"
	result = _tmp5_;
#line 371 "../src/source_parser.vala"
	_g_object_unref0 (token);
#line 371 "../src/source_parser.vala"
	return result;
#line 3617 "source_parser.c"
}

static PhpClass*
php_to_vala_source_parser_parse_php_class_from_tokens (const gchar* source_path,
                                                       GeeArrayList* tokens,
                                                       gint class_token_index,
                                                       const gchar* doc_comment,
                                                       gint* class_end_index,
                                                       gint* class_start_line,
                                                       gint* class_end_line,
                                                       GError** error)
{
	gint _vala_class_end_index = 0;
	gint _vala_class_start_line = 0;
	gint _vala_class_end_line = 0;
	gpointer _tmp0_;
	PhpToValaSourceParserPhpSourceToken* _tmp1_;
	gint _tmp2_ = 0;
	gpointer _tmp3_;
	PhpToValaSourceParserPhpSourceToken* _tmp4_;
	gboolean _tmp5_;
	gint class_index = 0;
	gboolean _tmp8_ = FALSE;
	gint name_index = 0;
	gint _tmp11_;
	gint _tmp12_;
	gboolean _tmp13_ = FALSE;
	gchar* class_name = NULL;
	gpointer _tmp16_;
	PhpToValaSourceParserPhpSourceToken* _tmp17_;
	const gchar* _tmp18_;
	gchar* _tmp19_;
	gchar* _tmp20_;
	gchar* extends_name = NULL;
	gchar* _tmp21_;
	gint open_brace_index = 0;
	gint close_brace_index = 0;
	gint _tmp35_;
	gint _tmp36_;
	PhpClass* php_class = NULL;
	const gchar* _tmp42_;
	gpointer _tmp43_;
	PhpToValaSourceParserPhpSourceToken* _tmp44_;
	const gchar* _tmp45_;
	PhpClass* _tmp46_;
	PhpClass* _tmp47_;
	PhpClass* _tmp48_;
	gpointer _tmp49_;
	PhpToValaSourceParserPhpSourceToken* _tmp50_;
	gpointer _tmp51_;
	PhpToValaSourceParserPhpSourceToken* _tmp52_;
	GError* _inner_error0_ = NULL;
	PhpClass* result;
#line 374 "../src/source_parser.vala"
	g_return_val_if_fail (source_path != NULL, NULL);
#line 374 "../src/source_parser.vala"
	g_return_val_if_fail (tokens != NULL, NULL);
#line 374 "../src/source_parser.vala"
	g_return_val_if_fail (doc_comment != NULL, NULL);
#line 375 "../src/source_parser.vala"
	_vala_class_end_index = class_token_index;
#line 376 "../src/source_parser.vala"
	_tmp0_ = gee_abstract_list_get ((GeeAbstractList*) tokens, class_token_index);
#line 376 "../src/source_parser.vala"
	_tmp1_ = (PhpToValaSourceParserPhpSourceToken*) _tmp0_;
#line 376 "../src/source_parser.vala"
	_vala_class_start_line = _tmp1_->line;
#line 376 "../src/source_parser.vala"
	_g_object_unref0 (_tmp1_);
#line 377 "../src/source_parser.vala"
	_vala_class_end_line = _vala_class_start_line;
#line 379 "../src/source_parser.vala"
	_tmp3_ = gee_abstract_list_get ((GeeAbstractList*) tokens, class_token_index);
#line 379 "../src/source_parser.vala"
	_tmp4_ = (PhpToValaSourceParserPhpSourceToken*) _tmp3_;
#line 379 "../src/source_parser.vala"
	_tmp5_ = php_to_vala_source_parser_php_source_token_is_token (_tmp4_, "T_CLASS");
#line 379 "../src/source_parser.vala"
	_g_object_unref0 (_tmp4_);
#line 379 "../src/source_parser.vala"
	if (_tmp5_) {
#line 380 "../src/source_parser.vala"
		_tmp2_ = class_token_index;
#line 3701 "source_parser.c"
	} else {
		gint _tmp6_;
		gint _tmp7_;
#line 381 "../src/source_parser.vala"
		_tmp6_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) tokens);
#line 381 "../src/source_parser.vala"
		_tmp7_ = _tmp6_;
#line 381 "../src/source_parser.vala"
		_tmp2_ = php_to_vala_source_parser_next_significant_token_index (tokens, class_token_index + 1, _tmp7_);
#line 3711 "source_parser.c"
	}
#line 379 "../src/source_parser.vala"
	class_index = _tmp2_;
#line 382 "../src/source_parser.vala"
	if (class_index < 0) {
#line 382 "../src/source_parser.vala"
		_tmp8_ = TRUE;
#line 3719 "source_parser.c"
	} else {
		gpointer _tmp9_;
		PhpToValaSourceParserPhpSourceToken* _tmp10_;
#line 382 "../src/source_parser.vala"
		_tmp9_ = gee_abstract_list_get ((GeeAbstractList*) tokens, class_index);
#line 382 "../src/source_parser.vala"
		_tmp10_ = (PhpToValaSourceParserPhpSourceToken*) _tmp9_;
#line 382 "../src/source_parser.vala"
		_tmp8_ = !php_to_vala_source_parser_php_source_token_is_token (_tmp10_, "T_CLASS");
#line 382 "../src/source_parser.vala"
		_g_object_unref0 (_tmp10_);
#line 3731 "source_parser.c"
	}
#line 382 "../src/source_parser.vala"
	if (_tmp8_) {
#line 383 "../src/source_parser.vala"
		result = NULL;
#line 383 "../src/source_parser.vala"
		if (class_end_index) {
#line 383 "../src/source_parser.vala"
			*class_end_index = _vala_class_end_index;
#line 3741 "source_parser.c"
		}
#line 383 "../src/source_parser.vala"
		if (class_start_line) {
#line 383 "../src/source_parser.vala"
			*class_start_line = _vala_class_start_line;
#line 3747 "source_parser.c"
		}
#line 383 "../src/source_parser.vala"
		if (class_end_line) {
#line 383 "../src/source_parser.vala"
			*class_end_line = _vala_class_end_line;
#line 3753 "source_parser.c"
		}
#line 383 "../src/source_parser.vala"
		return result;
#line 3757 "source_parser.c"
	}
#line 386 "../src/source_parser.vala"
	_tmp11_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) tokens);
#line 386 "../src/source_parser.vala"
	_tmp12_ = _tmp11_;
#line 386 "../src/source_parser.vala"
	name_index = php_to_vala_source_parser_next_significant_token_index (tokens, class_index + 1, _tmp12_);
#line 387 "../src/source_parser.vala"
	if (name_index < 0) {
#line 387 "../src/source_parser.vala"
		_tmp13_ = TRUE;
#line 3769 "source_parser.c"
	} else {
		gpointer _tmp14_;
		PhpToValaSourceParserPhpSourceToken* _tmp15_;
#line 387 "../src/source_parser.vala"
		_tmp14_ = gee_abstract_list_get ((GeeAbstractList*) tokens, name_index);
#line 387 "../src/source_parser.vala"
		_tmp15_ = (PhpToValaSourceParserPhpSourceToken*) _tmp14_;
#line 387 "../src/source_parser.vala"
		_tmp13_ = !php_to_vala_source_parser_php_source_token_is_token (_tmp15_, "T_STRING");
#line 387 "../src/source_parser.vala"
		_g_object_unref0 (_tmp15_);
#line 3781 "source_parser.c"
	}
#line 387 "../src/source_parser.vala"
	if (_tmp13_) {
#line 388 "../src/source_parser.vala"
		result = NULL;
#line 388 "../src/source_parser.vala"
		if (class_end_index) {
#line 388 "../src/source_parser.vala"
			*class_end_index = _vala_class_end_index;
#line 3791 "source_parser.c"
		}
#line 388 "../src/source_parser.vala"
		if (class_start_line) {
#line 388 "../src/source_parser.vala"
			*class_start_line = _vala_class_start_line;
#line 3797 "source_parser.c"
		}
#line 388 "../src/source_parser.vala"
		if (class_end_line) {
#line 388 "../src/source_parser.vala"
			*class_end_line = _vala_class_end_line;
#line 3803 "source_parser.c"
		}
#line 388 "../src/source_parser.vala"
		return result;
#line 3807 "source_parser.c"
	}
#line 391 "../src/source_parser.vala"
	_tmp16_ = gee_abstract_list_get ((GeeAbstractList*) tokens, name_index);
#line 391 "../src/source_parser.vala"
	_tmp17_ = (PhpToValaSourceParserPhpSourceToken*) _tmp16_;
#line 391 "../src/source_parser.vala"
	_tmp18_ = _tmp17_->text;
#line 391 "../src/source_parser.vala"
	_tmp19_ = g_strdup (_tmp18_);
#line 391 "../src/source_parser.vala"
	_tmp20_ = _tmp19_;
#line 391 "../src/source_parser.vala"
	_g_object_unref0 (_tmp17_);
#line 391 "../src/source_parser.vala"
	class_name = _tmp20_;
#line 392 "../src/source_parser.vala"
	_tmp21_ = g_strdup ("");
#line 392 "../src/source_parser.vala"
	extends_name = _tmp21_;
#line 393 "../src/source_parser.vala"
	open_brace_index = -1;
#line 3829 "source_parser.c"
	{
		gint i = 0;
#line 394 "../src/source_parser.vala"
		i = name_index + 1;
#line 3834 "source_parser.c"
		{
			gboolean _tmp22_ = FALSE;
#line 394 "../src/source_parser.vala"
			_tmp22_ = TRUE;
#line 394 "../src/source_parser.vala"
			while (TRUE) {
#line 3841 "source_parser.c"
				gint _tmp24_;
				gint _tmp25_;
				gpointer _tmp26_;
				PhpToValaSourceParserPhpSourceToken* _tmp27_;
				gboolean _tmp28_;
				gpointer _tmp29_;
				PhpToValaSourceParserPhpSourceToken* _tmp30_;
				gboolean _tmp31_;
#line 394 "../src/source_parser.vala"
				if (!_tmp22_) {
#line 3852 "source_parser.c"
					gint _tmp23_;
#line 394 "../src/source_parser.vala"
					_tmp23_ = i;
#line 394 "../src/source_parser.vala"
					i = _tmp23_ + 1;
#line 3858 "source_parser.c"
				}
#line 394 "../src/source_parser.vala"
				_tmp22_ = FALSE;
#line 394 "../src/source_parser.vala"
				_tmp24_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) tokens);
#line 394 "../src/source_parser.vala"
				_tmp25_ = _tmp24_;
#line 394 "../src/source_parser.vala"
				if (!(i < _tmp25_)) {
#line 394 "../src/source_parser.vala"
					break;
#line 3870 "source_parser.c"
				}
#line 395 "../src/source_parser.vala"
				_tmp26_ = gee_abstract_list_get ((GeeAbstractList*) tokens, i);
#line 395 "../src/source_parser.vala"
				_tmp27_ = (PhpToValaSourceParserPhpSourceToken*) _tmp26_;
#line 395 "../src/source_parser.vala"
				_tmp28_ = php_to_vala_source_parser_php_source_token_is_symbol (_tmp27_, "{");
#line 395 "../src/source_parser.vala"
				_g_object_unref0 (_tmp27_);
#line 395 "../src/source_parser.vala"
				if (_tmp28_) {
#line 396 "../src/source_parser.vala"
					open_brace_index = i;
#line 397 "../src/source_parser.vala"
					break;
#line 3886 "source_parser.c"
				}
#line 399 "../src/source_parser.vala"
				_tmp29_ = gee_abstract_list_get ((GeeAbstractList*) tokens, i);
#line 399 "../src/source_parser.vala"
				_tmp30_ = (PhpToValaSourceParserPhpSourceToken*) _tmp29_;
#line 399 "../src/source_parser.vala"
				_tmp31_ = php_to_vala_source_parser_php_source_token_is_token (_tmp30_, "T_EXTENDS");
#line 399 "../src/source_parser.vala"
				_g_object_unref0 (_tmp30_);
#line 399 "../src/source_parser.vala"
				if (_tmp31_) {
#line 3898 "source_parser.c"
					gint extends_index = 0;
					gint _tmp32_;
					gint _tmp33_;
#line 400 "../src/source_parser.vala"
					_tmp32_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) tokens);
#line 400 "../src/source_parser.vala"
					_tmp33_ = _tmp32_;
#line 400 "../src/source_parser.vala"
					extends_index = php_to_vala_source_parser_next_significant_token_index (tokens, i + 1, _tmp33_);
#line 401 "../src/source_parser.vala"
					if (extends_index >= 0) {
#line 3910 "source_parser.c"
						gchar* _tmp34_;
#line 402 "../src/source_parser.vala"
						_tmp34_ = php_to_vala_source_parser_collect_name_tokens (tokens, extends_index);
#line 402 "../src/source_parser.vala"
						_g_free0 (extends_name);
#line 402 "../src/source_parser.vala"
						extends_name = _tmp34_;
#line 3918 "source_parser.c"
					}
				}
			}
		}
	}
#line 406 "../src/source_parser.vala"
	if (open_brace_index < 0) {
#line 407 "../src/source_parser.vala"
		result = NULL;
#line 407 "../src/source_parser.vala"
		_g_free0 (extends_name);
#line 407 "../src/source_parser.vala"
		_g_free0 (class_name);
#line 407 "../src/source_parser.vala"
		if (class_end_index) {
#line 407 "../src/source_parser.vala"
			*class_end_index = _vala_class_end_index;
#line 3936 "source_parser.c"
		}
#line 407 "../src/source_parser.vala"
		if (class_start_line) {
#line 407 "../src/source_parser.vala"
			*class_start_line = _vala_class_start_line;
#line 3942 "source_parser.c"
		}
#line 407 "../src/source_parser.vala"
		if (class_end_line) {
#line 407 "../src/source_parser.vala"
			*class_end_line = _vala_class_end_line;
#line 3948 "source_parser.c"
		}
#line 407 "../src/source_parser.vala"
		return result;
#line 3952 "source_parser.c"
	}
#line 410 "../src/source_parser.vala"
	_tmp35_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) tokens);
#line 410 "../src/source_parser.vala"
	_tmp36_ = _tmp35_;
#line 410 "../src/source_parser.vala"
	close_brace_index = php_to_vala_source_parser_find_matching_brace_token (tokens, open_brace_index, _tmp36_);
#line 411 "../src/source_parser.vala"
	if (close_brace_index < 0) {
#line 3962 "source_parser.c"
		const gchar* _tmp37_;
		gpointer _tmp38_;
		PhpToValaSourceParserPhpSourceToken* _tmp39_;
		GError* _tmp40_;
		GError* _tmp41_;
#line 412 "../src/source_parser.vala"
		_tmp37_ = class_name;
#line 412 "../src/source_parser.vala"
		_tmp38_ = gee_abstract_list_get ((GeeAbstractList*) tokens, class_index);
#line 412 "../src/source_parser.vala"
		_tmp39_ = (PhpToValaSourceParserPhpSourceToken*) _tmp38_;
#line 412 "../src/source_parser.vala"
		_tmp40_ = g_error_new (PHP_TO_VALA_ERROR, PHP_TO_VALA_ERROR_UNSUPPORTED, "Unclosed PHP class '%s' at %s:%d", _tmp37_, source_path, _tmp39_->line);
#line 412 "../src/source_parser.vala"
		_tmp41_ = _tmp40_;
#line 412 "../src/source_parser.vala"
		_g_object_unref0 (_tmp39_);
#line 412 "../src/source_parser.vala"
		_inner_error0_ = _tmp41_;
#line 412 "../src/source_parser.vala"
		g_propagate_error (error, _inner_error0_);
#line 412 "../src/source_parser.vala"
		_g_free0 (extends_name);
#line 412 "../src/source_parser.vala"
		_g_free0 (class_name);
#line 412 "../src/source_parser.vala"
		return NULL;
#line 3990 "source_parser.c"
	}
#line 420 "../src/source_parser.vala"
	_tmp42_ = class_name;
#line 420 "../src/source_parser.vala"
	_tmp43_ = gee_abstract_list_get ((GeeAbstractList*) tokens, class_index);
#line 420 "../src/source_parser.vala"
	_tmp44_ = (PhpToValaSourceParserPhpSourceToken*) _tmp43_;
#line 420 "../src/source_parser.vala"
	_tmp45_ = extends_name;
#line 420 "../src/source_parser.vala"
	_tmp46_ = phpclass_new (_tmp42_, _tmp44_->line, doc_comment, _tmp45_);
#line 420 "../src/source_parser.vala"
	_tmp47_ = _tmp46_;
#line 420 "../src/source_parser.vala"
	_g_object_unref0 (_tmp44_);
#line 420 "../src/source_parser.vala"
	php_class = _tmp47_;
#line 421 "../src/source_parser.vala"
	_tmp48_ = php_class;
#line 421 "../src/source_parser.vala"
	php_to_vala_source_parser_parse_class_methods_from_tokens (source_path, tokens, open_brace_index + 1, close_brace_index, _tmp48_, &_inner_error0_);
#line 421 "../src/source_parser.vala"
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
#line 421 "../src/source_parser.vala"
		g_propagate_error (error, _inner_error0_);
#line 421 "../src/source_parser.vala"
		_g_object_unref0 (php_class);
#line 421 "../src/source_parser.vala"
		_g_free0 (extends_name);
#line 421 "../src/source_parser.vala"
		_g_free0 (class_name);
#line 421 "../src/source_parser.vala"
		return NULL;
#line 4024 "source_parser.c"
	}
#line 423 "../src/source_parser.vala"
	_vala_class_end_index = close_brace_index;
#line 424 "../src/source_parser.vala"
	_tmp49_ = gee_abstract_list_get ((GeeAbstractList*) tokens, class_token_index);
#line 424 "../src/source_parser.vala"
	_tmp50_ = (PhpToValaSourceParserPhpSourceToken*) _tmp49_;
#line 424 "../src/source_parser.vala"
	_vala_class_start_line = _tmp50_->line;
#line 424 "../src/source_parser.vala"
	_g_object_unref0 (_tmp50_);
#line 425 "../src/source_parser.vala"
	_tmp51_ = gee_abstract_list_get ((GeeAbstractList*) tokens, close_brace_index);
#line 425 "../src/source_parser.vala"
	_tmp52_ = (PhpToValaSourceParserPhpSourceToken*) _tmp51_;
#line 425 "../src/source_parser.vala"
	_vala_class_end_line = _tmp52_->line;
#line 425 "../src/source_parser.vala"
	_g_object_unref0 (_tmp52_);
#line 426 "../src/source_parser.vala"
	result = php_class;
#line 426 "../src/source_parser.vala"
	_g_free0 (extends_name);
#line 426 "../src/source_parser.vala"
	_g_free0 (class_name);
#line 426 "../src/source_parser.vala"
	if (class_end_index) {
#line 426 "../src/source_parser.vala"
		*class_end_index = _vala_class_end_index;
#line 4054 "source_parser.c"
	}
#line 426 "../src/source_parser.vala"
	if (class_start_line) {
#line 426 "../src/source_parser.vala"
		*class_start_line = _vala_class_start_line;
#line 4060 "source_parser.c"
	}
#line 426 "../src/source_parser.vala"
	if (class_end_line) {
#line 426 "../src/source_parser.vala"
		*class_end_line = _vala_class_end_line;
#line 4066 "source_parser.c"
	}
#line 426 "../src/source_parser.vala"
	return result;
#line 4070 "source_parser.c"
}

static void
php_to_vala_source_parser_parse_class_methods_from_tokens (const gchar* source_path,
                                                           GeeArrayList* tokens,
                                                           gint start_index,
                                                           gint end_index,
                                                           PhpClass* php_class,
                                                           GError** error)
{
	gint depth = 0;
	gchar* pending_doc_comment = NULL;
	gchar* _tmp0_;
	GError* _inner_error0_ = NULL;
#line 429 "../src/source_parser.vala"
	g_return_if_fail (source_path != NULL);
#line 429 "../src/source_parser.vala"
	g_return_if_fail (tokens != NULL);
#line 429 "../src/source_parser.vala"
	g_return_if_fail (php_class != NULL);
#line 430 "../src/source_parser.vala"
	depth = 1;
#line 431 "../src/source_parser.vala"
	_tmp0_ = g_strdup ("");
#line 431 "../src/source_parser.vala"
	pending_doc_comment = _tmp0_;
#line 4097 "source_parser.c"
	{
		gint i = 0;
#line 433 "../src/source_parser.vala"
		i = start_index;
#line 4102 "source_parser.c"
		{
			gboolean _tmp1_ = FALSE;
#line 433 "../src/source_parser.vala"
			_tmp1_ = TRUE;
#line 433 "../src/source_parser.vala"
			while (TRUE) {
#line 4109 "source_parser.c"
				PhpToValaSourceParserPhpSourceToken* token = NULL;
				gpointer _tmp3_;
				gboolean _tmp4_ = FALSE;
				gboolean _tmp9_ = FALSE;
				PhpToValaSourceParserPhpSourceToken* _tmp20_;
#line 433 "../src/source_parser.vala"
				if (!_tmp1_) {
#line 4117 "source_parser.c"
					gint _tmp2_;
#line 433 "../src/source_parser.vala"
					_tmp2_ = i;
#line 433 "../src/source_parser.vala"
					i = _tmp2_ + 1;
#line 4123 "source_parser.c"
				}
#line 433 "../src/source_parser.vala"
				_tmp1_ = FALSE;
#line 433 "../src/source_parser.vala"
				if (!(i < end_index)) {
#line 433 "../src/source_parser.vala"
					break;
#line 4131 "source_parser.c"
				}
#line 434 "../src/source_parser.vala"
				_tmp3_ = gee_abstract_list_get ((GeeAbstractList*) tokens, i);
#line 434 "../src/source_parser.vala"
				token = (PhpToValaSourceParserPhpSourceToken*) _tmp3_;
#line 435 "../src/source_parser.vala"
				if (depth == 1) {
#line 4139 "source_parser.c"
					PhpToValaSourceParserPhpSourceToken* _tmp5_;
#line 435 "../src/source_parser.vala"
					_tmp5_ = token;
#line 435 "../src/source_parser.vala"
					_tmp4_ = php_to_vala_source_parser_php_source_token_is_token (_tmp5_, "T_DOC_COMMENT");
#line 4145 "source_parser.c"
				} else {
#line 435 "../src/source_parser.vala"
					_tmp4_ = FALSE;
#line 4149 "source_parser.c"
				}
#line 435 "../src/source_parser.vala"
				if (_tmp4_) {
#line 4153 "source_parser.c"
					PhpToValaSourceParserPhpSourceToken* _tmp6_;
					const gchar* _tmp7_;
					gchar* _tmp8_;
#line 436 "../src/source_parser.vala"
					_tmp6_ = token;
#line 436 "../src/source_parser.vala"
					_tmp7_ = _tmp6_->text;
#line 436 "../src/source_parser.vala"
					_tmp8_ = g_strdup (_tmp7_);
#line 436 "../src/source_parser.vala"
					_g_free0 (pending_doc_comment);
#line 436 "../src/source_parser.vala"
					pending_doc_comment = _tmp8_;
#line 437 "../src/source_parser.vala"
					_g_object_unref0 (token);
#line 437 "../src/source_parser.vala"
					continue;
#line 4171 "source_parser.c"
				}
#line 439 "../src/source_parser.vala"
				if (depth == 1) {
#line 4175 "source_parser.c"
					PhpToValaSourceParserPhpSourceToken* _tmp10_;
#line 439 "../src/source_parser.vala"
					_tmp10_ = token;
#line 439 "../src/source_parser.vala"
					_tmp9_ = php_to_vala_source_parser_php_source_token_is_token (_tmp10_, "T_FUNCTION");
#line 4181 "source_parser.c"
				} else {
#line 439 "../src/source_parser.vala"
					_tmp9_ = FALSE;
#line 4185 "source_parser.c"
				}
#line 439 "../src/source_parser.vala"
				if (_tmp9_) {
#line 4189 "source_parser.c"
					gboolean is_static = FALSE;
					gint method_end_index = 0;
					gint method_start_line = 0;
					gint method_end_line = 0;
					LocalFunction* method = NULL;
					const gchar* _tmp11_;
					gint _tmp12_ = 0;
					gint _tmp13_ = 0;
					gint _tmp14_ = 0;
					LocalFunction* _tmp15_;
					LocalFunction* _tmp16_;
#line 440 "../src/source_parser.vala"
					is_static = php_to_vala_source_parser_previous_method_modifiers_contain_static (tokens, start_index, i);
#line 444 "../src/source_parser.vala"
					_tmp11_ = pending_doc_comment;
#line 444 "../src/source_parser.vala"
					_tmp15_ = php_to_vala_source_parser_parse_local_function_from_tokens (source_path, tokens, i, end_index, is_static, _tmp11_, &_tmp12_, &_tmp13_, &_tmp14_, &_inner_error0_);
#line 444 "../src/source_parser.vala"
					method_end_index = _tmp12_;
#line 444 "../src/source_parser.vala"
					method_start_line = _tmp13_;
#line 444 "../src/source_parser.vala"
					method_end_line = _tmp14_;
#line 444 "../src/source_parser.vala"
					method = _tmp15_;
#line 444 "../src/source_parser.vala"
					if (G_UNLIKELY (_inner_error0_ != NULL)) {
#line 444 "../src/source_parser.vala"
						g_propagate_error (error, _inner_error0_);
#line 444 "../src/source_parser.vala"
						_g_object_unref0 (token);
#line 444 "../src/source_parser.vala"
						_g_free0 (pending_doc_comment);
#line 444 "../src/source_parser.vala"
						return;
#line 4225 "source_parser.c"
					}
#line 445 "../src/source_parser.vala"
					_tmp16_ = method;
#line 445 "../src/source_parser.vala"
					if (_tmp16_ != NULL) {
#line 4231 "source_parser.c"
						GeeArrayList* _tmp17_;
						LocalFunction* _tmp18_;
						gchar* _tmp19_;
#line 446 "../src/source_parser.vala"
						_tmp17_ = php_class->methods;
#line 446 "../src/source_parser.vala"
						_tmp18_ = method;
#line 446 "../src/source_parser.vala"
						gee_abstract_collection_add ((GeeAbstractCollection*) _tmp17_, _tmp18_);
#line 447 "../src/source_parser.vala"
						_tmp19_ = g_strdup ("");
#line 447 "../src/source_parser.vala"
						_g_free0 (pending_doc_comment);
#line 447 "../src/source_parser.vala"
						pending_doc_comment = _tmp19_;
#line 448 "../src/source_parser.vala"
						i = method_end_index;
#line 449 "../src/source_parser.vala"
						_g_object_unref0 (method);
#line 449 "../src/source_parser.vala"
						_g_object_unref0 (token);
#line 449 "../src/source_parser.vala"
						continue;
#line 4255 "source_parser.c"
					}
#line 439 "../src/source_parser.vala"
					_g_object_unref0 (method);
#line 4259 "source_parser.c"
				}
#line 452 "../src/source_parser.vala"
				_tmp20_ = token;
#line 452 "../src/source_parser.vala"
				if (php_to_vala_source_parser_php_source_token_is_symbol (_tmp20_, "{")) {
#line 4265 "source_parser.c"
					gint _tmp21_;
					gchar* _tmp22_;
#line 453 "../src/source_parser.vala"
					_tmp21_ = depth;
#line 453 "../src/source_parser.vala"
					depth = _tmp21_ + 1;
#line 454 "../src/source_parser.vala"
					_tmp22_ = g_strdup ("");
#line 454 "../src/source_parser.vala"
					_g_free0 (pending_doc_comment);
#line 454 "../src/source_parser.vala"
					pending_doc_comment = _tmp22_;
#line 4278 "source_parser.c"
				} else {
					PhpToValaSourceParserPhpSourceToken* _tmp23_;
#line 455 "../src/source_parser.vala"
					_tmp23_ = token;
#line 455 "../src/source_parser.vala"
					if (php_to_vala_source_parser_php_source_token_is_symbol (_tmp23_, "}")) {
#line 4285 "source_parser.c"
						gint _tmp24_;
						gchar* _tmp25_;
#line 456 "../src/source_parser.vala"
						_tmp24_ = depth;
#line 456 "../src/source_parser.vala"
						depth = _tmp24_ - 1;
#line 457 "../src/source_parser.vala"
						_tmp25_ = g_strdup ("");
#line 457 "../src/source_parser.vala"
						_g_free0 (pending_doc_comment);
#line 457 "../src/source_parser.vala"
						pending_doc_comment = _tmp25_;
#line 4298 "source_parser.c"
					} else {
						PhpToValaSourceParserPhpSourceToken* _tmp26_;
#line 458 "../src/source_parser.vala"
						_tmp26_ = token;
#line 458 "../src/source_parser.vala"
						if (!php_to_vala_source_parser_is_ignorable_token (_tmp26_)) {
#line 4305 "source_parser.c"
							gchar* _tmp27_;
#line 459 "../src/source_parser.vala"
							_tmp27_ = g_strdup ("");
#line 459 "../src/source_parser.vala"
							_g_free0 (pending_doc_comment);
#line 459 "../src/source_parser.vala"
							pending_doc_comment = _tmp27_;
#line 4313 "source_parser.c"
						}
					}
				}
#line 433 "../src/source_parser.vala"
				_g_object_unref0 (token);
#line 4319 "source_parser.c"
			}
		}
	}
#line 429 "../src/source_parser.vala"
	_g_free0 (pending_doc_comment);
#line 4325 "source_parser.c"
}

static LocalFunction*
php_to_vala_source_parser_parse_local_function_from_tokens (const gchar* source_path,
                                                            GeeArrayList* tokens,
                                                            gint function_index,
                                                            gint end_limit,
                                                            gboolean is_static,
                                                            const gchar* doc_comment,
                                                            gint* function_end_index,
                                                            gint* function_start_line,
                                                            gint* function_end_line,
                                                            GError** error)
{
	gint _vala_function_end_index = 0;
	gint _vala_function_start_line = 0;
	gint _vala_function_end_line = 0;
	gpointer _tmp0_;
	PhpToValaSourceParserPhpSourceToken* _tmp1_;
	gint name_index = 0;
	gboolean _tmp2_ = FALSE;
	gboolean _tmp6_ = FALSE;
	gint open_paren_index = 0;
	gint close_paren_index = 0;
	gint open_brace_index = 0;
	gint close_brace_index = 0;
	gchar* parameters = NULL;
	gchar* _tmp16_;
	gchar* return_type = NULL;
	gchar* _tmp17_;
	gchar* _tmp18_;
	gchar* _tmp19_;
	gchar* _tmp20_;
	gchar* header = NULL;
	gpointer _tmp21_;
	PhpToValaSourceParserPhpSourceToken* _tmp22_;
	const gchar* _tmp23_;
	const gchar* _tmp24_;
	const gchar* _tmp25_;
	gchar* _tmp26_;
	gchar* _tmp27_;
	gchar* function_name = NULL;
	gchar* function_return_type = NULL;
	GeeArrayList* function_parameters = NULL;
	GeeArrayList* _tmp28_;
	const gchar* _tmp29_;
	gpointer _tmp30_;
	PhpToValaSourceParserPhpSourceToken* _tmp31_;
	GeeArrayList* _tmp32_;
	gchar* _tmp33_ = NULL;
	gchar* _tmp34_ = NULL;
	gchar* body = NULL;
	gpointer _tmp35_;
	PhpToValaSourceParserPhpSourceToken* _tmp36_;
	gchar* _tmp37_;
	gchar* _tmp38_;
	gpointer _tmp39_;
	PhpToValaSourceParserPhpSourceToken* _tmp40_;
	gpointer _tmp41_;
	PhpToValaSourceParserPhpSourceToken* _tmp42_;
	const gchar* _tmp43_;
	GeeArrayList* _tmp44_;
	GeeArrayList* _tmp45_;
	GeeArrayList* _tmp46_;
	const gchar* _tmp47_;
	const gchar* _tmp48_;
	gpointer _tmp49_;
	PhpToValaSourceParserPhpSourceToken* _tmp50_;
	LocalFunction* _tmp51_;
	LocalFunction* _tmp52_;
	GError* _inner_error0_ = NULL;
	LocalFunction* result;
#line 464 "../src/source_parser.vala"
	g_return_val_if_fail (source_path != NULL, NULL);
#line 464 "../src/source_parser.vala"
	g_return_val_if_fail (tokens != NULL, NULL);
#line 464 "../src/source_parser.vala"
	g_return_val_if_fail (doc_comment != NULL, NULL);
#line 465 "../src/source_parser.vala"
	_vala_function_end_index = function_index;
#line 466 "../src/source_parser.vala"
	_tmp0_ = gee_abstract_list_get ((GeeAbstractList*) tokens, function_index);
#line 466 "../src/source_parser.vala"
	_tmp1_ = (PhpToValaSourceParserPhpSourceToken*) _tmp0_;
#line 466 "../src/source_parser.vala"
	_vala_function_start_line = _tmp1_->line;
#line 466 "../src/source_parser.vala"
	_g_object_unref0 (_tmp1_);
#line 467 "../src/source_parser.vala"
	_vala_function_end_line = _vala_function_start_line;
#line 469 "../src/source_parser.vala"
	name_index = php_to_vala_source_parser_next_significant_token_index (tokens, function_index + 1, end_limit);
#line 470 "../src/source_parser.vala"
	if (name_index >= 0) {
#line 4420 "source_parser.c"
		gpointer _tmp3_;
		PhpToValaSourceParserPhpSourceToken* _tmp4_;
		const gchar* _tmp5_;
#line 470 "../src/source_parser.vala"
		_tmp3_ = gee_abstract_list_get ((GeeAbstractList*) tokens, name_index);
#line 470 "../src/source_parser.vala"
		_tmp4_ = (PhpToValaSourceParserPhpSourceToken*) _tmp3_;
#line 470 "../src/source_parser.vala"
		_tmp5_ = _tmp4_->text;
#line 470 "../src/source_parser.vala"
		_tmp2_ = g_strcmp0 (_tmp5_, "&") == 0;
#line 470 "../src/source_parser.vala"
		_g_object_unref0 (_tmp4_);
#line 4434 "source_parser.c"
	} else {
#line 470 "../src/source_parser.vala"
		_tmp2_ = FALSE;
#line 4438 "source_parser.c"
	}
#line 470 "../src/source_parser.vala"
	if (_tmp2_) {
#line 471 "../src/source_parser.vala"
		name_index = php_to_vala_source_parser_next_significant_token_index (tokens, name_index + 1, end_limit);
#line 4444 "source_parser.c"
	}
#line 473 "../src/source_parser.vala"
	if (name_index < 0) {
#line 473 "../src/source_parser.vala"
		_tmp6_ = TRUE;
#line 4450 "source_parser.c"
	} else {
		gpointer _tmp7_;
		PhpToValaSourceParserPhpSourceToken* _tmp8_;
#line 473 "../src/source_parser.vala"
		_tmp7_ = gee_abstract_list_get ((GeeAbstractList*) tokens, name_index);
#line 473 "../src/source_parser.vala"
		_tmp8_ = (PhpToValaSourceParserPhpSourceToken*) _tmp7_;
#line 473 "../src/source_parser.vala"
		_tmp6_ = !php_to_vala_source_parser_php_source_token_is_token (_tmp8_, "T_STRING");
#line 473 "../src/source_parser.vala"
		_g_object_unref0 (_tmp8_);
#line 4462 "source_parser.c"
	}
#line 473 "../src/source_parser.vala"
	if (_tmp6_) {
#line 474 "../src/source_parser.vala"
		result = NULL;
#line 474 "../src/source_parser.vala"
		if (function_end_index) {
#line 474 "../src/source_parser.vala"
			*function_end_index = _vala_function_end_index;
#line 4472 "source_parser.c"
		}
#line 474 "../src/source_parser.vala"
		if (function_start_line) {
#line 474 "../src/source_parser.vala"
			*function_start_line = _vala_function_start_line;
#line 4478 "source_parser.c"
		}
#line 474 "../src/source_parser.vala"
		if (function_end_line) {
#line 474 "../src/source_parser.vala"
			*function_end_line = _vala_function_end_line;
#line 4484 "source_parser.c"
		}
#line 474 "../src/source_parser.vala"
		return result;
#line 4488 "source_parser.c"
	}
#line 477 "../src/source_parser.vala"
	open_paren_index = php_to_vala_source_parser_next_symbol_token_index (tokens, name_index + 1, end_limit, "(");
#line 478 "../src/source_parser.vala"
	if (open_paren_index < 0) {
#line 479 "../src/source_parser.vala"
		result = NULL;
#line 479 "../src/source_parser.vala"
		if (function_end_index) {
#line 479 "../src/source_parser.vala"
			*function_end_index = _vala_function_end_index;
#line 4500 "source_parser.c"
		}
#line 479 "../src/source_parser.vala"
		if (function_start_line) {
#line 479 "../src/source_parser.vala"
			*function_start_line = _vala_function_start_line;
#line 4506 "source_parser.c"
		}
#line 479 "../src/source_parser.vala"
		if (function_end_line) {
#line 479 "../src/source_parser.vala"
			*function_end_line = _vala_function_end_line;
#line 4512 "source_parser.c"
		}
#line 479 "../src/source_parser.vala"
		return result;
#line 4516 "source_parser.c"
	}
#line 481 "../src/source_parser.vala"
	close_paren_index = php_to_vala_source_parser_find_matching_symbol_token (tokens, open_paren_index, end_limit, "(", ")");
#line 482 "../src/source_parser.vala"
	if (close_paren_index < 0) {
#line 483 "../src/source_parser.vala"
		result = NULL;
#line 483 "../src/source_parser.vala"
		if (function_end_index) {
#line 483 "../src/source_parser.vala"
			*function_end_index = _vala_function_end_index;
#line 4528 "source_parser.c"
		}
#line 483 "../src/source_parser.vala"
		if (function_start_line) {
#line 483 "../src/source_parser.vala"
			*function_start_line = _vala_function_start_line;
#line 4534 "source_parser.c"
		}
#line 483 "../src/source_parser.vala"
		if (function_end_line) {
#line 483 "../src/source_parser.vala"
			*function_end_line = _vala_function_end_line;
#line 4540 "source_parser.c"
		}
#line 483 "../src/source_parser.vala"
		return result;
#line 4544 "source_parser.c"
	}
#line 486 "../src/source_parser.vala"
	open_brace_index = php_to_vala_source_parser_next_symbol_token_index (tokens, close_paren_index + 1, end_limit, "{");
#line 487 "../src/source_parser.vala"
	if (open_brace_index < 0) {
#line 488 "../src/source_parser.vala"
		result = NULL;
#line 488 "../src/source_parser.vala"
		if (function_end_index) {
#line 488 "../src/source_parser.vala"
			*function_end_index = _vala_function_end_index;
#line 4556 "source_parser.c"
		}
#line 488 "../src/source_parser.vala"
		if (function_start_line) {
#line 488 "../src/source_parser.vala"
			*function_start_line = _vala_function_start_line;
#line 4562 "source_parser.c"
		}
#line 488 "../src/source_parser.vala"
		if (function_end_line) {
#line 488 "../src/source_parser.vala"
			*function_end_line = _vala_function_end_line;
#line 4568 "source_parser.c"
		}
#line 488 "../src/source_parser.vala"
		return result;
#line 4572 "source_parser.c"
	}
#line 490 "../src/source_parser.vala"
	close_brace_index = php_to_vala_source_parser_find_matching_brace_token (tokens, open_brace_index, end_limit);
#line 491 "../src/source_parser.vala"
	if (close_brace_index < 0) {
#line 4578 "source_parser.c"
		gpointer _tmp9_;
		PhpToValaSourceParserPhpSourceToken* _tmp10_;
		const gchar* _tmp11_;
		gpointer _tmp12_;
		PhpToValaSourceParserPhpSourceToken* _tmp13_;
		GError* _tmp14_;
		GError* _tmp15_;
#line 492 "../src/source_parser.vala"
		_tmp9_ = gee_abstract_list_get ((GeeAbstractList*) tokens, name_index);
#line 492 "../src/source_parser.vala"
		_tmp10_ = (PhpToValaSourceParserPhpSourceToken*) _tmp9_;
#line 492 "../src/source_parser.vala"
		_tmp11_ = _tmp10_->text;
#line 492 "../src/source_parser.vala"
		_tmp12_ = gee_abstract_list_get ((GeeAbstractList*) tokens, function_index);
#line 492 "../src/source_parser.vala"
		_tmp13_ = (PhpToValaSourceParserPhpSourceToken*) _tmp12_;
#line 492 "../src/source_parser.vala"
		_tmp14_ = g_error_new (PHP_TO_VALA_ERROR, PHP_TO_VALA_ERROR_UNSUPPORTED, "Unclosed PHP function '%s' at %s:%d", _tmp11_, source_path, _tmp13_->line);
#line 492 "../src/source_parser.vala"
		_tmp15_ = _tmp14_;
#line 492 "../src/source_parser.vala"
		_g_object_unref0 (_tmp13_);
#line 492 "../src/source_parser.vala"
		_g_object_unref0 (_tmp10_);
#line 492 "../src/source_parser.vala"
		_inner_error0_ = _tmp15_;
#line 492 "../src/source_parser.vala"
		g_propagate_error (error, _inner_error0_);
#line 492 "../src/source_parser.vala"
		return NULL;
#line 4610 "source_parser.c"
	}
#line 500 "../src/source_parser.vala"
	_tmp16_ = php_to_vala_source_parser_tokens_to_compact_source (tokens, open_paren_index + 1, close_paren_index);
#line 500 "../src/source_parser.vala"
	parameters = _tmp16_;
#line 501 "../src/source_parser.vala"
	_tmp17_ = php_to_vala_source_parser_tokens_to_compact_source (tokens, close_paren_index + 1, open_brace_index);
#line 501 "../src/source_parser.vala"
	_tmp18_ = _tmp17_;
#line 501 "../src/source_parser.vala"
	_tmp19_ = string_strip (_tmp18_);
#line 501 "../src/source_parser.vala"
	_tmp20_ = _tmp19_;
#line 501 "../src/source_parser.vala"
	_g_free0 (_tmp18_);
#line 501 "../src/source_parser.vala"
	return_type = _tmp20_;
#line 502 "../src/source_parser.vala"
	_tmp21_ = gee_abstract_list_get ((GeeAbstractList*) tokens, name_index);
#line 502 "../src/source_parser.vala"
	_tmp22_ = (PhpToValaSourceParserPhpSourceToken*) _tmp21_;
#line 502 "../src/source_parser.vala"
	_tmp23_ = _tmp22_->text;
#line 502 "../src/source_parser.vala"
	_tmp24_ = parameters;
#line 502 "../src/source_parser.vala"
	_tmp25_ = return_type;
#line 502 "../src/source_parser.vala"
	_tmp26_ = g_strdup_printf ("function %s(%s) %s {", _tmp23_, _tmp24_, _tmp25_);
#line 502 "../src/source_parser.vala"
	_tmp27_ = _tmp26_;
#line 502 "../src/source_parser.vala"
	_g_object_unref0 (_tmp22_);
#line 502 "../src/source_parser.vala"
	header = _tmp27_;
#line 506 "../src/source_parser.vala"
	_tmp28_ = gee_array_list_new (TYPE_LOCAL_PARAMETER, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL);
#line 506 "../src/source_parser.vala"
	function_parameters = _tmp28_;
#line 507 "../src/source_parser.vala"
	_tmp29_ = header;
#line 507 "../src/source_parser.vala"
	_tmp30_ = gee_abstract_list_get ((GeeAbstractList*) tokens, function_index);
#line 507 "../src/source_parser.vala"
	_tmp31_ = (PhpToValaSourceParserPhpSourceToken*) _tmp30_;
#line 507 "../src/source_parser.vala"
	_tmp32_ = function_parameters;
#line 507 "../src/source_parser.vala"
	php_to_vala_source_parser_parse_local_function_header (source_path, _tmp29_, _tmp31_->line, &_tmp33_, _tmp32_, &_tmp34_, &_inner_error0_);
#line 507 "../src/source_parser.vala"
	_g_free0 (function_name);
#line 507 "../src/source_parser.vala"
	function_name = _tmp33_;
#line 507 "../src/source_parser.vala"
	_g_free0 (function_return_type);
#line 507 "../src/source_parser.vala"
	function_return_type = _tmp34_;
#line 507 "../src/source_parser.vala"
	_g_object_unref0 (_tmp31_);
#line 507 "../src/source_parser.vala"
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
#line 507 "../src/source_parser.vala"
		g_propagate_error (error, _inner_error0_);
#line 507 "../src/source_parser.vala"
		_g_object_unref0 (function_parameters);
#line 507 "../src/source_parser.vala"
		_g_free0 (function_return_type);
#line 507 "../src/source_parser.vala"
		_g_free0 (function_name);
#line 507 "../src/source_parser.vala"
		_g_free0 (header);
#line 507 "../src/source_parser.vala"
		_g_free0 (return_type);
#line 507 "../src/source_parser.vala"
		_g_free0 (parameters);
#line 507 "../src/source_parser.vala"
		return NULL;
#line 4688 "source_parser.c"
	}
#line 509 "../src/source_parser.vala"
	_tmp35_ = gee_abstract_list_get ((GeeAbstractList*) tokens, function_index);
#line 509 "../src/source_parser.vala"
	_tmp36_ = (PhpToValaSourceParserPhpSourceToken*) _tmp35_;
#line 509 "../src/source_parser.vala"
	_tmp37_ = php_to_vala_source_parser_tokens_to_source (tokens, open_brace_index + 1, close_brace_index, _tmp36_->line + 1);
#line 509 "../src/source_parser.vala"
	_tmp38_ = _tmp37_;
#line 509 "../src/source_parser.vala"
	_g_object_unref0 (_tmp36_);
#line 509 "../src/source_parser.vala"
	body = _tmp38_;
#line 510 "../src/source_parser.vala"
	_vala_function_end_index = close_brace_index;
#line 511 "../src/source_parser.vala"
	_tmp39_ = gee_abstract_list_get ((GeeAbstractList*) tokens, function_index);
#line 511 "../src/source_parser.vala"
	_tmp40_ = (PhpToValaSourceParserPhpSourceToken*) _tmp39_;
#line 511 "../src/source_parser.vala"
	_vala_function_start_line = _tmp40_->line;
#line 511 "../src/source_parser.vala"
	_g_object_unref0 (_tmp40_);
#line 512 "../src/source_parser.vala"
	_tmp41_ = gee_abstract_list_get ((GeeAbstractList*) tokens, close_brace_index);
#line 512 "../src/source_parser.vala"
	_tmp42_ = (PhpToValaSourceParserPhpSourceToken*) _tmp41_;
#line 512 "../src/source_parser.vala"
	_vala_function_end_line = _tmp42_->line;
#line 512 "../src/source_parser.vala"
	_g_object_unref0 (_tmp42_);
#line 514 "../src/source_parser.vala"
	_tmp43_ = function_name;
#line 514 "../src/source_parser.vala"
	_tmp44_ = function_parameters;
#line 514 "../src/source_parser.vala"
	_tmp45_ = php_to_vala_source_parser_copy_parameter_list (_tmp44_);
#line 514 "../src/source_parser.vala"
	_tmp46_ = _tmp45_;
#line 514 "../src/source_parser.vala"
	_tmp47_ = function_return_type;
#line 514 "../src/source_parser.vala"
	_tmp48_ = body;
#line 514 "../src/source_parser.vala"
	_tmp49_ = gee_abstract_list_get ((GeeAbstractList*) tokens, function_index);
#line 514 "../src/source_parser.vala"
	_tmp50_ = (PhpToValaSourceParserPhpSourceToken*) _tmp49_;
#line 514 "../src/source_parser.vala"
	_tmp51_ = local_function_new (_tmp43_, _tmp46_, _tmp47_, _tmp48_, _tmp50_->line, is_static, doc_comment);
#line 514 "../src/source_parser.vala"
	_tmp52_ = _tmp51_;
#line 514 "../src/source_parser.vala"
	_g_object_unref0 (_tmp50_);
#line 514 "../src/source_parser.vala"
	_g_object_unref0 (_tmp46_);
#line 514 "../src/source_parser.vala"
	result = _tmp52_;
#line 514 "../src/source_parser.vala"
	_g_free0 (body);
#line 514 "../src/source_parser.vala"
	_g_object_unref0 (function_parameters);
#line 514 "../src/source_parser.vala"
	_g_free0 (function_return_type);
#line 514 "../src/source_parser.vala"
	_g_free0 (function_name);
#line 514 "../src/source_parser.vala"
	_g_free0 (header);
#line 514 "../src/source_parser.vala"
	_g_free0 (return_type);
#line 514 "../src/source_parser.vala"
	_g_free0 (parameters);
#line 514 "../src/source_parser.vala"
	if (function_end_index) {
#line 514 "../src/source_parser.vala"
		*function_end_index = _vala_function_end_index;
#line 4764 "source_parser.c"
	}
#line 514 "../src/source_parser.vala"
	if (function_start_line) {
#line 514 "../src/source_parser.vala"
		*function_start_line = _vala_function_start_line;
#line 4770 "source_parser.c"
	}
#line 514 "../src/source_parser.vala"
	if (function_end_line) {
#line 514 "../src/source_parser.vala"
		*function_end_line = _vala_function_end_line;
#line 4776 "source_parser.c"
	}
#line 514 "../src/source_parser.vala"
	return result;
#line 4780 "source_parser.c"
}

static gint
php_to_vala_source_parser_next_significant_token_index (GeeArrayList* tokens,
                                                        gint start_index,
                                                        gint end_limit)
{
	gint result;
#line 525 "../src/source_parser.vala"
	g_return_val_if_fail (tokens != NULL, -1);
#line 4791 "source_parser.c"
	{
		gint i = 0;
#line 526 "../src/source_parser.vala"
		i = start_index;
#line 4796 "source_parser.c"
		{
			gboolean _tmp0_ = FALSE;
#line 526 "../src/source_parser.vala"
			_tmp0_ = TRUE;
#line 526 "../src/source_parser.vala"
			while (TRUE) {
#line 4803 "source_parser.c"
				gpointer _tmp2_;
				PhpToValaSourceParserPhpSourceToken* _tmp3_;
				gboolean _tmp4_;
#line 526 "../src/source_parser.vala"
				if (!_tmp0_) {
#line 4809 "source_parser.c"
					gint _tmp1_;
#line 526 "../src/source_parser.vala"
					_tmp1_ = i;
#line 526 "../src/source_parser.vala"
					i = _tmp1_ + 1;
#line 4815 "source_parser.c"
				}
#line 526 "../src/source_parser.vala"
				_tmp0_ = FALSE;
#line 526 "../src/source_parser.vala"
				if (!(i < end_limit)) {
#line 526 "../src/source_parser.vala"
					break;
#line 4823 "source_parser.c"
				}
#line 527 "../src/source_parser.vala"
				_tmp2_ = gee_abstract_list_get ((GeeAbstractList*) tokens, i);
#line 527 "../src/source_parser.vala"
				_tmp3_ = (PhpToValaSourceParserPhpSourceToken*) _tmp2_;
#line 527 "../src/source_parser.vala"
				_tmp4_ = !php_to_vala_source_parser_is_ignorable_token (_tmp3_);
#line 527 "../src/source_parser.vala"
				_g_object_unref0 (_tmp3_);
#line 527 "../src/source_parser.vala"
				if (_tmp4_) {
#line 528 "../src/source_parser.vala"
					result = i;
#line 528 "../src/source_parser.vala"
					return result;
#line 4839 "source_parser.c"
				}
			}
		}
	}
#line 531 "../src/source_parser.vala"
	result = -1;
#line 531 "../src/source_parser.vala"
	return result;
#line 4848 "source_parser.c"
}

static gint
php_to_vala_source_parser_next_symbol_token_index (GeeArrayList* tokens,
                                                   gint start_index,
                                                   gint end_limit,
                                                   const gchar* symbol)
{
	gint result;
#line 534 "../src/source_parser.vala"
	g_return_val_if_fail (tokens != NULL, -1);
#line 534 "../src/source_parser.vala"
	g_return_val_if_fail (symbol != NULL, -1);
#line 4862 "source_parser.c"
	{
		gint i = 0;
#line 535 "../src/source_parser.vala"
		i = start_index;
#line 4867 "source_parser.c"
		{
			gboolean _tmp0_ = FALSE;
#line 535 "../src/source_parser.vala"
			_tmp0_ = TRUE;
#line 535 "../src/source_parser.vala"
			while (TRUE) {
#line 4874 "source_parser.c"
				gpointer _tmp2_;
				PhpToValaSourceParserPhpSourceToken* _tmp3_;
				gboolean _tmp4_;
#line 535 "../src/source_parser.vala"
				if (!_tmp0_) {
#line 4880 "source_parser.c"
					gint _tmp1_;
#line 535 "../src/source_parser.vala"
					_tmp1_ = i;
#line 535 "../src/source_parser.vala"
					i = _tmp1_ + 1;
#line 4886 "source_parser.c"
				}
#line 535 "../src/source_parser.vala"
				_tmp0_ = FALSE;
#line 535 "../src/source_parser.vala"
				if (!(i < end_limit)) {
#line 535 "../src/source_parser.vala"
					break;
#line 4894 "source_parser.c"
				}
#line 536 "../src/source_parser.vala"
				_tmp2_ = gee_abstract_list_get ((GeeAbstractList*) tokens, i);
#line 536 "../src/source_parser.vala"
				_tmp3_ = (PhpToValaSourceParserPhpSourceToken*) _tmp2_;
#line 536 "../src/source_parser.vala"
				_tmp4_ = php_to_vala_source_parser_php_source_token_is_symbol (_tmp3_, symbol);
#line 536 "../src/source_parser.vala"
				_g_object_unref0 (_tmp3_);
#line 536 "../src/source_parser.vala"
				if (_tmp4_) {
#line 537 "../src/source_parser.vala"
					result = i;
#line 537 "../src/source_parser.vala"
					return result;
#line 4910 "source_parser.c"
				}
			}
		}
	}
#line 540 "../src/source_parser.vala"
	result = -1;
#line 540 "../src/source_parser.vala"
	return result;
#line 4919 "source_parser.c"
}

static gint
php_to_vala_source_parser_find_matching_brace_token (GeeArrayList* tokens,
                                                     gint open_index,
                                                     gint end_limit)
{
	gint result;
#line 543 "../src/source_parser.vala"
	g_return_val_if_fail (tokens != NULL, -1);
#line 544 "../src/source_parser.vala"
	result = php_to_vala_source_parser_find_matching_symbol_token (tokens, open_index, end_limit, "{", "}");
#line 544 "../src/source_parser.vala"
	return result;
#line 4934 "source_parser.c"
}

static gint
php_to_vala_source_parser_find_matching_symbol_token (GeeArrayList* tokens,
                                                      gint open_index,
                                                      gint end_limit,
                                                      const gchar* open_symbol,
                                                      const gchar* close_symbol)
{
	gint depth = 0;
	gint result;
#line 547 "../src/source_parser.vala"
	g_return_val_if_fail (tokens != NULL, -1);
#line 547 "../src/source_parser.vala"
	g_return_val_if_fail (open_symbol != NULL, -1);
#line 547 "../src/source_parser.vala"
	g_return_val_if_fail (close_symbol != NULL, -1);
#line 548 "../src/source_parser.vala"
	depth = 0;
#line 4954 "source_parser.c"
	{
		gint i = 0;
#line 549 "../src/source_parser.vala"
		i = open_index;
#line 4959 "source_parser.c"
		{
			gboolean _tmp0_ = FALSE;
#line 549 "../src/source_parser.vala"
			_tmp0_ = TRUE;
#line 549 "../src/source_parser.vala"
			while (TRUE) {
#line 4966 "source_parser.c"
				gpointer _tmp2_;
				PhpToValaSourceParserPhpSourceToken* _tmp3_;
				gboolean _tmp4_;
#line 549 "../src/source_parser.vala"
				if (!_tmp0_) {
#line 4972 "source_parser.c"
					gint _tmp1_;
#line 549 "../src/source_parser.vala"
					_tmp1_ = i;
#line 549 "../src/source_parser.vala"
					i = _tmp1_ + 1;
#line 4978 "source_parser.c"
				}
#line 549 "../src/source_parser.vala"
				_tmp0_ = FALSE;
#line 549 "../src/source_parser.vala"
				if (!(i < end_limit)) {
#line 549 "../src/source_parser.vala"
					break;
#line 4986 "source_parser.c"
				}
#line 550 "../src/source_parser.vala"
				_tmp2_ = gee_abstract_list_get ((GeeAbstractList*) tokens, i);
#line 550 "../src/source_parser.vala"
				_tmp3_ = (PhpToValaSourceParserPhpSourceToken*) _tmp2_;
#line 550 "../src/source_parser.vala"
				_tmp4_ = php_to_vala_source_parser_php_source_token_is_symbol (_tmp3_, open_symbol);
#line 550 "../src/source_parser.vala"
				_g_object_unref0 (_tmp3_);
#line 550 "../src/source_parser.vala"
				if (_tmp4_) {
#line 4998 "source_parser.c"
					gint _tmp5_;
#line 551 "../src/source_parser.vala"
					_tmp5_ = depth;
#line 551 "../src/source_parser.vala"
					depth = _tmp5_ + 1;
#line 5004 "source_parser.c"
				} else {
					gpointer _tmp6_;
					PhpToValaSourceParserPhpSourceToken* _tmp7_;
					gboolean _tmp8_;
#line 552 "../src/source_parser.vala"
					_tmp6_ = gee_abstract_list_get ((GeeAbstractList*) tokens, i);
#line 552 "../src/source_parser.vala"
					_tmp7_ = (PhpToValaSourceParserPhpSourceToken*) _tmp6_;
#line 552 "../src/source_parser.vala"
					_tmp8_ = php_to_vala_source_parser_php_source_token_is_symbol (_tmp7_, close_symbol);
#line 552 "../src/source_parser.vala"
					_g_object_unref0 (_tmp7_);
#line 552 "../src/source_parser.vala"
					if (_tmp8_) {
#line 5019 "source_parser.c"
						gint _tmp9_;
#line 553 "../src/source_parser.vala"
						_tmp9_ = depth;
#line 553 "../src/source_parser.vala"
						depth = _tmp9_ - 1;
#line 554 "../src/source_parser.vala"
						if (depth == 0) {
#line 555 "../src/source_parser.vala"
							result = i;
#line 555 "../src/source_parser.vala"
							return result;
#line 5031 "source_parser.c"
						}
					}
				}
			}
		}
	}
#line 559 "../src/source_parser.vala"
	result = -1;
#line 559 "../src/source_parser.vala"
	return result;
#line 5042 "source_parser.c"
}

static gboolean
php_to_vala_source_parser_previous_method_modifiers_contain_static (GeeArrayList* tokens,
                                                                    gint class_start_index,
                                                                    gint function_index)
{
	gboolean result;
#line 562 "../src/source_parser.vala"
	g_return_val_if_fail (tokens != NULL, FALSE);
#line 5053 "source_parser.c"
	{
		gint i = 0;
#line 563 "../src/source_parser.vala"
		i = function_index - 1;
#line 5058 "source_parser.c"
		{
			gboolean _tmp0_ = FALSE;
#line 563 "../src/source_parser.vala"
			_tmp0_ = TRUE;
#line 563 "../src/source_parser.vala"
			while (TRUE) {
#line 5065 "source_parser.c"
				PhpToValaSourceParserPhpSourceToken* token = NULL;
				gpointer _tmp2_;
				PhpToValaSourceParserPhpSourceToken* _tmp3_;
				gboolean _tmp4_ = FALSE;
				gboolean _tmp5_ = FALSE;
				PhpToValaSourceParserPhpSourceToken* _tmp6_;
#line 563 "../src/source_parser.vala"
				if (!_tmp0_) {
#line 5074 "source_parser.c"
					gint _tmp1_;
#line 563 "../src/source_parser.vala"
					_tmp1_ = i;
#line 563 "../src/source_parser.vala"
					i = _tmp1_ - 1;
#line 5080 "source_parser.c"
				}
#line 563 "../src/source_parser.vala"
				_tmp0_ = FALSE;
#line 563 "../src/source_parser.vala"
				if (!(i >= class_start_index)) {
#line 563 "../src/source_parser.vala"
					break;
#line 5088 "source_parser.c"
				}
#line 564 "../src/source_parser.vala"
				_tmp2_ = gee_abstract_list_get ((GeeAbstractList*) tokens, i);
#line 564 "../src/source_parser.vala"
				token = (PhpToValaSourceParserPhpSourceToken*) _tmp2_;
#line 565 "../src/source_parser.vala"
				_tmp3_ = token;
#line 565 "../src/source_parser.vala"
				if (php_to_vala_source_parser_php_source_token_is_token (_tmp3_, "T_STATIC")) {
#line 566 "../src/source_parser.vala"
					result = TRUE;
#line 566 "../src/source_parser.vala"
					_g_object_unref0 (token);
#line 566 "../src/source_parser.vala"
					return result;
#line 5104 "source_parser.c"
				}
#line 568 "../src/source_parser.vala"
				_tmp6_ = token;
#line 568 "../src/source_parser.vala"
				if (php_to_vala_source_parser_php_source_token_is_symbol (_tmp6_, ";")) {
#line 568 "../src/source_parser.vala"
					_tmp5_ = TRUE;
#line 5112 "source_parser.c"
				} else {
					PhpToValaSourceParserPhpSourceToken* _tmp7_;
#line 568 "../src/source_parser.vala"
					_tmp7_ = token;
#line 568 "../src/source_parser.vala"
					_tmp5_ = php_to_vala_source_parser_php_source_token_is_symbol (_tmp7_, "}");
#line 5119 "source_parser.c"
				}
#line 568 "../src/source_parser.vala"
				if (_tmp5_) {
#line 568 "../src/source_parser.vala"
					_tmp4_ = TRUE;
#line 5125 "source_parser.c"
				} else {
					PhpToValaSourceParserPhpSourceToken* _tmp8_;
#line 568 "../src/source_parser.vala"
					_tmp8_ = token;
#line 568 "../src/source_parser.vala"
					_tmp4_ = php_to_vala_source_parser_php_source_token_is_symbol (_tmp8_, "{");
#line 5132 "source_parser.c"
				}
#line 568 "../src/source_parser.vala"
				if (_tmp4_) {
#line 569 "../src/source_parser.vala"
					result = FALSE;
#line 569 "../src/source_parser.vala"
					_g_object_unref0 (token);
#line 569 "../src/source_parser.vala"
					return result;
#line 5142 "source_parser.c"
				}
#line 563 "../src/source_parser.vala"
				_g_object_unref0 (token);
#line 5146 "source_parser.c"
			}
		}
	}
#line 572 "../src/source_parser.vala"
	result = FALSE;
#line 572 "../src/source_parser.vala"
	return result;
#line 5154 "source_parser.c"
}

static gboolean
php_to_vala_source_parser_is_ignorable_token (PhpToValaSourceParserPhpSourceToken* token)
{
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_ = FALSE;
	gboolean _tmp2_ = FALSE;
	gboolean result;
#line 575 "../src/source_parser.vala"
	g_return_val_if_fail (token != NULL, FALSE);
#line 576 "../src/source_parser.vala"
	if (php_to_vala_source_parser_php_source_token_is_token (token, "T_WHITESPACE")) {
#line 576 "../src/source_parser.vala"
		_tmp2_ = TRUE;
#line 5170 "source_parser.c"
	} else {
#line 577 "../src/source_parser.vala"
		_tmp2_ = php_to_vala_source_parser_php_source_token_is_token (token, "T_COMMENT");
#line 5174 "source_parser.c"
	}
#line 576 "../src/source_parser.vala"
	if (_tmp2_) {
#line 576 "../src/source_parser.vala"
		_tmp1_ = TRUE;
#line 5180 "source_parser.c"
	} else {
#line 578 "../src/source_parser.vala"
		_tmp1_ = php_to_vala_source_parser_php_source_token_is_token (token, "T_OPEN_TAG");
#line 5184 "source_parser.c"
	}
#line 576 "../src/source_parser.vala"
	if (_tmp1_) {
#line 576 "../src/source_parser.vala"
		_tmp0_ = TRUE;
#line 5190 "source_parser.c"
	} else {
#line 579 "../src/source_parser.vala"
		_tmp0_ = php_to_vala_source_parser_php_source_token_is_token (token, "T_CLOSE_TAG");
#line 5194 "source_parser.c"
	}
#line 576 "../src/source_parser.vala"
	result = _tmp0_;
#line 576 "../src/source_parser.vala"
	return result;
#line 5200 "source_parser.c"
}

static gchar*
php_to_vala_source_parser_collect_name_tokens (GeeArrayList* tokens,
                                               gint start_index)
{
	GString* output = NULL;
	GString* _tmp0_;
	GString* _tmp14_;
	const gchar* _tmp15_;
	gchar* _tmp16_;
	gchar* result;
#line 582 "../src/source_parser.vala"
	g_return_val_if_fail (tokens != NULL, NULL);
#line 583 "../src/source_parser.vala"
	_tmp0_ = g_string_new ("");
#line 583 "../src/source_parser.vala"
	output = _tmp0_;
#line 5219 "source_parser.c"
	{
		gint i = 0;
#line 584 "../src/source_parser.vala"
		i = start_index;
#line 5224 "source_parser.c"
		{
			gboolean _tmp1_ = FALSE;
#line 584 "../src/source_parser.vala"
			_tmp1_ = TRUE;
#line 584 "../src/source_parser.vala"
			while (TRUE) {
#line 5231 "source_parser.c"
				gint _tmp3_;
				gint _tmp4_;
				PhpToValaSourceParserPhpSourceToken* token = NULL;
				gpointer _tmp5_;
				gboolean _tmp6_ = FALSE;
				gboolean _tmp7_ = FALSE;
				PhpToValaSourceParserPhpSourceToken* _tmp8_;
#line 584 "../src/source_parser.vala"
				if (!_tmp1_) {
#line 5241 "source_parser.c"
					gint _tmp2_;
#line 584 "../src/source_parser.vala"
					_tmp2_ = i;
#line 584 "../src/source_parser.vala"
					i = _tmp2_ + 1;
#line 5247 "source_parser.c"
				}
#line 584 "../src/source_parser.vala"
				_tmp1_ = FALSE;
#line 584 "../src/source_parser.vala"
				_tmp3_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) tokens);
#line 584 "../src/source_parser.vala"
				_tmp4_ = _tmp3_;
#line 584 "../src/source_parser.vala"
				if (!(i < _tmp4_)) {
#line 584 "../src/source_parser.vala"
					break;
#line 5259 "source_parser.c"
				}
#line 585 "../src/source_parser.vala"
				_tmp5_ = gee_abstract_list_get ((GeeAbstractList*) tokens, i);
#line 585 "../src/source_parser.vala"
				token = (PhpToValaSourceParserPhpSourceToken*) _tmp5_;
#line 586 "../src/source_parser.vala"
				_tmp8_ = token;
#line 586 "../src/source_parser.vala"
				if (php_to_vala_source_parser_php_source_token_is_token (_tmp8_, "T_STRING")) {
#line 586 "../src/source_parser.vala"
					_tmp7_ = TRUE;
#line 5271 "source_parser.c"
				} else {
					PhpToValaSourceParserPhpSourceToken* _tmp9_;
#line 586 "../src/source_parser.vala"
					_tmp9_ = token;
#line 586 "../src/source_parser.vala"
					_tmp7_ = php_to_vala_source_parser_php_source_token_is_token (_tmp9_, "T_NAME_QUALIFIED");
#line 5278 "source_parser.c"
				}
#line 586 "../src/source_parser.vala"
				if (_tmp7_) {
#line 586 "../src/source_parser.vala"
					_tmp6_ = TRUE;
#line 5284 "source_parser.c"
				} else {
					PhpToValaSourceParserPhpSourceToken* _tmp10_;
#line 586 "../src/source_parser.vala"
					_tmp10_ = token;
#line 586 "../src/source_parser.vala"
					_tmp6_ = php_to_vala_source_parser_php_source_token_is_token (_tmp10_, "T_NS_SEPARATOR");
#line 5291 "source_parser.c"
				}
#line 586 "../src/source_parser.vala"
				if (_tmp6_) {
#line 5295 "source_parser.c"
					GString* _tmp11_;
					PhpToValaSourceParserPhpSourceToken* _tmp12_;
					const gchar* _tmp13_;
#line 587 "../src/source_parser.vala"
					_tmp11_ = output;
#line 587 "../src/source_parser.vala"
					_tmp12_ = token;
#line 587 "../src/source_parser.vala"
					_tmp13_ = _tmp12_->text;
#line 587 "../src/source_parser.vala"
					g_string_append (_tmp11_, _tmp13_);
#line 588 "../src/source_parser.vala"
					_g_object_unref0 (token);
#line 588 "../src/source_parser.vala"
					continue;
#line 5311 "source_parser.c"
				}
#line 590 "../src/source_parser.vala"
				_g_object_unref0 (token);
#line 590 "../src/source_parser.vala"
				break;
#line 5317 "source_parser.c"
			}
		}
	}
#line 592 "../src/source_parser.vala"
	_tmp14_ = output;
#line 592 "../src/source_parser.vala"
	_tmp15_ = _tmp14_->str;
#line 592 "../src/source_parser.vala"
	_tmp16_ = g_strdup (_tmp15_);
#line 592 "../src/source_parser.vala"
	result = _tmp16_;
#line 592 "../src/source_parser.vala"
	_g_string_free0 (output);
#line 592 "../src/source_parser.vala"
	return result;
#line 5333 "source_parser.c"
}

static gchar*
php_to_vala_source_parser_tokens_to_compact_source (GeeArrayList* tokens,
                                                    gint start_index,
                                                    gint end_index)
{
	GString* output = NULL;
	GString* _tmp0_;
	GString* _tmp7_;
	const gchar* _tmp8_;
	gchar* _tmp9_;
	gchar* result;
#line 595 "../src/source_parser.vala"
	g_return_val_if_fail (tokens != NULL, NULL);
#line 596 "../src/source_parser.vala"
	_tmp0_ = g_string_new ("");
#line 596 "../src/source_parser.vala"
	output = _tmp0_;
#line 5353 "source_parser.c"
	{
		gint i = 0;
#line 597 "../src/source_parser.vala"
		i = start_index;
#line 5358 "source_parser.c"
		{
			gboolean _tmp1_ = FALSE;
#line 597 "../src/source_parser.vala"
			_tmp1_ = TRUE;
#line 597 "../src/source_parser.vala"
			while (TRUE) {
#line 5365 "source_parser.c"
				GString* _tmp3_;
				gpointer _tmp4_;
				PhpToValaSourceParserPhpSourceToken* _tmp5_;
				const gchar* _tmp6_;
#line 597 "../src/source_parser.vala"
				if (!_tmp1_) {
#line 5372 "source_parser.c"
					gint _tmp2_;
#line 597 "../src/source_parser.vala"
					_tmp2_ = i;
#line 597 "../src/source_parser.vala"
					i = _tmp2_ + 1;
#line 5378 "source_parser.c"
				}
#line 597 "../src/source_parser.vala"
				_tmp1_ = FALSE;
#line 597 "../src/source_parser.vala"
				if (!(i < end_index)) {
#line 597 "../src/source_parser.vala"
					break;
#line 5386 "source_parser.c"
				}
#line 598 "../src/source_parser.vala"
				_tmp3_ = output;
#line 598 "../src/source_parser.vala"
				_tmp4_ = gee_abstract_list_get ((GeeAbstractList*) tokens, i);
#line 598 "../src/source_parser.vala"
				_tmp5_ = (PhpToValaSourceParserPhpSourceToken*) _tmp4_;
#line 598 "../src/source_parser.vala"
				_tmp6_ = _tmp5_->text;
#line 598 "../src/source_parser.vala"
				g_string_append (_tmp3_, _tmp6_);
#line 598 "../src/source_parser.vala"
				_g_object_unref0 (_tmp5_);
#line 5400 "source_parser.c"
			}
		}
	}
#line 600 "../src/source_parser.vala"
	_tmp7_ = output;
#line 600 "../src/source_parser.vala"
	_tmp8_ = _tmp7_->str;
#line 600 "../src/source_parser.vala"
	_tmp9_ = g_strdup (_tmp8_);
#line 600 "../src/source_parser.vala"
	result = _tmp9_;
#line 600 "../src/source_parser.vala"
	_g_string_free0 (output);
#line 600 "../src/source_parser.vala"
	return result;
#line 5416 "source_parser.c"
}

static gchar*
php_to_vala_source_parser_tokens_to_source (GeeArrayList* tokens,
                                            gint start_index,
                                            gint end_index,
                                            gint first_line)
{
	GString* output = NULL;
	GString* _tmp0_;
	gint current_line = 0;
	GString* _tmp12_;
	const gchar* _tmp13_;
	gchar* _tmp14_;
	gchar* result;
#line 603 "../src/source_parser.vala"
	g_return_val_if_fail (tokens != NULL, NULL);
#line 604 "../src/source_parser.vala"
	_tmp0_ = g_string_new ("");
#line 604 "../src/source_parser.vala"
	output = _tmp0_;
#line 605 "../src/source_parser.vala"
	current_line = first_line;
#line 5440 "source_parser.c"
	{
		gint i = 0;
#line 606 "../src/source_parser.vala"
		i = start_index;
#line 5445 "source_parser.c"
		{
			gboolean _tmp1_ = FALSE;
#line 606 "../src/source_parser.vala"
			_tmp1_ = TRUE;
#line 606 "../src/source_parser.vala"
			while (TRUE) {
#line 5452 "source_parser.c"
				PhpToValaSourceParserPhpSourceToken* token = NULL;
				gpointer _tmp3_;
				GString* _tmp7_;
				PhpToValaSourceParserPhpSourceToken* _tmp8_;
				const gchar* _tmp9_;
				PhpToValaSourceParserPhpSourceToken* _tmp10_;
				const gchar* _tmp11_;
#line 606 "../src/source_parser.vala"
				if (!_tmp1_) {
#line 5462 "source_parser.c"
					gint _tmp2_;
#line 606 "../src/source_parser.vala"
					_tmp2_ = i;
#line 606 "../src/source_parser.vala"
					i = _tmp2_ + 1;
#line 5468 "source_parser.c"
				}
#line 606 "../src/source_parser.vala"
				_tmp1_ = FALSE;
#line 606 "../src/source_parser.vala"
				if (!(i < end_index)) {
#line 606 "../src/source_parser.vala"
					break;
#line 5476 "source_parser.c"
				}
#line 607 "../src/source_parser.vala"
				_tmp3_ = gee_abstract_list_get ((GeeAbstractList*) tokens, i);
#line 607 "../src/source_parser.vala"
				token = (PhpToValaSourceParserPhpSourceToken*) _tmp3_;
#line 608 "../src/source_parser.vala"
				while (TRUE) {
#line 5484 "source_parser.c"
					PhpToValaSourceParserPhpSourceToken* _tmp4_;
					GString* _tmp5_;
					gint _tmp6_;
#line 608 "../src/source_parser.vala"
					_tmp4_ = token;
#line 608 "../src/source_parser.vala"
					if (!(current_line < _tmp4_->line)) {
#line 608 "../src/source_parser.vala"
						break;
#line 5494 "source_parser.c"
					}
#line 609 "../src/source_parser.vala"
					_tmp5_ = output;
#line 609 "../src/source_parser.vala"
					g_string_append (_tmp5_, "\n");
#line 610 "../src/source_parser.vala"
					_tmp6_ = current_line;
#line 610 "../src/source_parser.vala"
					current_line = _tmp6_ + 1;
#line 5504 "source_parser.c"
				}
#line 612 "../src/source_parser.vala"
				_tmp7_ = output;
#line 612 "../src/source_parser.vala"
				_tmp8_ = token;
#line 612 "../src/source_parser.vala"
				_tmp9_ = _tmp8_->text;
#line 612 "../src/source_parser.vala"
				g_string_append (_tmp7_, _tmp9_);
#line 613 "../src/source_parser.vala"
				_tmp10_ = token;
#line 613 "../src/source_parser.vala"
				_tmp11_ = _tmp10_->text;
#line 613 "../src/source_parser.vala"
				current_line += php_to_vala_source_parser_count_newlines (_tmp11_);
#line 606 "../src/source_parser.vala"
				_g_object_unref0 (token);
#line 5522 "source_parser.c"
			}
		}
	}
#line 615 "../src/source_parser.vala"
	_tmp12_ = output;
#line 615 "../src/source_parser.vala"
	_tmp13_ = _tmp12_->str;
#line 615 "../src/source_parser.vala"
	_tmp14_ = g_strdup (_tmp13_);
#line 615 "../src/source_parser.vala"
	result = _tmp14_;
#line 615 "../src/source_parser.vala"
	_g_string_free0 (output);
#line 615 "../src/source_parser.vala"
	return result;
#line 5538 "source_parser.c"
}

static gchar
string_get (const gchar* self,
            glong index)
{
	gchar _tmp0_;
	gchar result;
#line 1283 "glib-2.0.vapi"
	g_return_val_if_fail (self != NULL, '\0');
#line 1284 "glib-2.0.vapi"
	_tmp0_ = ((gchar*) self)[index];
#line 1284 "glib-2.0.vapi"
	result = _tmp0_;
#line 1284 "glib-2.0.vapi"
	return result;
#line 5555 "source_parser.c"
}

static gint
php_to_vala_source_parser_count_newlines (const gchar* text)
{
	gint count = 0;
	gint result;
#line 618 "../src/source_parser.vala"
	g_return_val_if_fail (text != NULL, -1);
#line 619 "../src/source_parser.vala"
	count = 0;
#line 5567 "source_parser.c"
	{
		gint i = 0;
#line 620 "../src/source_parser.vala"
		i = 0;
#line 5572 "source_parser.c"
		{
			gboolean _tmp0_ = FALSE;
#line 620 "../src/source_parser.vala"
			_tmp0_ = TRUE;
#line 620 "../src/source_parser.vala"
			while (TRUE) {
#line 5579 "source_parser.c"
				gint _tmp2_;
				gint _tmp3_;
#line 620 "../src/source_parser.vala"
				if (!_tmp0_) {
#line 5584 "source_parser.c"
					gint _tmp1_;
#line 620 "../src/source_parser.vala"
					_tmp1_ = i;
#line 620 "../src/source_parser.vala"
					i = _tmp1_ + 1;
#line 5590 "source_parser.c"
				}
#line 620 "../src/source_parser.vala"
				_tmp0_ = FALSE;
#line 620 "../src/source_parser.vala"
				_tmp2_ = strlen (text);
#line 620 "../src/source_parser.vala"
				_tmp3_ = _tmp2_;
#line 620 "../src/source_parser.vala"
				if (!(i < _tmp3_)) {
#line 620 "../src/source_parser.vala"
					break;
#line 5602 "source_parser.c"
				}
#line 621 "../src/source_parser.vala"
				if (string_get (text, (glong) i) == '\n') {
#line 5606 "source_parser.c"
					gint _tmp4_;
#line 622 "../src/source_parser.vala"
					_tmp4_ = count;
#line 622 "../src/source_parser.vala"
					count = _tmp4_ + 1;
#line 5612 "source_parser.c"
				}
			}
		}
	}
#line 625 "../src/source_parser.vala"
	result = count;
#line 625 "../src/source_parser.vala"
	return result;
#line 5621 "source_parser.c"
}

static gchar*
php_to_vala_source_parser_build_main_source_without_spans (const gchar* source,
                                                           GeeArrayList* spans)
{
	GString* output = NULL;
	GString* _tmp0_;
	gchar** lines = NULL;
	gchar** _tmp1_;
	gchar** _tmp2_;
	gint lines_length1;
	gint _lines_size_;
	GString* _tmp10_;
	const gchar* _tmp11_;
	gchar* _tmp12_;
	gchar* result;
#line 628 "../src/source_parser.vala"
	g_return_val_if_fail (source != NULL, NULL);
#line 628 "../src/source_parser.vala"
	g_return_val_if_fail (spans != NULL, NULL);
#line 629 "../src/source_parser.vala"
	_tmp0_ = g_string_new ("");
#line 629 "../src/source_parser.vala"
	output = _tmp0_;
#line 630 "../src/source_parser.vala"
	_tmp2_ = _tmp1_ = g_strsplit (source, "\n", 0);
#line 630 "../src/source_parser.vala"
	lines = _tmp2_;
#line 630 "../src/source_parser.vala"
	lines_length1 = _vala_array_length (_tmp1_);
#line 630 "../src/source_parser.vala"
	_lines_size_ = lines_length1;
#line 5655 "source_parser.c"
	{
		gint i = 0;
#line 632 "../src/source_parser.vala"
		i = 0;
#line 5660 "source_parser.c"
		{
			gboolean _tmp3_ = FALSE;
#line 632 "../src/source_parser.vala"
			_tmp3_ = TRUE;
#line 632 "../src/source_parser.vala"
			while (TRUE) {
#line 5667 "source_parser.c"
				gchar** _tmp5_;
				gint _tmp5__length1;
				gint line_number = 0;
				GString* _tmp9_;
#line 632 "../src/source_parser.vala"
				if (!_tmp3_) {
#line 5674 "source_parser.c"
					gint _tmp4_;
#line 632 "../src/source_parser.vala"
					_tmp4_ = i;
#line 632 "../src/source_parser.vala"
					i = _tmp4_ + 1;
#line 5680 "source_parser.c"
				}
#line 632 "../src/source_parser.vala"
				_tmp3_ = FALSE;
#line 632 "../src/source_parser.vala"
				_tmp5_ = lines;
#line 632 "../src/source_parser.vala"
				_tmp5__length1 = lines_length1;
#line 632 "../src/source_parser.vala"
				if (!(i < _tmp5__length1)) {
#line 632 "../src/source_parser.vala"
					break;
#line 5692 "source_parser.c"
				}
#line 633 "../src/source_parser.vala"
				line_number = i + 1;
#line 634 "../src/source_parser.vala"
				if (!php_to_vala_source_parser_line_is_inside_span (line_number, spans)) {
#line 5698 "source_parser.c"
					GString* _tmp6_;
					gchar** _tmp7_;
					gint _tmp7__length1;
					const gchar* _tmp8_;
#line 635 "../src/source_parser.vala"
					_tmp6_ = output;
#line 635 "../src/source_parser.vala"
					_tmp7_ = lines;
#line 635 "../src/source_parser.vala"
					_tmp7__length1 = lines_length1;
#line 635 "../src/source_parser.vala"
					_tmp8_ = _tmp7_[i];
#line 635 "../src/source_parser.vala"
					g_string_append (_tmp6_, _tmp8_);
#line 5713 "source_parser.c"
				}
#line 637 "../src/source_parser.vala"
				_tmp9_ = output;
#line 637 "../src/source_parser.vala"
				g_string_append (_tmp9_, "\n");
#line 5719 "source_parser.c"
			}
		}
	}
#line 640 "../src/source_parser.vala"
	_tmp10_ = output;
#line 640 "../src/source_parser.vala"
	_tmp11_ = _tmp10_->str;
#line 640 "../src/source_parser.vala"
	_tmp12_ = g_strdup (_tmp11_);
#line 640 "../src/source_parser.vala"
	result = _tmp12_;
#line 640 "../src/source_parser.vala"
	lines = (_vala_array_free (lines, lines_length1, (GDestroyNotify) g_free), NULL);
#line 640 "../src/source_parser.vala"
	_g_string_free0 (output);
#line 640 "../src/source_parser.vala"
	return result;
#line 5737 "source_parser.c"
}

static gboolean
php_to_vala_source_parser_line_is_inside_span (gint line_number,
                                               GeeArrayList* spans)
{
	gboolean result;
#line 643 "../src/source_parser.vala"
	g_return_val_if_fail (spans != NULL, FALSE);
#line 5747 "source_parser.c"
	{
		GeeArrayList* _span_list = NULL;
		gint _span_size = 0;
		GeeArrayList* _tmp0_;
		gint _tmp1_;
		gint _tmp2_;
		gint _span_index = 0;
#line 644 "../src/source_parser.vala"
		_span_list = spans;
#line 644 "../src/source_parser.vala"
		_tmp0_ = _span_list;
#line 644 "../src/source_parser.vala"
		_tmp1_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp0_);
#line 644 "../src/source_parser.vala"
		_tmp2_ = _tmp1_;
#line 644 "../src/source_parser.vala"
		_span_size = _tmp2_;
#line 644 "../src/source_parser.vala"
		_span_index = -1;
#line 644 "../src/source_parser.vala"
		while (TRUE) {
#line 5769 "source_parser.c"
			gint _tmp3_;
			gint _tmp4_;
			PhpToValaSourceParserSourceSpan* span = NULL;
			GeeArrayList* _tmp5_;
			gpointer _tmp6_;
			gboolean _tmp7_ = FALSE;
			PhpToValaSourceParserSourceSpan* _tmp8_;
#line 644 "../src/source_parser.vala"
			_span_index = _span_index + 1;
#line 644 "../src/source_parser.vala"
			_tmp3_ = _span_index;
#line 644 "../src/source_parser.vala"
			_tmp4_ = _span_size;
#line 644 "../src/source_parser.vala"
			if (!(_tmp3_ < _tmp4_)) {
#line 644 "../src/source_parser.vala"
				break;
#line 5787 "source_parser.c"
			}
#line 644 "../src/source_parser.vala"
			_tmp5_ = _span_list;
#line 644 "../src/source_parser.vala"
			_tmp6_ = gee_abstract_list_get ((GeeAbstractList*) _tmp5_, _span_index);
#line 644 "../src/source_parser.vala"
			span = (PhpToValaSourceParserSourceSpan*) _tmp6_;
#line 645 "../src/source_parser.vala"
			_tmp8_ = span;
#line 645 "../src/source_parser.vala"
			if (line_number >= _tmp8_->start_line) {
#line 5799 "source_parser.c"
				PhpToValaSourceParserSourceSpan* _tmp9_;
#line 645 "../src/source_parser.vala"
				_tmp9_ = span;
#line 645 "../src/source_parser.vala"
				_tmp7_ = line_number <= _tmp9_->end_line;
#line 5805 "source_parser.c"
			} else {
#line 645 "../src/source_parser.vala"
				_tmp7_ = FALSE;
#line 5809 "source_parser.c"
			}
#line 645 "../src/source_parser.vala"
			if (_tmp7_) {
#line 646 "../src/source_parser.vala"
				result = TRUE;
#line 646 "../src/source_parser.vala"
				_g_object_unref0 (span);
#line 646 "../src/source_parser.vala"
				return result;
#line 5819 "source_parser.c"
			}
#line 644 "../src/source_parser.vala"
			_g_object_unref0 (span);
#line 5823 "source_parser.c"
		}
	}
#line 649 "../src/source_parser.vala"
	result = FALSE;
#line 649 "../src/source_parser.vala"
	return result;
#line 5830 "source_parser.c"
}

Statements*
php_to_vala_source_parser_collect_statements (const gchar* body,
                                              gint first_line_number)
{
	Statements* statements = NULL;
	Statements* _tmp0_;
	gchar** lines = NULL;
	gchar** _tmp1_;
	gchar** _tmp2_;
	gint lines_length1;
	gint _lines_size_;
	GString* pending = NULL;
	gint pending_line = 0;
	GString* pending_comment = NULL;
	gint pending_comment_line = 0;
	gint php_line_number = 0;
	gchar** _tmp3_;
	gint _tmp3__length1;
	GString* _tmp67_;
	GString* _tmp76_;
	Statements* result;
#line 652 "../src/source_parser.vala"
	g_return_val_if_fail (body != NULL, NULL);
#line 653 "../src/source_parser.vala"
	_tmp0_ = statements_new ();
#line 653 "../src/source_parser.vala"
	statements = _tmp0_;
#line 654 "../src/source_parser.vala"
	_tmp2_ = _tmp1_ = g_strsplit (body, "\n", 0);
#line 654 "../src/source_parser.vala"
	lines = _tmp2_;
#line 654 "../src/source_parser.vala"
	lines_length1 = _vala_array_length (_tmp1_);
#line 654 "../src/source_parser.vala"
	_lines_size_ = lines_length1;
#line 655 "../src/source_parser.vala"
	pending = NULL;
#line 656 "../src/source_parser.vala"
	pending_line = 0;
#line 657 "../src/source_parser.vala"
	pending_comment = NULL;
#line 658 "../src/source_parser.vala"
	pending_comment_line = 0;
#line 659 "../src/source_parser.vala"
	php_line_number = first_line_number - 1;
#line 661 "../src/source_parser.vala"
	_tmp3_ = lines;
#line 661 "../src/source_parser.vala"
	_tmp3__length1 = lines_length1;
#line 5882 "source_parser.c"
	{
		gchar** raw_line_collection = NULL;
		gint raw_line_collection_length1 = 0;
		gint _raw_line_collection_size_ = 0;
		gint raw_line_it = 0;
#line 661 "../src/source_parser.vala"
		raw_line_collection = _tmp3_;
#line 661 "../src/source_parser.vala"
		raw_line_collection_length1 = _tmp3__length1;
#line 661 "../src/source_parser.vala"
		for (raw_line_it = 0; raw_line_it < raw_line_collection_length1; raw_line_it = raw_line_it + 1) {
#line 5894 "source_parser.c"
			gchar* _tmp4_;
			gchar* raw_line = NULL;
#line 661 "../src/source_parser.vala"
			_tmp4_ = g_strdup (raw_line_collection[raw_line_it]);
#line 661 "../src/source_parser.vala"
			raw_line = _tmp4_;
#line 5901 "source_parser.c"
			{
				gint _tmp5_;
				gchar* line = NULL;
				const gchar* _tmp6_;
				gchar* _tmp7_;
				GString* _tmp8_;
				gboolean _tmp21_ = FALSE;
				const gchar* _tmp22_;
				const gchar* _tmp24_;
				GString* _tmp36_;
				gboolean _tmp60_ = FALSE;
				const gchar* _tmp61_;
				Statements* _tmp65_;
				const gchar* _tmp66_;
#line 662 "../src/source_parser.vala"
				_tmp5_ = php_line_number;
#line 662 "../src/source_parser.vala"
				php_line_number = _tmp5_ + 1;
#line 663 "../src/source_parser.vala"
				_tmp6_ = raw_line;
#line 663 "../src/source_parser.vala"
				_tmp7_ = string_strip (_tmp6_);
#line 663 "../src/source_parser.vala"
				line = _tmp7_;
#line 665 "../src/source_parser.vala"
				_tmp8_ = pending_comment;
#line 665 "../src/source_parser.vala"
				if (_tmp8_ != NULL) {
#line 5930 "source_parser.c"
					GString* _tmp9_;
					GString* _tmp10_;
					const gchar* _tmp11_;
					const gchar* _tmp12_;
#line 666 "../src/source_parser.vala"
					_tmp9_ = pending_comment;
#line 666 "../src/source_parser.vala"
					g_string_append (_tmp9_, "\n");
#line 667 "../src/source_parser.vala"
					_tmp10_ = pending_comment;
#line 667 "../src/source_parser.vala"
					_tmp11_ = line;
#line 667 "../src/source_parser.vala"
					g_string_append (_tmp10_, _tmp11_);
#line 669 "../src/source_parser.vala"
					_tmp12_ = line;
#line 669 "../src/source_parser.vala"
					if (string_index_of (_tmp12_, "*/", 0) >= 0) {
#line 5949 "source_parser.c"
						Statements* _tmp13_;
						GeeArrayList* _tmp14_;
						GString* _tmp15_;
						const gchar* _tmp16_;
						Statements* _tmp17_;
						GeeArrayList* _tmp18_;
						Statements* _tmp19_;
						GeeArrayList* _tmp20_;
#line 670 "../src/source_parser.vala"
						_tmp13_ = statements;
#line 670 "../src/source_parser.vala"
						_tmp14_ = _tmp13_->texts;
#line 670 "../src/source_parser.vala"
						_tmp15_ = pending_comment;
#line 670 "../src/source_parser.vala"
						_tmp16_ = _tmp15_->str;
#line 670 "../src/source_parser.vala"
						gee_abstract_collection_add ((GeeAbstractCollection*) _tmp14_, _tmp16_);
#line 671 "../src/source_parser.vala"
						_tmp17_ = statements;
#line 671 "../src/source_parser.vala"
						_tmp18_ = _tmp17_->lines;
#line 671 "../src/source_parser.vala"
						gee_abstract_collection_add ((GeeAbstractCollection*) _tmp18_, (gpointer) ((gintptr) pending_comment_line));
#line 672 "../src/source_parser.vala"
						_tmp19_ = statements;
#line 672 "../src/source_parser.vala"
						_tmp20_ = _tmp19_->columns;
#line 672 "../src/source_parser.vala"
						gee_abstract_collection_add ((GeeAbstractCollection*) _tmp20_, (gpointer) ((gintptr) 1));
#line 673 "../src/source_parser.vala"
						_g_string_free0 (pending_comment);
#line 673 "../src/source_parser.vala"
						pending_comment = NULL;
#line 5984 "source_parser.c"
					}
#line 675 "../src/source_parser.vala"
					_g_free0 (line);
#line 675 "../src/source_parser.vala"
					_g_free0 (raw_line);
#line 675 "../src/source_parser.vala"
					continue;
#line 5992 "source_parser.c"
				}
#line 678 "../src/source_parser.vala"
				_tmp22_ = line;
#line 678 "../src/source_parser.vala"
				if (g_strcmp0 (_tmp22_, "") == 0) {
#line 5998 "source_parser.c"
					GString* _tmp23_;
#line 678 "../src/source_parser.vala"
					_tmp23_ = pending;
#line 678 "../src/source_parser.vala"
					_tmp21_ = _tmp23_ == NULL;
#line 6004 "source_parser.c"
				} else {
#line 678 "../src/source_parser.vala"
					_tmp21_ = FALSE;
#line 6008 "source_parser.c"
				}
#line 678 "../src/source_parser.vala"
				if (_tmp21_) {
#line 679 "../src/source_parser.vala"
					_g_free0 (line);
#line 679 "../src/source_parser.vala"
					_g_free0 (raw_line);
#line 679 "../src/source_parser.vala"
					continue;
#line 6018 "source_parser.c"
				}
#line 682 "../src/source_parser.vala"
				_tmp24_ = line;
#line 682 "../src/source_parser.vala"
				if (g_str_has_prefix (_tmp24_, "/*")) {
#line 6024 "source_parser.c"
					const gchar* _tmp25_;
#line 683 "../src/source_parser.vala"
					_tmp25_ = line;
#line 683 "../src/source_parser.vala"
					if (string_index_of (_tmp25_, "*/", 0) >= 0) {
#line 6030 "source_parser.c"
						Statements* _tmp26_;
						GeeArrayList* _tmp27_;
						const gchar* _tmp28_;
						Statements* _tmp29_;
						GeeArrayList* _tmp30_;
						Statements* _tmp31_;
						GeeArrayList* _tmp32_;
						const gchar* _tmp33_;
#line 684 "../src/source_parser.vala"
						_tmp26_ = statements;
#line 684 "../src/source_parser.vala"
						_tmp27_ = _tmp26_->texts;
#line 684 "../src/source_parser.vala"
						_tmp28_ = line;
#line 684 "../src/source_parser.vala"
						gee_abstract_collection_add ((GeeAbstractCollection*) _tmp27_, _tmp28_);
#line 685 "../src/source_parser.vala"
						_tmp29_ = statements;
#line 685 "../src/source_parser.vala"
						_tmp30_ = _tmp29_->lines;
#line 685 "../src/source_parser.vala"
						gee_abstract_collection_add ((GeeAbstractCollection*) _tmp30_, (gpointer) ((gintptr) php_line_number));
#line 686 "../src/source_parser.vala"
						_tmp31_ = statements;
#line 686 "../src/source_parser.vala"
						_tmp32_ = _tmp31_->columns;
#line 686 "../src/source_parser.vala"
						_tmp33_ = raw_line;
#line 686 "../src/source_parser.vala"
						gee_abstract_collection_add ((GeeAbstractCollection*) _tmp32_, (gpointer) ((gintptr) php_to_vala_source_parser_first_non_whitespace_column (_tmp33_)));
#line 6061 "source_parser.c"
					} else {
						const gchar* _tmp34_;
						GString* _tmp35_;
#line 688 "../src/source_parser.vala"
						_tmp34_ = line;
#line 688 "../src/source_parser.vala"
						_tmp35_ = g_string_new (_tmp34_);
#line 688 "../src/source_parser.vala"
						_g_string_free0 (pending_comment);
#line 688 "../src/source_parser.vala"
						pending_comment = _tmp35_;
#line 689 "../src/source_parser.vala"
						pending_comment_line = php_line_number;
#line 6075 "source_parser.c"
					}
#line 691 "../src/source_parser.vala"
					_g_free0 (line);
#line 691 "../src/source_parser.vala"
					_g_free0 (raw_line);
#line 691 "../src/source_parser.vala"
					continue;
#line 6083 "source_parser.c"
				}
#line 694 "../src/source_parser.vala"
				_tmp36_ = pending;
#line 694 "../src/source_parser.vala"
				if (_tmp36_ != NULL) {
#line 6089 "source_parser.c"
					gboolean _tmp37_ = FALSE;
					const gchar* _tmp38_;
					const gchar* _tmp40_;
					gchar* _tmp41_;
					gchar* _tmp42_;
					gchar* _tmp43_;
					const gchar* _tmp44_;
					GString* _tmp45_;
					GString* _tmp46_;
					const gchar* _tmp47_;
					gboolean _tmp48_ = FALSE;
					const gchar* _tmp49_;
#line 695 "../src/source_parser.vala"
					_tmp38_ = line;
#line 695 "../src/source_parser.vala"
					if (g_str_has_prefix (_tmp38_, "//")) {
#line 695 "../src/source_parser.vala"
						_tmp37_ = TRUE;
#line 6108 "source_parser.c"
					} else {
						const gchar* _tmp39_;
#line 695 "../src/source_parser.vala"
						_tmp39_ = line;
#line 695 "../src/source_parser.vala"
						_tmp37_ = g_str_has_prefix (_tmp39_, "#");
#line 6115 "source_parser.c"
					}
#line 695 "../src/source_parser.vala"
					if (_tmp37_) {
#line 696 "../src/source_parser.vala"
						_g_free0 (line);
#line 696 "../src/source_parser.vala"
						_g_free0 (raw_line);
#line 696 "../src/source_parser.vala"
						continue;
#line 6125 "source_parser.c"
					}
#line 698 "../src/source_parser.vala"
					_tmp40_ = line;
#line 698 "../src/source_parser.vala"
					_tmp41_ = php_to_vala_source_parser_strip_line_comment (_tmp40_);
#line 698 "../src/source_parser.vala"
					_tmp42_ = _tmp41_;
#line 698 "../src/source_parser.vala"
					_tmp43_ = string_strip (_tmp42_);
#line 698 "../src/source_parser.vala"
					_g_free0 (line);
#line 698 "../src/source_parser.vala"
					line = _tmp43_;
#line 698 "../src/source_parser.vala"
					_g_free0 (_tmp42_);
#line 699 "../src/source_parser.vala"
					_tmp44_ = line;
#line 699 "../src/source_parser.vala"
					if (g_strcmp0 (_tmp44_, "") == 0) {
#line 700 "../src/source_parser.vala"
						_g_free0 (line);
#line 700 "../src/source_parser.vala"
						_g_free0 (raw_line);
#line 700 "../src/source_parser.vala"
						continue;
#line 6151 "source_parser.c"
					}
#line 702 "../src/source_parser.vala"
					_tmp45_ = pending;
#line 702 "../src/source_parser.vala"
					g_string_append (_tmp45_, " ");
#line 703 "../src/source_parser.vala"
					_tmp46_ = pending;
#line 703 "../src/source_parser.vala"
					_tmp47_ = line;
#line 703 "../src/source_parser.vala"
					g_string_append (_tmp46_, _tmp47_);
#line 705 "../src/source_parser.vala"
					_tmp49_ = line;
#line 705 "../src/source_parser.vala"
					if (g_str_has_suffix (_tmp49_, ";")) {
#line 6167 "source_parser.c"
						GString* _tmp50_;
						const gchar* _tmp51_;
#line 705 "../src/source_parser.vala"
						_tmp50_ = pending;
#line 705 "../src/source_parser.vala"
						_tmp51_ = _tmp50_->str;
#line 705 "../src/source_parser.vala"
						_tmp48_ = php_to_vala_source_parser_nesting_depth (_tmp51_) <= 0;
#line 6176 "source_parser.c"
					} else {
#line 705 "../src/source_parser.vala"
						_tmp48_ = FALSE;
#line 6180 "source_parser.c"
					}
#line 705 "../src/source_parser.vala"
					if (_tmp48_) {
#line 6184 "source_parser.c"
						Statements* _tmp52_;
						GeeArrayList* _tmp53_;
						GString* _tmp54_;
						const gchar* _tmp55_;
						Statements* _tmp56_;
						GeeArrayList* _tmp57_;
						Statements* _tmp58_;
						GeeArrayList* _tmp59_;
#line 706 "../src/source_parser.vala"
						_tmp52_ = statements;
#line 706 "../src/source_parser.vala"
						_tmp53_ = _tmp52_->texts;
#line 706 "../src/source_parser.vala"
						_tmp54_ = pending;
#line 706 "../src/source_parser.vala"
						_tmp55_ = _tmp54_->str;
#line 706 "../src/source_parser.vala"
						gee_abstract_collection_add ((GeeAbstractCollection*) _tmp53_, _tmp55_);
#line 707 "../src/source_parser.vala"
						_tmp56_ = statements;
#line 707 "../src/source_parser.vala"
						_tmp57_ = _tmp56_->lines;
#line 707 "../src/source_parser.vala"
						gee_abstract_collection_add ((GeeAbstractCollection*) _tmp57_, (gpointer) ((gintptr) pending_line));
#line 708 "../src/source_parser.vala"
						_tmp58_ = statements;
#line 708 "../src/source_parser.vala"
						_tmp59_ = _tmp58_->columns;
#line 708 "../src/source_parser.vala"
						gee_abstract_collection_add ((GeeAbstractCollection*) _tmp59_, (gpointer) ((gintptr) 1));
#line 709 "../src/source_parser.vala"
						_g_string_free0 (pending);
#line 709 "../src/source_parser.vala"
						pending = NULL;
#line 6219 "source_parser.c"
					}
#line 711 "../src/source_parser.vala"
					_g_free0 (line);
#line 711 "../src/source_parser.vala"
					_g_free0 (raw_line);
#line 711 "../src/source_parser.vala"
					continue;
#line 6227 "source_parser.c"
				}
#line 714 "../src/source_parser.vala"
				_tmp61_ = line;
#line 714 "../src/source_parser.vala"
				if (php_to_vala_source_parser_starts_multiline_assignment (_tmp61_)) {
#line 714 "../src/source_parser.vala"
					_tmp60_ = TRUE;
#line 6235 "source_parser.c"
				} else {
					const gchar* _tmp62_;
#line 714 "../src/source_parser.vala"
					_tmp62_ = line;
#line 714 "../src/source_parser.vala"
					_tmp60_ = php_to_vala_source_parser_starts_multiline_parenthesized_statement (_tmp62_);
#line 6242 "source_parser.c"
				}
#line 714 "../src/source_parser.vala"
				if (_tmp60_) {
#line 6246 "source_parser.c"
					const gchar* _tmp63_;
					GString* _tmp64_;
#line 715 "../src/source_parser.vala"
					_tmp63_ = line;
#line 715 "../src/source_parser.vala"
					_tmp64_ = g_string_new (_tmp63_);
#line 715 "../src/source_parser.vala"
					_g_string_free0 (pending);
#line 715 "../src/source_parser.vala"
					pending = _tmp64_;
#line 716 "../src/source_parser.vala"
					pending_line = php_line_number;
#line 717 "../src/source_parser.vala"
					_g_free0 (line);
#line 717 "../src/source_parser.vala"
					_g_free0 (raw_line);
#line 717 "../src/source_parser.vala"
					continue;
#line 6265 "source_parser.c"
				}
#line 720 "../src/source_parser.vala"
				_tmp65_ = statements;
#line 720 "../src/source_parser.vala"
				_tmp66_ = line;
#line 720 "../src/source_parser.vala"
				php_to_vala_source_parser_add_line_statements (_tmp65_, _tmp66_, php_line_number);
#line 661 "../src/source_parser.vala"
				_g_free0 (line);
#line 661 "../src/source_parser.vala"
				_g_free0 (raw_line);
#line 6277 "source_parser.c"
			}
		}
	}
#line 723 "../src/source_parser.vala"
	_tmp67_ = pending;
#line 723 "../src/source_parser.vala"
	if (_tmp67_ != NULL) {
#line 6285 "source_parser.c"
		Statements* _tmp68_;
		GeeArrayList* _tmp69_;
		GString* _tmp70_;
		const gchar* _tmp71_;
		Statements* _tmp72_;
		GeeArrayList* _tmp73_;
		Statements* _tmp74_;
		GeeArrayList* _tmp75_;
#line 724 "../src/source_parser.vala"
		_tmp68_ = statements;
#line 724 "../src/source_parser.vala"
		_tmp69_ = _tmp68_->texts;
#line 724 "../src/source_parser.vala"
		_tmp70_ = pending;
#line 724 "../src/source_parser.vala"
		_tmp71_ = _tmp70_->str;
#line 724 "../src/source_parser.vala"
		gee_abstract_collection_add ((GeeAbstractCollection*) _tmp69_, _tmp71_);
#line 725 "../src/source_parser.vala"
		_tmp72_ = statements;
#line 725 "../src/source_parser.vala"
		_tmp73_ = _tmp72_->lines;
#line 725 "../src/source_parser.vala"
		gee_abstract_collection_add ((GeeAbstractCollection*) _tmp73_, (gpointer) ((gintptr) pending_line));
#line 726 "../src/source_parser.vala"
		_tmp74_ = statements;
#line 726 "../src/source_parser.vala"
		_tmp75_ = _tmp74_->columns;
#line 726 "../src/source_parser.vala"
		gee_abstract_collection_add ((GeeAbstractCollection*) _tmp75_, (gpointer) ((gintptr) 1));
#line 6316 "source_parser.c"
	}
#line 728 "../src/source_parser.vala"
	_tmp76_ = pending_comment;
#line 728 "../src/source_parser.vala"
	if (_tmp76_ != NULL) {
#line 6322 "source_parser.c"
		Statements* _tmp77_;
		GeeArrayList* _tmp78_;
		GString* _tmp79_;
		const gchar* _tmp80_;
		Statements* _tmp81_;
		GeeArrayList* _tmp82_;
		Statements* _tmp83_;
		GeeArrayList* _tmp84_;
#line 729 "../src/source_parser.vala"
		_tmp77_ = statements;
#line 729 "../src/source_parser.vala"
		_tmp78_ = _tmp77_->texts;
#line 729 "../src/source_parser.vala"
		_tmp79_ = pending_comment;
#line 729 "../src/source_parser.vala"
		_tmp80_ = _tmp79_->str;
#line 729 "../src/source_parser.vala"
		gee_abstract_collection_add ((GeeAbstractCollection*) _tmp78_, _tmp80_);
#line 730 "../src/source_parser.vala"
		_tmp81_ = statements;
#line 730 "../src/source_parser.vala"
		_tmp82_ = _tmp81_->lines;
#line 730 "../src/source_parser.vala"
		gee_abstract_collection_add ((GeeAbstractCollection*) _tmp82_, (gpointer) ((gintptr) pending_comment_line));
#line 731 "../src/source_parser.vala"
		_tmp83_ = statements;
#line 731 "../src/source_parser.vala"
		_tmp84_ = _tmp83_->columns;
#line 731 "../src/source_parser.vala"
		gee_abstract_collection_add ((GeeAbstractCollection*) _tmp84_, (gpointer) ((gintptr) 1));
#line 6353 "source_parser.c"
	}
#line 734 "../src/source_parser.vala"
	result = statements;
#line 734 "../src/source_parser.vala"
	_g_string_free0 (pending_comment);
#line 734 "../src/source_parser.vala"
	_g_string_free0 (pending);
#line 734 "../src/source_parser.vala"
	lines = (_vala_array_free (lines, lines_length1, (GDestroyNotify) g_free), NULL);
#line 734 "../src/source_parser.vala"
	return result;
#line 6365 "source_parser.c"
}

static void
php_to_vala_source_parser_add_line_statements (Statements* statements,
                                               const gchar* line,
                                               gint php_line_number)
{
#line 737 "../src/source_parser.vala"
	g_return_if_fail (statements != NULL);
#line 737 "../src/source_parser.vala"
	g_return_if_fail (line != NULL);
#line 6377 "source_parser.c"
	{
		GeeArrayList* _slice_list = NULL;
		GeeArrayList* _tmp0_;
		gint _slice_size = 0;
		GeeArrayList* _tmp1_;
		gint _tmp2_;
		gint _tmp3_;
		gint _slice_index = 0;
#line 738 "../src/source_parser.vala"
		_tmp0_ = php_to_vala_source_parser_split_statement_line (line);
#line 738 "../src/source_parser.vala"
		_slice_list = _tmp0_;
#line 738 "../src/source_parser.vala"
		_tmp1_ = _slice_list;
#line 738 "../src/source_parser.vala"
		_tmp2_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp1_);
#line 738 "../src/source_parser.vala"
		_tmp3_ = _tmp2_;
#line 738 "../src/source_parser.vala"
		_slice_size = _tmp3_;
#line 738 "../src/source_parser.vala"
		_slice_index = -1;
#line 738 "../src/source_parser.vala"
		while (TRUE) {
#line 6402 "source_parser.c"
			gint _tmp4_;
			gint _tmp5_;
			PhpToValaSourceParserStatementSlice* slice = NULL;
			GeeArrayList* _tmp6_;
			gpointer _tmp7_;
			gchar* clean = NULL;
			PhpToValaSourceParserStatementSlice* _tmp8_;
			const gchar* _tmp9_;
			gchar* _tmp10_;
			const gchar* _tmp11_;
			GeeArrayList* _tmp12_;
			const gchar* _tmp13_;
			GeeArrayList* _tmp14_;
			GeeArrayList* _tmp15_;
			PhpToValaSourceParserStatementSlice* _tmp16_;
#line 738 "../src/source_parser.vala"
			_slice_index = _slice_index + 1;
#line 738 "../src/source_parser.vala"
			_tmp4_ = _slice_index;
#line 738 "../src/source_parser.vala"
			_tmp5_ = _slice_size;
#line 738 "../src/source_parser.vala"
			if (!(_tmp4_ < _tmp5_)) {
#line 738 "../src/source_parser.vala"
				break;
#line 6428 "source_parser.c"
			}
#line 738 "../src/source_parser.vala"
			_tmp6_ = _slice_list;
#line 738 "../src/source_parser.vala"
			_tmp7_ = gee_abstract_list_get ((GeeAbstractList*) _tmp6_, _slice_index);
#line 738 "../src/source_parser.vala"
			slice = (PhpToValaSourceParserStatementSlice*) _tmp7_;
#line 739 "../src/source_parser.vala"
			_tmp8_ = slice;
#line 739 "../src/source_parser.vala"
			_tmp9_ = _tmp8_->text;
#line 739 "../src/source_parser.vala"
			_tmp10_ = string_strip (_tmp9_);
#line 739 "../src/source_parser.vala"
			clean = _tmp10_;
#line 740 "../src/source_parser.vala"
			_tmp11_ = clean;
#line 740 "../src/source_parser.vala"
			if (g_strcmp0 (_tmp11_, "") == 0) {
#line 741 "../src/source_parser.vala"
				_g_free0 (clean);
#line 741 "../src/source_parser.vala"
				_g_object_unref0 (slice);
#line 741 "../src/source_parser.vala"
				continue;
#line 6454 "source_parser.c"
			}
#line 743 "../src/source_parser.vala"
			_tmp12_ = statements->texts;
#line 743 "../src/source_parser.vala"
			_tmp13_ = clean;
#line 743 "../src/source_parser.vala"
			gee_abstract_collection_add ((GeeAbstractCollection*) _tmp12_, _tmp13_);
#line 744 "../src/source_parser.vala"
			_tmp14_ = statements->lines;
#line 744 "../src/source_parser.vala"
			gee_abstract_collection_add ((GeeAbstractCollection*) _tmp14_, (gpointer) ((gintptr) php_line_number));
#line 745 "../src/source_parser.vala"
			_tmp15_ = statements->columns;
#line 745 "../src/source_parser.vala"
			_tmp16_ = slice;
#line 745 "../src/source_parser.vala"
			gee_abstract_collection_add ((GeeAbstractCollection*) _tmp15_, (gpointer) ((gintptr) _tmp16_->column));
#line 738 "../src/source_parser.vala"
			_g_free0 (clean);
#line 738 "../src/source_parser.vala"
			_g_object_unref0 (slice);
#line 6476 "source_parser.c"
		}
#line 738 "../src/source_parser.vala"
		_g_object_unref0 (_slice_list);
#line 6480 "source_parser.c"
	}
}

static GeeArrayList*
php_to_vala_source_parser_split_statement_line (const gchar* line)
{
	GeeArrayList* parts = NULL;
	GeeArrayList* _tmp0_;
	gint depth = 0;
	gboolean in_single_quote = FALSE;
	gboolean in_double_quote = FALSE;
	gint start = 0;
	gint _tmp41_;
	gint _tmp42_;
	GeeArrayList* result;
#line 759 "../src/source_parser.vala"
	g_return_val_if_fail (line != NULL, NULL);
#line 760 "../src/source_parser.vala"
	_tmp0_ = gee_array_list_new (PHP_TO_VALA_SOURCE_PARSER_TYPE_STATEMENT_SLICE, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL);
#line 760 "../src/source_parser.vala"
	parts = _tmp0_;
#line 761 "../src/source_parser.vala"
	depth = 0;
#line 762 "../src/source_parser.vala"
	in_single_quote = FALSE;
#line 763 "../src/source_parser.vala"
	in_double_quote = FALSE;
#line 764 "../src/source_parser.vala"
	start = 0;
#line 6510 "source_parser.c"
	{
		gint i = 0;
#line 766 "../src/source_parser.vala"
		i = 0;
#line 6515 "source_parser.c"
		{
			gboolean _tmp1_ = FALSE;
#line 766 "../src/source_parser.vala"
			_tmp1_ = TRUE;
#line 766 "../src/source_parser.vala"
			while (TRUE) {
#line 6522 "source_parser.c"
				gint _tmp3_;
				gint _tmp4_;
				gchar c = '\0';
				gboolean _tmp5_ = FALSE;
#line 766 "../src/source_parser.vala"
				if (!_tmp1_) {
#line 6529 "source_parser.c"
					gint _tmp2_;
#line 766 "../src/source_parser.vala"
					_tmp2_ = i;
#line 766 "../src/source_parser.vala"
					i = _tmp2_ + 1;
#line 6535 "source_parser.c"
				}
#line 766 "../src/source_parser.vala"
				_tmp1_ = FALSE;
#line 766 "../src/source_parser.vala"
				_tmp3_ = strlen (line);
#line 766 "../src/source_parser.vala"
				_tmp4_ = _tmp3_;
#line 766 "../src/source_parser.vala"
				if (!(i < _tmp4_)) {
#line 766 "../src/source_parser.vala"
					break;
#line 6547 "source_parser.c"
				}
#line 767 "../src/source_parser.vala"
				c = string_get (line, (glong) i);
#line 768 "../src/source_parser.vala"
				if (c == '\'') {
#line 768 "../src/source_parser.vala"
					_tmp5_ = !in_double_quote;
#line 6555 "source_parser.c"
				} else {
#line 768 "../src/source_parser.vala"
					_tmp5_ = FALSE;
#line 6559 "source_parser.c"
				}
#line 768 "../src/source_parser.vala"
				if (_tmp5_) {
#line 769 "../src/source_parser.vala"
					in_single_quote = !in_single_quote;
#line 6565 "source_parser.c"
				} else {
					gboolean _tmp6_ = FALSE;
#line 770 "../src/source_parser.vala"
					if (c == '"') {
#line 770 "../src/source_parser.vala"
						_tmp6_ = !in_single_quote;
#line 6572 "source_parser.c"
					} else {
#line 770 "../src/source_parser.vala"
						_tmp6_ = FALSE;
#line 6576 "source_parser.c"
					}
#line 770 "../src/source_parser.vala"
					if (_tmp6_) {
#line 771 "../src/source_parser.vala"
						in_double_quote = !in_double_quote;
#line 6582 "source_parser.c"
					} else {
						gboolean _tmp7_ = FALSE;
#line 772 "../src/source_parser.vala"
						if (!in_single_quote) {
#line 772 "../src/source_parser.vala"
							_tmp7_ = !in_double_quote;
#line 6589 "source_parser.c"
						} else {
#line 772 "../src/source_parser.vala"
							_tmp7_ = FALSE;
#line 6593 "source_parser.c"
						}
#line 772 "../src/source_parser.vala"
						if (_tmp7_) {
#line 6597 "source_parser.c"
							gboolean _tmp8_ = FALSE;
							gboolean _tmp9_ = FALSE;
							gboolean _tmp28_ = FALSE;
							gboolean _tmp29_ = FALSE;
#line 773 "../src/source_parser.vala"
							if (c == '/') {
#line 6604 "source_parser.c"
								gint _tmp10_;
								gint _tmp11_;
#line 773 "../src/source_parser.vala"
								_tmp10_ = strlen (line);
#line 773 "../src/source_parser.vala"
								_tmp11_ = _tmp10_;
#line 773 "../src/source_parser.vala"
								_tmp9_ = (i + 1) < _tmp11_;
#line 6613 "source_parser.c"
							} else {
#line 773 "../src/source_parser.vala"
								_tmp9_ = FALSE;
#line 6617 "source_parser.c"
							}
#line 773 "../src/source_parser.vala"
							if (_tmp9_) {
#line 773 "../src/source_parser.vala"
								_tmp8_ = string_get (line, (glong) (i + 1)) == '/';
#line 6623 "source_parser.c"
							} else {
#line 773 "../src/source_parser.vala"
								_tmp8_ = FALSE;
#line 6627 "source_parser.c"
							}
#line 773 "../src/source_parser.vala"
							if (_tmp8_) {
#line 6631 "source_parser.c"
								gint _tmp12_;
								gint _tmp13_;
#line 774 "../src/source_parser.vala"
								_tmp12_ = strlen (line);
#line 774 "../src/source_parser.vala"
								_tmp13_ = _tmp12_;
#line 774 "../src/source_parser.vala"
								if (start < _tmp13_) {
#line 6640 "source_parser.c"
									gchar* text = NULL;
									gchar* _tmp14_;
									GeeArrayList* _tmp15_;
									const gchar* _tmp16_;
									const gchar* _tmp17_;
									PhpToValaSourceParserStatementSlice* _tmp18_;
									PhpToValaSourceParserStatementSlice* _tmp19_;
#line 775 "../src/source_parser.vala"
									_tmp14_ = string_substring (line, (glong) start, (glong) -1);
#line 775 "../src/source_parser.vala"
									text = _tmp14_;
#line 776 "../src/source_parser.vala"
									_tmp15_ = parts;
#line 776 "../src/source_parser.vala"
									_tmp16_ = text;
#line 776 "../src/source_parser.vala"
									_tmp17_ = text;
#line 776 "../src/source_parser.vala"
									_tmp18_ = php_to_vala_source_parser_statement_slice_new (_tmp16_, start + php_to_vala_source_parser_first_non_whitespace_column (_tmp17_));
#line 776 "../src/source_parser.vala"
									_tmp19_ = _tmp18_;
#line 776 "../src/source_parser.vala"
									gee_abstract_collection_add ((GeeAbstractCollection*) _tmp15_, _tmp19_);
#line 776 "../src/source_parser.vala"
									_g_object_unref0 (_tmp19_);
#line 774 "../src/source_parser.vala"
									_g_free0 (text);
#line 6668 "source_parser.c"
								}
#line 778 "../src/source_parser.vala"
								result = parts;
#line 778 "../src/source_parser.vala"
								return result;
#line 6674 "source_parser.c"
							}
#line 780 "../src/source_parser.vala"
							if (c == '#') {
#line 6678 "source_parser.c"
								gint _tmp20_;
								gint _tmp21_;
#line 781 "../src/source_parser.vala"
								_tmp20_ = strlen (line);
#line 781 "../src/source_parser.vala"
								_tmp21_ = _tmp20_;
#line 781 "../src/source_parser.vala"
								if (start < _tmp21_) {
#line 6687 "source_parser.c"
									gchar* text = NULL;
									gchar* _tmp22_;
									GeeArrayList* _tmp23_;
									const gchar* _tmp24_;
									const gchar* _tmp25_;
									PhpToValaSourceParserStatementSlice* _tmp26_;
									PhpToValaSourceParserStatementSlice* _tmp27_;
#line 782 "../src/source_parser.vala"
									_tmp22_ = string_substring (line, (glong) start, (glong) -1);
#line 782 "../src/source_parser.vala"
									text = _tmp22_;
#line 783 "../src/source_parser.vala"
									_tmp23_ = parts;
#line 783 "../src/source_parser.vala"
									_tmp24_ = text;
#line 783 "../src/source_parser.vala"
									_tmp25_ = text;
#line 783 "../src/source_parser.vala"
									_tmp26_ = php_to_vala_source_parser_statement_slice_new (_tmp24_, start + php_to_vala_source_parser_first_non_whitespace_column (_tmp25_));
#line 783 "../src/source_parser.vala"
									_tmp27_ = _tmp26_;
#line 783 "../src/source_parser.vala"
									gee_abstract_collection_add ((GeeAbstractCollection*) _tmp23_, _tmp27_);
#line 783 "../src/source_parser.vala"
									_g_object_unref0 (_tmp27_);
#line 781 "../src/source_parser.vala"
									_g_free0 (text);
#line 6715 "source_parser.c"
								}
#line 785 "../src/source_parser.vala"
								result = parts;
#line 785 "../src/source_parser.vala"
								return result;
#line 6721 "source_parser.c"
							}
#line 787 "../src/source_parser.vala"
							if (c == '(') {
#line 787 "../src/source_parser.vala"
								_tmp29_ = TRUE;
#line 6727 "source_parser.c"
							} else {
#line 787 "../src/source_parser.vala"
								_tmp29_ = c == '[';
#line 6731 "source_parser.c"
							}
#line 787 "../src/source_parser.vala"
							if (_tmp29_) {
#line 787 "../src/source_parser.vala"
								_tmp28_ = TRUE;
#line 6737 "source_parser.c"
							} else {
#line 787 "../src/source_parser.vala"
								_tmp28_ = c == '{';
#line 6741 "source_parser.c"
							}
#line 787 "../src/source_parser.vala"
							if (_tmp28_) {
#line 6745 "source_parser.c"
								gint _tmp30_;
#line 788 "../src/source_parser.vala"
								_tmp30_ = depth;
#line 788 "../src/source_parser.vala"
								depth = _tmp30_ + 1;
#line 6751 "source_parser.c"
							} else {
								gboolean _tmp31_ = FALSE;
								gboolean _tmp32_ = FALSE;
#line 789 "../src/source_parser.vala"
								if (c == ')') {
#line 789 "../src/source_parser.vala"
									_tmp32_ = TRUE;
#line 6759 "source_parser.c"
								} else {
#line 789 "../src/source_parser.vala"
									_tmp32_ = c == ']';
#line 6763 "source_parser.c"
								}
#line 789 "../src/source_parser.vala"
								if (_tmp32_) {
#line 789 "../src/source_parser.vala"
									_tmp31_ = TRUE;
#line 6769 "source_parser.c"
								} else {
#line 789 "../src/source_parser.vala"
									_tmp31_ = c == '}';
#line 6773 "source_parser.c"
								}
#line 789 "../src/source_parser.vala"
								if (_tmp31_) {
#line 6777 "source_parser.c"
									gint _tmp33_;
#line 790 "../src/source_parser.vala"
									_tmp33_ = depth;
#line 790 "../src/source_parser.vala"
									depth = _tmp33_ - 1;
#line 6783 "source_parser.c"
								} else {
									gboolean _tmp34_ = FALSE;
#line 791 "../src/source_parser.vala"
									if (c == ';') {
#line 791 "../src/source_parser.vala"
										_tmp34_ = depth == 0;
#line 6790 "source_parser.c"
									} else {
#line 791 "../src/source_parser.vala"
										_tmp34_ = FALSE;
#line 6794 "source_parser.c"
									}
#line 791 "../src/source_parser.vala"
									if (_tmp34_) {
#line 6798 "source_parser.c"
										gchar* text = NULL;
										gchar* _tmp35_;
										GeeArrayList* _tmp36_;
										const gchar* _tmp37_;
										const gchar* _tmp38_;
										PhpToValaSourceParserStatementSlice* _tmp39_;
										PhpToValaSourceParserStatementSlice* _tmp40_;
#line 792 "../src/source_parser.vala"
										_tmp35_ = string_substring (line, (glong) start, (glong) ((i - start) + 1));
#line 792 "../src/source_parser.vala"
										text = _tmp35_;
#line 793 "../src/source_parser.vala"
										_tmp36_ = parts;
#line 793 "../src/source_parser.vala"
										_tmp37_ = text;
#line 793 "../src/source_parser.vala"
										_tmp38_ = text;
#line 793 "../src/source_parser.vala"
										_tmp39_ = php_to_vala_source_parser_statement_slice_new (_tmp37_, start + php_to_vala_source_parser_first_non_whitespace_column (_tmp38_));
#line 793 "../src/source_parser.vala"
										_tmp40_ = _tmp39_;
#line 793 "../src/source_parser.vala"
										gee_abstract_collection_add ((GeeAbstractCollection*) _tmp36_, _tmp40_);
#line 793 "../src/source_parser.vala"
										_g_object_unref0 (_tmp40_);
#line 794 "../src/source_parser.vala"
										start = i + 1;
#line 791 "../src/source_parser.vala"
										_g_free0 (text);
#line 6828 "source_parser.c"
									}
								}
							}
						}
					}
				}
			}
		}
	}
#line 799 "../src/source_parser.vala"
	_tmp41_ = strlen (line);
#line 799 "../src/source_parser.vala"
	_tmp42_ = _tmp41_;
#line 799 "../src/source_parser.vala"
	if (start < _tmp42_) {
#line 6844 "source_parser.c"
		gchar* text = NULL;
		gchar* _tmp43_;
		GeeArrayList* _tmp44_;
		const gchar* _tmp45_;
		const gchar* _tmp46_;
		PhpToValaSourceParserStatementSlice* _tmp47_;
		PhpToValaSourceParserStatementSlice* _tmp48_;
#line 800 "../src/source_parser.vala"
		_tmp43_ = string_substring (line, (glong) start, (glong) -1);
#line 800 "../src/source_parser.vala"
		text = _tmp43_;
#line 801 "../src/source_parser.vala"
		_tmp44_ = parts;
#line 801 "../src/source_parser.vala"
		_tmp45_ = text;
#line 801 "../src/source_parser.vala"
		_tmp46_ = text;
#line 801 "../src/source_parser.vala"
		_tmp47_ = php_to_vala_source_parser_statement_slice_new (_tmp45_, start + php_to_vala_source_parser_first_non_whitespace_column (_tmp46_));
#line 801 "../src/source_parser.vala"
		_tmp48_ = _tmp47_;
#line 801 "../src/source_parser.vala"
		gee_abstract_collection_add ((GeeAbstractCollection*) _tmp44_, _tmp48_);
#line 801 "../src/source_parser.vala"
		_g_object_unref0 (_tmp48_);
#line 799 "../src/source_parser.vala"
		_g_free0 (text);
#line 6872 "source_parser.c"
	}
#line 803 "../src/source_parser.vala"
	result = parts;
#line 803 "../src/source_parser.vala"
	return result;
#line 6878 "source_parser.c"
}

static gchar*
php_to_vala_source_parser_strip_line_comment (const gchar* line)
{
	gboolean in_single_quote = FALSE;
	gboolean in_double_quote = FALSE;
	gboolean escaped = FALSE;
	gchar* _tmp15_;
	gchar* result;
#line 806 "../src/source_parser.vala"
	g_return_val_if_fail (line != NULL, NULL);
#line 807 "../src/source_parser.vala"
	in_single_quote = FALSE;
#line 808 "../src/source_parser.vala"
	in_double_quote = FALSE;
#line 809 "../src/source_parser.vala"
	escaped = FALSE;
#line 6897 "source_parser.c"
	{
		gint i = 0;
#line 811 "../src/source_parser.vala"
		i = 0;
#line 6902 "source_parser.c"
		{
			gboolean _tmp0_ = FALSE;
#line 811 "../src/source_parser.vala"
			_tmp0_ = TRUE;
#line 811 "../src/source_parser.vala"
			while (TRUE) {
#line 6909 "source_parser.c"
				gint _tmp2_;
				gint _tmp3_;
				gchar c = '\0';
				gchar _tmp4_ = '\0';
				gint _tmp5_;
				gint _tmp6_;
				gchar next = '\0';
				gboolean _tmp7_ = FALSE;
				gboolean _tmp8_ = FALSE;
				gboolean _tmp9_ = FALSE;
				gboolean _tmp10_ = FALSE;
				gboolean _tmp11_ = FALSE;
#line 811 "../src/source_parser.vala"
				if (!_tmp0_) {
#line 6924 "source_parser.c"
					gint _tmp1_;
#line 811 "../src/source_parser.vala"
					_tmp1_ = i;
#line 811 "../src/source_parser.vala"
					i = _tmp1_ + 1;
#line 6930 "source_parser.c"
				}
#line 811 "../src/source_parser.vala"
				_tmp0_ = FALSE;
#line 811 "../src/source_parser.vala"
				_tmp2_ = strlen (line);
#line 811 "../src/source_parser.vala"
				_tmp3_ = _tmp2_;
#line 811 "../src/source_parser.vala"
				if (!(i < _tmp3_)) {
#line 811 "../src/source_parser.vala"
					break;
#line 6942 "source_parser.c"
				}
#line 812 "../src/source_parser.vala"
				c = string_get (line, (glong) i);
#line 813 "../src/source_parser.vala"
				_tmp5_ = strlen (line);
#line 813 "../src/source_parser.vala"
				_tmp6_ = _tmp5_;
#line 813 "../src/source_parser.vala"
				if ((i + 1) < _tmp6_) {
#line 813 "../src/source_parser.vala"
					_tmp4_ = string_get (line, (glong) (i + 1));
#line 6954 "source_parser.c"
				} else {
#line 813 "../src/source_parser.vala"
					_tmp4_ = '\0';
#line 6958 "source_parser.c"
				}
#line 813 "../src/source_parser.vala"
				next = _tmp4_;
#line 815 "../src/source_parser.vala"
				if (escaped) {
#line 816 "../src/source_parser.vala"
					escaped = FALSE;
#line 817 "../src/source_parser.vala"
					continue;
#line 6968 "source_parser.c"
				}
#line 819 "../src/source_parser.vala"
				if (in_single_quote) {
#line 819 "../src/source_parser.vala"
					_tmp8_ = TRUE;
#line 6974 "source_parser.c"
				} else {
#line 819 "../src/source_parser.vala"
					_tmp8_ = in_double_quote;
#line 6978 "source_parser.c"
				}
#line 819 "../src/source_parser.vala"
				if (_tmp8_) {
#line 819 "../src/source_parser.vala"
					_tmp7_ = c == '\\';
#line 6984 "source_parser.c"
				} else {
#line 819 "../src/source_parser.vala"
					_tmp7_ = FALSE;
#line 6988 "source_parser.c"
				}
#line 819 "../src/source_parser.vala"
				if (_tmp7_) {
#line 820 "../src/source_parser.vala"
					escaped = TRUE;
#line 821 "../src/source_parser.vala"
					continue;
#line 6996 "source_parser.c"
				}
#line 823 "../src/source_parser.vala"
				if (c == '\'') {
#line 823 "../src/source_parser.vala"
					_tmp9_ = !in_double_quote;
#line 7002 "source_parser.c"
				} else {
#line 823 "../src/source_parser.vala"
					_tmp9_ = FALSE;
#line 7006 "source_parser.c"
				}
#line 823 "../src/source_parser.vala"
				if (_tmp9_) {
#line 824 "../src/source_parser.vala"
					in_single_quote = !in_single_quote;
#line 825 "../src/source_parser.vala"
					continue;
#line 7014 "source_parser.c"
				}
#line 827 "../src/source_parser.vala"
				if (c == '"') {
#line 827 "../src/source_parser.vala"
					_tmp10_ = !in_single_quote;
#line 7020 "source_parser.c"
				} else {
#line 827 "../src/source_parser.vala"
					_tmp10_ = FALSE;
#line 7024 "source_parser.c"
				}
#line 827 "../src/source_parser.vala"
				if (_tmp10_) {
#line 828 "../src/source_parser.vala"
					in_double_quote = !in_double_quote;
#line 829 "../src/source_parser.vala"
					continue;
#line 7032 "source_parser.c"
				}
#line 831 "../src/source_parser.vala"
				if (!in_single_quote) {
#line 831 "../src/source_parser.vala"
					_tmp11_ = !in_double_quote;
#line 7038 "source_parser.c"
				} else {
#line 831 "../src/source_parser.vala"
					_tmp11_ = FALSE;
#line 7042 "source_parser.c"
				}
#line 831 "../src/source_parser.vala"
				if (_tmp11_) {
#line 7046 "source_parser.c"
					gboolean _tmp12_ = FALSE;
#line 832 "../src/source_parser.vala"
					if (c == '/') {
#line 832 "../src/source_parser.vala"
						_tmp12_ = next == '/';
#line 7052 "source_parser.c"
					} else {
#line 832 "../src/source_parser.vala"
						_tmp12_ = FALSE;
#line 7056 "source_parser.c"
					}
#line 832 "../src/source_parser.vala"
					if (_tmp12_) {
#line 7060 "source_parser.c"
						gchar* _tmp13_;
#line 833 "../src/source_parser.vala"
						_tmp13_ = string_substring (line, (glong) 0, (glong) i);
#line 833 "../src/source_parser.vala"
						result = _tmp13_;
#line 833 "../src/source_parser.vala"
						return result;
#line 7068 "source_parser.c"
					}
#line 835 "../src/source_parser.vala"
					if (c == '#') {
#line 7072 "source_parser.c"
						gchar* _tmp14_;
#line 836 "../src/source_parser.vala"
						_tmp14_ = string_substring (line, (glong) 0, (glong) i);
#line 836 "../src/source_parser.vala"
						result = _tmp14_;
#line 836 "../src/source_parser.vala"
						return result;
#line 7080 "source_parser.c"
					}
				}
			}
		}
	}
#line 841 "../src/source_parser.vala"
	_tmp15_ = g_strdup (line);
#line 841 "../src/source_parser.vala"
	result = _tmp15_;
#line 841 "../src/source_parser.vala"
	return result;
#line 7092 "source_parser.c"
}

static gint
php_to_vala_source_parser_first_non_whitespace_column (const gchar* line)
{
	gint result;
#line 844 "../src/source_parser.vala"
	g_return_val_if_fail (line != NULL, -1);
#line 7101 "source_parser.c"
	{
		gint i = 0;
#line 845 "../src/source_parser.vala"
		i = 0;
#line 7106 "source_parser.c"
		{
			gboolean _tmp0_ = FALSE;
#line 845 "../src/source_parser.vala"
			_tmp0_ = TRUE;
#line 845 "../src/source_parser.vala"
			while (TRUE) {
#line 7113 "source_parser.c"
				gint _tmp2_;
				gint _tmp3_;
				gboolean _tmp4_ = FALSE;
#line 845 "../src/source_parser.vala"
				if (!_tmp0_) {
#line 7119 "source_parser.c"
					gint _tmp1_;
#line 845 "../src/source_parser.vala"
					_tmp1_ = i;
#line 845 "../src/source_parser.vala"
					i = _tmp1_ + 1;
#line 7125 "source_parser.c"
				}
#line 845 "../src/source_parser.vala"
				_tmp0_ = FALSE;
#line 845 "../src/source_parser.vala"
				_tmp2_ = strlen (line);
#line 845 "../src/source_parser.vala"
				_tmp3_ = _tmp2_;
#line 845 "../src/source_parser.vala"
				if (!(i < _tmp3_)) {
#line 845 "../src/source_parser.vala"
					break;
#line 7137 "source_parser.c"
				}
#line 846 "../src/source_parser.vala"
				if (string_get (line, (glong) i) != ' ') {
#line 846 "../src/source_parser.vala"
					_tmp4_ = string_get (line, (glong) i) != '\t';
#line 7143 "source_parser.c"
				} else {
#line 846 "../src/source_parser.vala"
					_tmp4_ = FALSE;
#line 7147 "source_parser.c"
				}
#line 846 "../src/source_parser.vala"
				if (_tmp4_) {
#line 847 "../src/source_parser.vala"
					result = i + 1;
#line 847 "../src/source_parser.vala"
					return result;
#line 7155 "source_parser.c"
				}
			}
		}
	}
#line 850 "../src/source_parser.vala"
	result = 1;
#line 850 "../src/source_parser.vala"
	return result;
#line 7164 "source_parser.c"
}

static void
php_to_vala_source_parser_parse_local_function_header (const gchar* source_path,
                                                       const gchar* line,
                                                       gint php_line_number,
                                                       gchar** function_name,
                                                       GeeArrayList* parameters,
                                                       gchar** return_type,
                                                       GError** error)
{
	gchar* _vala_function_name = NULL;
	gchar* _vala_return_type = NULL;
	gchar* header = NULL;
	gchar* _tmp0_;
	gint brace_index = 0;
	const gchar* _tmp1_;
	gchar* rest = NULL;
	const gchar* _tmp6_;
	gint _tmp7_;
	gint _tmp8_;
	gchar* _tmp9_;
	gchar* _tmp10_;
	gchar* _tmp11_;
	gchar* _tmp12_;
	gint open_index = 0;
	const gchar* _tmp13_;
	gint close_index = 0;
	const gchar* _tmp14_;
	gboolean _tmp15_ = FALSE;
	const gchar* _tmp17_;
	gchar* _tmp18_;
	gchar* _tmp19_;
	gchar* _tmp20_;
	const gchar* _tmp21_;
	gchar* raw_parameters = NULL;
	const gchar* _tmp23_;
	gchar* _tmp24_;
	gchar* _tmp25_;
	gchar* _tmp26_;
	gchar* _tmp27_;
	gchar* raw_return_type = NULL;
	const gchar* _tmp28_;
	gchar* _tmp29_;
	gchar* _tmp30_;
	gchar* _tmp31_;
	gchar* _tmp32_;
	const gchar* _tmp33_;
	const gchar* _tmp39_;
	GError* _inner_error0_ = NULL;
#line 853 "../src/source_parser.vala"
	g_return_if_fail (source_path != NULL);
#line 853 "../src/source_parser.vala"
	g_return_if_fail (line != NULL);
#line 853 "../src/source_parser.vala"
	g_return_if_fail (parameters != NULL);
#line 854 "../src/source_parser.vala"
	gee_abstract_collection_clear ((GeeAbstractCollection*) parameters);
#line 855 "../src/source_parser.vala"
	_g_free0 (_vala_return_type);
#line 855 "../src/source_parser.vala"
	_vala_return_type = NULL;
#line 856 "../src/source_parser.vala"
	_tmp0_ = g_strdup (line);
#line 856 "../src/source_parser.vala"
	header = _tmp0_;
#line 857 "../src/source_parser.vala"
	_tmp1_ = header;
#line 857 "../src/source_parser.vala"
	brace_index = string_index_of (_tmp1_, "{", 0);
#line 858 "../src/source_parser.vala"
	if (brace_index >= 0) {
#line 7237 "source_parser.c"
		const gchar* _tmp2_;
		gchar* _tmp3_;
		gchar* _tmp4_;
		gchar* _tmp5_;
#line 859 "../src/source_parser.vala"
		_tmp2_ = header;
#line 859 "../src/source_parser.vala"
		_tmp3_ = string_substring (_tmp2_, (glong) 0, (glong) brace_index);
#line 859 "../src/source_parser.vala"
		_tmp4_ = _tmp3_;
#line 859 "../src/source_parser.vala"
		_tmp5_ = string_strip (_tmp4_);
#line 859 "../src/source_parser.vala"
		_g_free0 (header);
#line 859 "../src/source_parser.vala"
		header = _tmp5_;
#line 859 "../src/source_parser.vala"
		_g_free0 (_tmp4_);
#line 7256 "source_parser.c"
	}
#line 862 "../src/source_parser.vala"
	_tmp6_ = header;
#line 862 "../src/source_parser.vala"
	_tmp7_ = strlen ("function ");
#line 862 "../src/source_parser.vala"
	_tmp8_ = _tmp7_;
#line 862 "../src/source_parser.vala"
	_tmp9_ = string_substring (_tmp6_, (glong) _tmp8_, (glong) -1);
#line 862 "../src/source_parser.vala"
	_tmp10_ = _tmp9_;
#line 862 "../src/source_parser.vala"
	_tmp11_ = string_strip (_tmp10_);
#line 862 "../src/source_parser.vala"
	_tmp12_ = _tmp11_;
#line 862 "../src/source_parser.vala"
	_g_free0 (_tmp10_);
#line 862 "../src/source_parser.vala"
	rest = _tmp12_;
#line 863 "../src/source_parser.vala"
	_tmp13_ = rest;
#line 863 "../src/source_parser.vala"
	open_index = string_index_of (_tmp13_, "(", 0);
#line 864 "../src/source_parser.vala"
	_tmp14_ = rest;
#line 864 "../src/source_parser.vala"
	close_index = string_last_index_of (_tmp14_, ")", 0);
#line 865 "../src/source_parser.vala"
	if (open_index <= 0) {
#line 865 "../src/source_parser.vala"
		_tmp15_ = TRUE;
#line 7288 "source_parser.c"
	} else {
#line 865 "../src/source_parser.vala"
		_tmp15_ = close_index < open_index;
#line 7292 "source_parser.c"
	}
#line 865 "../src/source_parser.vala"
	if (_tmp15_) {
#line 7296 "source_parser.c"
		GError* _tmp16_;
#line 866 "../src/source_parser.vala"
		_tmp16_ = php_to_vala_source_parser_unsupported_syntax (source_path, php_line_number, line);
#line 866 "../src/source_parser.vala"
		_inner_error0_ = _tmp16_;
#line 866 "../src/source_parser.vala"
		g_propagate_error (error, _inner_error0_);
#line 866 "../src/source_parser.vala"
		_g_free0 (rest);
#line 866 "../src/source_parser.vala"
		_g_free0 (header);
#line 866 "../src/source_parser.vala"
		_g_free0 (_vala_function_name);
#line 866 "../src/source_parser.vala"
		_g_free0 (_vala_return_type);
#line 866 "../src/source_parser.vala"
		return;
#line 7314 "source_parser.c"
	}
#line 869 "../src/source_parser.vala"
	_tmp17_ = rest;
#line 869 "../src/source_parser.vala"
	_tmp18_ = string_substring (_tmp17_, (glong) 0, (glong) open_index);
#line 869 "../src/source_parser.vala"
	_tmp19_ = _tmp18_;
#line 869 "../src/source_parser.vala"
	_tmp20_ = string_strip (_tmp19_);
#line 869 "../src/source_parser.vala"
	_g_free0 (_vala_function_name);
#line 869 "../src/source_parser.vala"
	_vala_function_name = _tmp20_;
#line 869 "../src/source_parser.vala"
	_g_free0 (_tmp19_);
#line 870 "../src/source_parser.vala"
	_tmp21_ = _vala_function_name;
#line 870 "../src/source_parser.vala"
	if (!php_to_vala_source_parser_is_identifier (_tmp21_)) {
#line 7334 "source_parser.c"
		GError* _tmp22_;
#line 871 "../src/source_parser.vala"
		_tmp22_ = php_to_vala_source_parser_unsupported_syntax (source_path, php_line_number, line);
#line 871 "../src/source_parser.vala"
		_inner_error0_ = _tmp22_;
#line 871 "../src/source_parser.vala"
		g_propagate_error (error, _inner_error0_);
#line 871 "../src/source_parser.vala"
		_g_free0 (rest);
#line 871 "../src/source_parser.vala"
		_g_free0 (header);
#line 871 "../src/source_parser.vala"
		_g_free0 (_vala_function_name);
#line 871 "../src/source_parser.vala"
		_g_free0 (_vala_return_type);
#line 871 "../src/source_parser.vala"
		return;
#line 7352 "source_parser.c"
	}
#line 874 "../src/source_parser.vala"
	_tmp23_ = rest;
#line 874 "../src/source_parser.vala"
	_tmp24_ = string_substring (_tmp23_, (glong) (open_index + 1), (glong) ((close_index - open_index) - 1));
#line 874 "../src/source_parser.vala"
	_tmp25_ = _tmp24_;
#line 874 "../src/source_parser.vala"
	_tmp26_ = string_strip (_tmp25_);
#line 874 "../src/source_parser.vala"
	_tmp27_ = _tmp26_;
#line 874 "../src/source_parser.vala"
	_g_free0 (_tmp25_);
#line 874 "../src/source_parser.vala"
	raw_parameters = _tmp27_;
#line 875 "../src/source_parser.vala"
	_tmp28_ = rest;
#line 875 "../src/source_parser.vala"
	_tmp29_ = string_substring (_tmp28_, (glong) (close_index + 1), (glong) -1);
#line 875 "../src/source_parser.vala"
	_tmp30_ = _tmp29_;
#line 875 "../src/source_parser.vala"
	_tmp31_ = string_strip (_tmp30_);
#line 875 "../src/source_parser.vala"
	_tmp32_ = _tmp31_;
#line 875 "../src/source_parser.vala"
	_g_free0 (_tmp30_);
#line 875 "../src/source_parser.vala"
	raw_return_type = _tmp32_;
#line 876 "../src/source_parser.vala"
	_tmp33_ = raw_return_type;
#line 876 "../src/source_parser.vala"
	if (g_str_has_prefix (_tmp33_, ":")) {
#line 7386 "source_parser.c"
		const gchar* _tmp34_;
		gchar* _tmp35_;
		gchar* _tmp36_;
		gchar* _tmp37_;
		const gchar* _tmp38_;
#line 877 "../src/source_parser.vala"
		_tmp34_ = raw_return_type;
#line 877 "../src/source_parser.vala"
		_tmp35_ = string_substring (_tmp34_, (glong) 1, (glong) -1);
#line 877 "../src/source_parser.vala"
		_tmp36_ = _tmp35_;
#line 877 "../src/source_parser.vala"
		_tmp37_ = string_strip (_tmp36_);
#line 877 "../src/source_parser.vala"
		_g_free0 (_vala_return_type);
#line 877 "../src/source_parser.vala"
		_vala_return_type = _tmp37_;
#line 877 "../src/source_parser.vala"
		_g_free0 (_tmp36_);
#line 878 "../src/source_parser.vala"
		_tmp38_ = _vala_return_type;
#line 878 "../src/source_parser.vala"
		if (g_strcmp0 (_tmp38_, "") == 0) {
#line 879 "../src/source_parser.vala"
			_g_free0 (_vala_return_type);
#line 879 "../src/source_parser.vala"
			_vala_return_type = NULL;
#line 7414 "source_parser.c"
		}
	}
#line 882 "../src/source_parser.vala"
	_tmp39_ = raw_parameters;
#line 882 "../src/source_parser.vala"
	if (g_strcmp0 (_tmp39_, "") == 0) {
#line 883 "../src/source_parser.vala"
		_g_free0 (raw_return_type);
#line 883 "../src/source_parser.vala"
		_g_free0 (raw_parameters);
#line 883 "../src/source_parser.vala"
		_g_free0 (rest);
#line 883 "../src/source_parser.vala"
		_g_free0 (header);
#line 883 "../src/source_parser.vala"
		if (function_name) {
#line 883 "../src/source_parser.vala"
			*function_name = _vala_function_name;
#line 7433 "source_parser.c"
		} else {
#line 883 "../src/source_parser.vala"
			_g_free0 (_vala_function_name);
#line 7437 "source_parser.c"
		}
#line 883 "../src/source_parser.vala"
		if (return_type) {
#line 883 "../src/source_parser.vala"
			*return_type = _vala_return_type;
#line 7443 "source_parser.c"
		} else {
#line 883 "../src/source_parser.vala"
			_g_free0 (_vala_return_type);
#line 7447 "source_parser.c"
		}
#line 883 "../src/source_parser.vala"
		return;
#line 7451 "source_parser.c"
	}
	{
		GeeArrayList* _raw_parameter_list = NULL;
		const gchar* _tmp40_;
		GeeArrayList* _tmp41_;
		gint _raw_parameter_size = 0;
		GeeArrayList* _tmp42_;
		gint _tmp43_;
		gint _tmp44_;
		gint _raw_parameter_index = 0;
#line 886 "../src/source_parser.vala"
		_tmp40_ = raw_parameters;
#line 886 "../src/source_parser.vala"
		_tmp41_ = php_to_vala_source_parser_split_top_level (_tmp40_, ',');
#line 886 "../src/source_parser.vala"
		_raw_parameter_list = _tmp41_;
#line 886 "../src/source_parser.vala"
		_tmp42_ = _raw_parameter_list;
#line 886 "../src/source_parser.vala"
		_tmp43_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp42_);
#line 886 "../src/source_parser.vala"
		_tmp44_ = _tmp43_;
#line 886 "../src/source_parser.vala"
		_raw_parameter_size = _tmp44_;
#line 886 "../src/source_parser.vala"
		_raw_parameter_index = -1;
#line 886 "../src/source_parser.vala"
		while (TRUE) {
#line 7480 "source_parser.c"
			gint _tmp45_;
			gint _tmp46_;
			gchar* raw_parameter = NULL;
			GeeArrayList* _tmp47_;
			gpointer _tmp48_;
			gchar* parameter = NULL;
			const gchar* _tmp49_;
			gchar* _tmp50_;
			gchar* default_value = NULL;
			gint equals_index = 0;
			const gchar* _tmp51_;
			gchar* parameter_name = NULL;
			const gchar* _tmp60_;
			gchar* _tmp61_;
			const gchar* _tmp62_;
			gchar* type_name = NULL;
			const gchar* _tmp64_;
			gchar* _tmp65_;
			const gchar* _tmp66_;
			const gchar* _tmp67_;
			const gchar* _tmp68_;
			LocalParameter* _tmp69_;
			LocalParameter* _tmp70_;
#line 886 "../src/source_parser.vala"
			_raw_parameter_index = _raw_parameter_index + 1;
#line 886 "../src/source_parser.vala"
			_tmp45_ = _raw_parameter_index;
#line 886 "../src/source_parser.vala"
			_tmp46_ = _raw_parameter_size;
#line 886 "../src/source_parser.vala"
			if (!(_tmp45_ < _tmp46_)) {
#line 886 "../src/source_parser.vala"
				break;
#line 7514 "source_parser.c"
			}
#line 886 "../src/source_parser.vala"
			_tmp47_ = _raw_parameter_list;
#line 886 "../src/source_parser.vala"
			_tmp48_ = gee_abstract_list_get ((GeeAbstractList*) _tmp47_, _raw_parameter_index);
#line 886 "../src/source_parser.vala"
			raw_parameter = (gchar*) _tmp48_;
#line 887 "../src/source_parser.vala"
			_tmp49_ = raw_parameter;
#line 887 "../src/source_parser.vala"
			_tmp50_ = string_strip (_tmp49_);
#line 887 "../src/source_parser.vala"
			parameter = _tmp50_;
#line 888 "../src/source_parser.vala"
			default_value = NULL;
#line 889 "../src/source_parser.vala"
			_tmp51_ = parameter;
#line 889 "../src/source_parser.vala"
			equals_index = string_index_of (_tmp51_, "=", 0);
#line 890 "../src/source_parser.vala"
			if (equals_index >= 0) {
#line 7536 "source_parser.c"
				const gchar* _tmp52_;
				gchar* _tmp53_;
				gchar* _tmp54_;
				gchar* _tmp55_;
				const gchar* _tmp56_;
				gchar* _tmp57_;
				gchar* _tmp58_;
				gchar* _tmp59_;
#line 891 "../src/source_parser.vala"
				_tmp52_ = parameter;
#line 891 "../src/source_parser.vala"
				_tmp53_ = string_substring (_tmp52_, (glong) (equals_index + 1), (glong) -1);
#line 891 "../src/source_parser.vala"
				_tmp54_ = _tmp53_;
#line 891 "../src/source_parser.vala"
				_tmp55_ = string_strip (_tmp54_);
#line 891 "../src/source_parser.vala"
				_g_free0 (default_value);
#line 891 "../src/source_parser.vala"
				default_value = _tmp55_;
#line 891 "../src/source_parser.vala"
				_g_free0 (_tmp54_);
#line 892 "../src/source_parser.vala"
				_tmp56_ = parameter;
#line 892 "../src/source_parser.vala"
				_tmp57_ = string_substring (_tmp56_, (glong) 0, (glong) equals_index);
#line 892 "../src/source_parser.vala"
				_tmp58_ = _tmp57_;
#line 892 "../src/source_parser.vala"
				_tmp59_ = string_strip (_tmp58_);
#line 892 "../src/source_parser.vala"
				_g_free0 (parameter);
#line 892 "../src/source_parser.vala"
				parameter = _tmp59_;
#line 892 "../src/source_parser.vala"
				_g_free0 (_tmp58_);
#line 7573 "source_parser.c"
			}
#line 894 "../src/source_parser.vala"
			_tmp60_ = parameter;
#line 894 "../src/source_parser.vala"
			_tmp61_ = php_to_vala_source_parser_extract_parameter_name (_tmp60_);
#line 894 "../src/source_parser.vala"
			parameter_name = _tmp61_;
#line 895 "../src/source_parser.vala"
			_tmp62_ = parameter_name;
#line 895 "../src/source_parser.vala"
			if (!php_to_vala_source_parser_is_identifier (_tmp62_)) {
#line 7585 "source_parser.c"
				GError* _tmp63_;
#line 896 "../src/source_parser.vala"
				_tmp63_ = php_to_vala_source_parser_unsupported_syntax (source_path, php_line_number, line);
#line 896 "../src/source_parser.vala"
				_inner_error0_ = _tmp63_;
#line 896 "../src/source_parser.vala"
				g_propagate_error (error, _inner_error0_);
#line 896 "../src/source_parser.vala"
				_g_free0 (parameter_name);
#line 896 "../src/source_parser.vala"
				_g_free0 (default_value);
#line 896 "../src/source_parser.vala"
				_g_free0 (parameter);
#line 896 "../src/source_parser.vala"
				_g_free0 (raw_parameter);
#line 896 "../src/source_parser.vala"
				_g_object_unref0 (_raw_parameter_list);
#line 896 "../src/source_parser.vala"
				_g_free0 (raw_return_type);
#line 896 "../src/source_parser.vala"
				_g_free0 (raw_parameters);
#line 896 "../src/source_parser.vala"
				_g_free0 (rest);
#line 896 "../src/source_parser.vala"
				_g_free0 (header);
#line 896 "../src/source_parser.vala"
				_g_free0 (_vala_function_name);
#line 896 "../src/source_parser.vala"
				_g_free0 (_vala_return_type);
#line 896 "../src/source_parser.vala"
				return;
#line 7617 "source_parser.c"
			}
#line 898 "../src/source_parser.vala"
			_tmp64_ = parameter;
#line 898 "../src/source_parser.vala"
			_tmp65_ = php_to_vala_source_parser_extract_parameter_type (_tmp64_);
#line 898 "../src/source_parser.vala"
			type_name = _tmp65_;
#line 899 "../src/source_parser.vala"
			_tmp66_ = parameter_name;
#line 899 "../src/source_parser.vala"
			_tmp67_ = type_name;
#line 899 "../src/source_parser.vala"
			_tmp68_ = default_value;
#line 899 "../src/source_parser.vala"
			_tmp69_ = local_parameter_new (_tmp66_, _tmp67_, _tmp68_);
#line 899 "../src/source_parser.vala"
			_tmp70_ = _tmp69_;
#line 899 "../src/source_parser.vala"
			gee_abstract_collection_add ((GeeAbstractCollection*) parameters, _tmp70_);
#line 899 "../src/source_parser.vala"
			_g_object_unref0 (_tmp70_);
#line 886 "../src/source_parser.vala"
			_g_free0 (type_name);
#line 886 "../src/source_parser.vala"
			_g_free0 (parameter_name);
#line 886 "../src/source_parser.vala"
			_g_free0 (default_value);
#line 886 "../src/source_parser.vala"
			_g_free0 (parameter);
#line 886 "../src/source_parser.vala"
			_g_free0 (raw_parameter);
#line 7649 "source_parser.c"
		}
#line 886 "../src/source_parser.vala"
		_g_object_unref0 (_raw_parameter_list);
#line 7653 "source_parser.c"
	}
#line 853 "../src/source_parser.vala"
	_g_free0 (raw_return_type);
#line 853 "../src/source_parser.vala"
	_g_free0 (raw_parameters);
#line 853 "../src/source_parser.vala"
	_g_free0 (rest);
#line 853 "../src/source_parser.vala"
	_g_free0 (header);
#line 853 "../src/source_parser.vala"
	if (function_name) {
#line 853 "../src/source_parser.vala"
		*function_name = _vala_function_name;
#line 7667 "source_parser.c"
	} else {
#line 853 "../src/source_parser.vala"
		_g_free0 (_vala_function_name);
#line 7671 "source_parser.c"
	}
#line 853 "../src/source_parser.vala"
	if (return_type) {
#line 853 "../src/source_parser.vala"
		*return_type = _vala_return_type;
#line 7677 "source_parser.c"
	} else {
#line 853 "../src/source_parser.vala"
		_g_free0 (_vala_return_type);
#line 7681 "source_parser.c"
	}
}

static gchar*
php_to_vala_source_parser_extract_parameter_type (const gchar* parameter)
{
	gchar* clean = NULL;
	gchar* _tmp0_;
	gint dollar_index = 0;
	const gchar* _tmp1_;
	gchar* type_name = NULL;
	const gchar* _tmp2_;
	gchar* _tmp3_;
	gchar* _tmp4_;
	gchar* _tmp5_;
	gchar* _tmp6_;
	gboolean _tmp7_ = FALSE;
	gboolean _tmp8_ = FALSE;
	const gchar* _tmp9_;
	gchar* result;
#line 903 "../src/source_parser.vala"
	g_return_val_if_fail (parameter != NULL, NULL);
#line 904 "../src/source_parser.vala"
	_tmp0_ = string_strip (parameter);
#line 904 "../src/source_parser.vala"
	clean = _tmp0_;
#line 905 "../src/source_parser.vala"
	_tmp1_ = clean;
#line 905 "../src/source_parser.vala"
	dollar_index = string_index_of (_tmp1_, "$", 0);
#line 906 "../src/source_parser.vala"
	if (dollar_index <= 0) {
#line 907 "../src/source_parser.vala"
		result = NULL;
#line 907 "../src/source_parser.vala"
		_g_free0 (clean);
#line 907 "../src/source_parser.vala"
		return result;
#line 7720 "source_parser.c"
	}
#line 909 "../src/source_parser.vala"
	_tmp2_ = clean;
#line 909 "../src/source_parser.vala"
	_tmp3_ = string_substring (_tmp2_, (glong) 0, (glong) dollar_index);
#line 909 "../src/source_parser.vala"
	_tmp4_ = _tmp3_;
#line 909 "../src/source_parser.vala"
	_tmp5_ = string_strip (_tmp4_);
#line 909 "../src/source_parser.vala"
	_tmp6_ = _tmp5_;
#line 909 "../src/source_parser.vala"
	_g_free0 (_tmp4_);
#line 909 "../src/source_parser.vala"
	type_name = _tmp6_;
#line 910 "../src/source_parser.vala"
	_tmp9_ = type_name;
#line 910 "../src/source_parser.vala"
	if (g_strcmp0 (_tmp9_, "") == 0) {
#line 910 "../src/source_parser.vala"
		_tmp8_ = TRUE;
#line 7742 "source_parser.c"
	} else {
		const gchar* _tmp10_;
#line 910 "../src/source_parser.vala"
		_tmp10_ = type_name;
#line 910 "../src/source_parser.vala"
		_tmp8_ = g_strcmp0 (_tmp10_, "&") == 0;
#line 7749 "source_parser.c"
	}
#line 910 "../src/source_parser.vala"
	if (_tmp8_) {
#line 910 "../src/source_parser.vala"
		_tmp7_ = TRUE;
#line 7755 "source_parser.c"
	} else {
		const gchar* _tmp11_;
#line 910 "../src/source_parser.vala"
		_tmp11_ = type_name;
#line 910 "../src/source_parser.vala"
		_tmp7_ = g_strcmp0 (_tmp11_, "...") == 0;
#line 7762 "source_parser.c"
	}
#line 910 "../src/source_parser.vala"
	if (_tmp7_) {
#line 911 "../src/source_parser.vala"
		result = NULL;
#line 911 "../src/source_parser.vala"
		_g_free0 (type_name);
#line 911 "../src/source_parser.vala"
		_g_free0 (clean);
#line 911 "../src/source_parser.vala"
		return result;
#line 7774 "source_parser.c"
	}
#line 913 "../src/source_parser.vala"
	result = type_name;
#line 913 "../src/source_parser.vala"
	_g_free0 (clean);
#line 913 "../src/source_parser.vala"
	return result;
#line 7782 "source_parser.c"
}

static gchar*
php_to_vala_source_parser_extract_parameter_name (const gchar* parameter)
{
	gchar* clean = NULL;
	gchar* _tmp0_;
	gint dollar_index = 0;
	const gchar* _tmp1_;
	const gchar* _tmp4_;
	const gchar* _tmp9_;
	gint end = 0;
	gchar* _tmp22_ = NULL;
	gchar* _tmp27_;
	gchar* result;
#line 916 "../src/source_parser.vala"
	g_return_val_if_fail (parameter != NULL, NULL);
#line 917 "../src/source_parser.vala"
	_tmp0_ = string_strip (parameter);
#line 917 "../src/source_parser.vala"
	clean = _tmp0_;
#line 919 "../src/source_parser.vala"
	_tmp1_ = clean;
#line 919 "../src/source_parser.vala"
	dollar_index = string_index_of (_tmp1_, "$", 0);
#line 920 "../src/source_parser.vala"
	if (dollar_index >= 0) {
#line 7810 "source_parser.c"
		const gchar* _tmp2_;
		gchar* _tmp3_;
#line 921 "../src/source_parser.vala"
		_tmp2_ = clean;
#line 921 "../src/source_parser.vala"
		_tmp3_ = string_substring (_tmp2_, (glong) (dollar_index + 1), (glong) -1);
#line 921 "../src/source_parser.vala"
		_g_free0 (clean);
#line 921 "../src/source_parser.vala"
		clean = _tmp3_;
#line 7821 "source_parser.c"
	}
#line 924 "../src/source_parser.vala"
	_tmp4_ = clean;
#line 924 "../src/source_parser.vala"
	if (g_str_has_prefix (_tmp4_, "&")) {
#line 7827 "source_parser.c"
		const gchar* _tmp5_;
		gchar* _tmp6_;
		gchar* _tmp7_;
		gchar* _tmp8_;
#line 925 "../src/source_parser.vala"
		_tmp5_ = clean;
#line 925 "../src/source_parser.vala"
		_tmp6_ = string_substring (_tmp5_, (glong) 1, (glong) -1);
#line 925 "../src/source_parser.vala"
		_tmp7_ = _tmp6_;
#line 925 "../src/source_parser.vala"
		_tmp8_ = string_strip (_tmp7_);
#line 925 "../src/source_parser.vala"
		_g_free0 (clean);
#line 925 "../src/source_parser.vala"
		clean = _tmp8_;
#line 925 "../src/source_parser.vala"
		_g_free0 (_tmp7_);
#line 7846 "source_parser.c"
	}
#line 927 "../src/source_parser.vala"
	_tmp9_ = clean;
#line 927 "../src/source_parser.vala"
	if (g_str_has_prefix (_tmp9_, "...")) {
#line 7852 "source_parser.c"
		const gchar* _tmp10_;
		gchar* _tmp11_;
		gchar* _tmp12_;
		gchar* _tmp13_;
#line 928 "../src/source_parser.vala"
		_tmp10_ = clean;
#line 928 "../src/source_parser.vala"
		_tmp11_ = string_substring (_tmp10_, (glong) 3, (glong) -1);
#line 928 "../src/source_parser.vala"
		_tmp12_ = _tmp11_;
#line 928 "../src/source_parser.vala"
		_tmp13_ = string_strip (_tmp12_);
#line 928 "../src/source_parser.vala"
		_g_free0 (clean);
#line 928 "../src/source_parser.vala"
		clean = _tmp13_;
#line 928 "../src/source_parser.vala"
		_g_free0 (_tmp12_);
#line 7871 "source_parser.c"
	}
#line 931 "../src/source_parser.vala"
	end = 0;
#line 932 "../src/source_parser.vala"
	while (TRUE) {
#line 7877 "source_parser.c"
		gboolean _tmp14_ = FALSE;
		const gchar* _tmp15_;
		gint _tmp16_;
		gint _tmp17_;
		gint _tmp21_;
#line 932 "../src/source_parser.vala"
		_tmp15_ = clean;
#line 932 "../src/source_parser.vala"
		_tmp16_ = strlen (_tmp15_);
#line 932 "../src/source_parser.vala"
		_tmp17_ = _tmp16_;
#line 932 "../src/source_parser.vala"
		if (end < _tmp17_) {
#line 7891 "source_parser.c"
			gboolean _tmp18_ = FALSE;
			const gchar* _tmp19_;
#line 932 "../src/source_parser.vala"
			_tmp19_ = clean;
#line 932 "../src/source_parser.vala"
			if (g_ascii_isalnum (string_get (_tmp19_, (glong) end))) {
#line 932 "../src/source_parser.vala"
				_tmp18_ = TRUE;
#line 7900 "source_parser.c"
			} else {
				const gchar* _tmp20_;
#line 932 "../src/source_parser.vala"
				_tmp20_ = clean;
#line 932 "../src/source_parser.vala"
				_tmp18_ = string_get (_tmp20_, (glong) end) == '_';
#line 7907 "source_parser.c"
			}
#line 932 "../src/source_parser.vala"
			_tmp14_ = _tmp18_;
#line 7911 "source_parser.c"
		} else {
#line 932 "../src/source_parser.vala"
			_tmp14_ = FALSE;
#line 7915 "source_parser.c"
		}
#line 932 "../src/source_parser.vala"
		if (!_tmp14_) {
#line 932 "../src/source_parser.vala"
			break;
#line 7921 "source_parser.c"
		}
#line 933 "../src/source_parser.vala"
		_tmp21_ = end;
#line 933 "../src/source_parser.vala"
		end = _tmp21_ + 1;
#line 7927 "source_parser.c"
	}
#line 936 "../src/source_parser.vala"
	if (end > 0) {
#line 7931 "source_parser.c"
		const gchar* _tmp23_;
		gchar* _tmp24_;
#line 936 "../src/source_parser.vala"
		_tmp23_ = clean;
#line 936 "../src/source_parser.vala"
		_tmp24_ = string_substring (_tmp23_, (glong) 0, (glong) end);
#line 936 "../src/source_parser.vala"
		_g_free0 (_tmp22_);
#line 936 "../src/source_parser.vala"
		_tmp22_ = _tmp24_;
#line 7942 "source_parser.c"
	} else {
		const gchar* _tmp25_;
		gchar* _tmp26_;
#line 936 "../src/source_parser.vala"
		_tmp25_ = clean;
#line 936 "../src/source_parser.vala"
		_tmp26_ = g_strdup (_tmp25_);
#line 936 "../src/source_parser.vala"
		_g_free0 (_tmp22_);
#line 936 "../src/source_parser.vala"
		_tmp22_ = _tmp26_;
#line 7954 "source_parser.c"
	}
#line 936 "../src/source_parser.vala"
	_tmp27_ = _tmp22_;
#line 936 "../src/source_parser.vala"
	_tmp22_ = NULL;
#line 936 "../src/source_parser.vala"
	result = _tmp27_;
#line 936 "../src/source_parser.vala"
	_g_free0 (_tmp22_);
#line 936 "../src/source_parser.vala"
	_g_free0 (clean);
#line 936 "../src/source_parser.vala"
	return result;
#line 7968 "source_parser.c"
}

static GeeArrayList*
php_to_vala_source_parser_copy_parameter_list (GeeArrayList* input)
{
	GeeArrayList* _result_ = NULL;
	GeeArrayList* _tmp0_;
	GeeArrayList* result;
#line 939 "../src/source_parser.vala"
	g_return_val_if_fail (input != NULL, NULL);
#line 940 "../src/source_parser.vala"
	_tmp0_ = gee_array_list_new (TYPE_LOCAL_PARAMETER, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL);
#line 940 "../src/source_parser.vala"
	_result_ = _tmp0_;
#line 7983 "source_parser.c"
	{
		GeeArrayList* _value_list = NULL;
		gint _value_size = 0;
		GeeArrayList* _tmp1_;
		gint _tmp2_;
		gint _tmp3_;
		gint _value_index = 0;
#line 941 "../src/source_parser.vala"
		_value_list = input;
#line 941 "../src/source_parser.vala"
		_tmp1_ = _value_list;
#line 941 "../src/source_parser.vala"
		_tmp2_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp1_);
#line 941 "../src/source_parser.vala"
		_tmp3_ = _tmp2_;
#line 941 "../src/source_parser.vala"
		_value_size = _tmp3_;
#line 941 "../src/source_parser.vala"
		_value_index = -1;
#line 941 "../src/source_parser.vala"
		while (TRUE) {
#line 8005 "source_parser.c"
			gint _tmp4_;
			gint _tmp5_;
			LocalParameter* value = NULL;
			GeeArrayList* _tmp6_;
			gpointer _tmp7_;
			GeeArrayList* _tmp8_;
			LocalParameter* _tmp9_;
			const gchar* _tmp10_;
			LocalParameter* _tmp11_;
			const gchar* _tmp12_;
			LocalParameter* _tmp13_;
			const gchar* _tmp14_;
			LocalParameter* _tmp15_;
			LocalParameter* _tmp16_;
#line 941 "../src/source_parser.vala"
			_value_index = _value_index + 1;
#line 941 "../src/source_parser.vala"
			_tmp4_ = _value_index;
#line 941 "../src/source_parser.vala"
			_tmp5_ = _value_size;
#line 941 "../src/source_parser.vala"
			if (!(_tmp4_ < _tmp5_)) {
#line 941 "../src/source_parser.vala"
				break;
#line 8030 "source_parser.c"
			}
#line 941 "../src/source_parser.vala"
			_tmp6_ = _value_list;
#line 941 "../src/source_parser.vala"
			_tmp7_ = gee_abstract_list_get ((GeeAbstractList*) _tmp6_, _value_index);
#line 941 "../src/source_parser.vala"
			value = (LocalParameter*) _tmp7_;
#line 942 "../src/source_parser.vala"
			_tmp8_ = _result_;
#line 942 "../src/source_parser.vala"
			_tmp9_ = value;
#line 942 "../src/source_parser.vala"
			_tmp10_ = _tmp9_->name;
#line 942 "../src/source_parser.vala"
			_tmp11_ = value;
#line 942 "../src/source_parser.vala"
			_tmp12_ = _tmp11_->type_name;
#line 942 "../src/source_parser.vala"
			_tmp13_ = value;
#line 942 "../src/source_parser.vala"
			_tmp14_ = _tmp13_->default_value;
#line 942 "../src/source_parser.vala"
			_tmp15_ = local_parameter_new (_tmp10_, _tmp12_, _tmp14_);
#line 942 "../src/source_parser.vala"
			_tmp16_ = _tmp15_;
#line 942 "../src/source_parser.vala"
			gee_abstract_collection_add ((GeeAbstractCollection*) _tmp8_, _tmp16_);
#line 942 "../src/source_parser.vala"
			_g_object_unref0 (_tmp16_);
#line 941 "../src/source_parser.vala"
			_g_object_unref0 (value);
#line 8062 "source_parser.c"
		}
	}
#line 944 "../src/source_parser.vala"
	result = _result_;
#line 944 "../src/source_parser.vala"
	return result;
#line 8069 "source_parser.c"
}

static gboolean
php_to_vala_source_parser_starts_multiline_assignment (const gchar* line)
{
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_ = FALSE;
	gboolean _tmp2_ = FALSE;
	gboolean result;
#line 947 "../src/source_parser.vala"
	g_return_val_if_fail (line != NULL, FALSE);
#line 948 "../src/source_parser.vala"
	if (g_str_has_prefix (line, "$")) {
#line 949 "../src/source_parser.vala"
		_tmp2_ = string_index_of (line, "=", 0) > 0;
#line 8085 "source_parser.c"
	} else {
#line 948 "../src/source_parser.vala"
		_tmp2_ = FALSE;
#line 8089 "source_parser.c"
	}
#line 948 "../src/source_parser.vala"
	if (_tmp2_) {
#line 950 "../src/source_parser.vala"
		_tmp1_ = !g_str_has_suffix (line, ";");
#line 8095 "source_parser.c"
	} else {
#line 948 "../src/source_parser.vala"
		_tmp1_ = FALSE;
#line 8099 "source_parser.c"
	}
#line 948 "../src/source_parser.vala"
	if (_tmp1_) {
#line 8103 "source_parser.c"
		gboolean _tmp3_ = FALSE;
		gboolean _tmp4_ = FALSE;
		gboolean _tmp5_ = FALSE;
#line 951 "../src/source_parser.vala"
		if (string_index_of (line, "'", 0) >= 0) {
#line 951 "../src/source_parser.vala"
			_tmp5_ = TRUE;
#line 8111 "source_parser.c"
		} else {
#line 952 "../src/source_parser.vala"
			_tmp5_ = string_index_of (line, "\"", 0) >= 0;
#line 8115 "source_parser.c"
		}
#line 951 "../src/source_parser.vala"
		if (_tmp5_) {
#line 951 "../src/source_parser.vala"
			_tmp4_ = TRUE;
#line 8121 "source_parser.c"
		} else {
#line 953 "../src/source_parser.vala"
			_tmp4_ = string_index_of (line, "[", 0) >= 0;
#line 8125 "source_parser.c"
		}
#line 951 "../src/source_parser.vala"
		if (_tmp4_) {
#line 951 "../src/source_parser.vala"
			_tmp3_ = TRUE;
#line 8131 "source_parser.c"
		} else {
#line 954 "../src/source_parser.vala"
			_tmp3_ = string_index_of (line, "array(", 0) >= 0;
#line 8135 "source_parser.c"
		}
#line 951 "../src/source_parser.vala"
		_tmp0_ = _tmp3_;
#line 8139 "source_parser.c"
	} else {
#line 948 "../src/source_parser.vala"
		_tmp0_ = FALSE;
#line 8143 "source_parser.c"
	}
#line 948 "../src/source_parser.vala"
	result = _tmp0_;
#line 948 "../src/source_parser.vala"
	return result;
#line 8149 "source_parser.c"
}

static gboolean
php_to_vala_source_parser_starts_multiline_parenthesized_statement (const gchar* line)
{
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_ = FALSE;
	gboolean _tmp2_ = FALSE;
	gboolean _tmp3_ = FALSE;
	gchar* _tmp4_;
	gchar* _tmp5_;
	gboolean _tmp6_;
	gboolean result;
#line 957 "../src/source_parser.vala"
	g_return_val_if_fail (line != NULL, FALSE);
#line 958 "../src/source_parser.vala"
	if (g_str_has_suffix (line, ";")) {
#line 958 "../src/source_parser.vala"
		_tmp3_ = TRUE;
#line 8169 "source_parser.c"
	} else {
#line 958 "../src/source_parser.vala"
		_tmp3_ = g_str_has_suffix (line, "{");
#line 8173 "source_parser.c"
	}
#line 958 "../src/source_parser.vala"
	if (_tmp3_) {
#line 958 "../src/source_parser.vala"
		_tmp2_ = TRUE;
#line 8179 "source_parser.c"
	} else {
#line 958 "../src/source_parser.vala"
		_tmp2_ = g_strcmp0 (line, "}") == 0;
#line 8183 "source_parser.c"
	}
#line 958 "../src/source_parser.vala"
	if (_tmp2_) {
#line 958 "../src/source_parser.vala"
		_tmp1_ = TRUE;
#line 8189 "source_parser.c"
	} else {
#line 958 "../src/source_parser.vala"
		_tmp1_ = g_str_has_prefix (line, "//");
#line 8193 "source_parser.c"
	}
#line 958 "../src/source_parser.vala"
	if (_tmp1_) {
#line 958 "../src/source_parser.vala"
		_tmp0_ = TRUE;
#line 8199 "source_parser.c"
	} else {
#line 958 "../src/source_parser.vala"
		_tmp0_ = g_str_has_prefix (line, "#");
#line 8203 "source_parser.c"
	}
#line 958 "../src/source_parser.vala"
	if (_tmp0_) {
#line 959 "../src/source_parser.vala"
		result = FALSE;
#line 959 "../src/source_parser.vala"
		return result;
#line 8211 "source_parser.c"
	}
#line 961 "../src/source_parser.vala"
	_tmp4_ = php_to_vala_source_parser_strip_line_comment (line);
#line 961 "../src/source_parser.vala"
	_tmp5_ = _tmp4_;
#line 961 "../src/source_parser.vala"
	_tmp6_ = php_to_vala_source_parser_nesting_depth (_tmp5_) > 0;
#line 961 "../src/source_parser.vala"
	_g_free0 (_tmp5_);
#line 961 "../src/source_parser.vala"
	result = _tmp6_;
#line 961 "../src/source_parser.vala"
	return result;
#line 8225 "source_parser.c"
}

static gint
php_to_vala_source_parser_nesting_depth (const gchar* line)
{
	gint depth = 0;
	gboolean in_single_quote = FALSE;
	gboolean in_double_quote = FALSE;
	gboolean escaped = FALSE;
	gint result;
#line 964 "../src/source_parser.vala"
	g_return_val_if_fail (line != NULL, -1);
#line 965 "../src/source_parser.vala"
	depth = 0;
#line 966 "../src/source_parser.vala"
	in_single_quote = FALSE;
#line 967 "../src/source_parser.vala"
	in_double_quote = FALSE;
#line 968 "../src/source_parser.vala"
	escaped = FALSE;
#line 8246 "source_parser.c"
	{
		gint i = 0;
#line 970 "../src/source_parser.vala"
		i = 0;
#line 8251 "source_parser.c"
		{
			gboolean _tmp0_ = FALSE;
#line 970 "../src/source_parser.vala"
			_tmp0_ = TRUE;
#line 970 "../src/source_parser.vala"
			while (TRUE) {
#line 8258 "source_parser.c"
				gint _tmp2_;
				gint _tmp3_;
				gchar c = '\0';
				gboolean _tmp4_ = FALSE;
				gboolean _tmp5_ = FALSE;
				gboolean _tmp6_ = FALSE;
				gboolean _tmp7_ = FALSE;
				gboolean _tmp8_ = FALSE;
#line 970 "../src/source_parser.vala"
				if (!_tmp0_) {
#line 8269 "source_parser.c"
					gint _tmp1_;
#line 970 "../src/source_parser.vala"
					_tmp1_ = i;
#line 970 "../src/source_parser.vala"
					i = _tmp1_ + 1;
#line 8275 "source_parser.c"
				}
#line 970 "../src/source_parser.vala"
				_tmp0_ = FALSE;
#line 970 "../src/source_parser.vala"
				_tmp2_ = strlen (line);
#line 970 "../src/source_parser.vala"
				_tmp3_ = _tmp2_;
#line 970 "../src/source_parser.vala"
				if (!(i < _tmp3_)) {
#line 970 "../src/source_parser.vala"
					break;
#line 8287 "source_parser.c"
				}
#line 971 "../src/source_parser.vala"
				c = string_get (line, (glong) i);
#line 972 "../src/source_parser.vala"
				if (escaped) {
#line 973 "../src/source_parser.vala"
					escaped = FALSE;
#line 974 "../src/source_parser.vala"
					continue;
#line 8297 "source_parser.c"
				}
#line 976 "../src/source_parser.vala"
				if (in_single_quote) {
#line 976 "../src/source_parser.vala"
					_tmp5_ = TRUE;
#line 8303 "source_parser.c"
				} else {
#line 976 "../src/source_parser.vala"
					_tmp5_ = in_double_quote;
#line 8307 "source_parser.c"
				}
#line 976 "../src/source_parser.vala"
				if (_tmp5_) {
#line 976 "../src/source_parser.vala"
					_tmp4_ = c == '\\';
#line 8313 "source_parser.c"
				} else {
#line 976 "../src/source_parser.vala"
					_tmp4_ = FALSE;
#line 8317 "source_parser.c"
				}
#line 976 "../src/source_parser.vala"
				if (_tmp4_) {
#line 977 "../src/source_parser.vala"
					escaped = TRUE;
#line 978 "../src/source_parser.vala"
					continue;
#line 8325 "source_parser.c"
				}
#line 980 "../src/source_parser.vala"
				if (c == '\'') {
#line 980 "../src/source_parser.vala"
					_tmp6_ = !in_double_quote;
#line 8331 "source_parser.c"
				} else {
#line 980 "../src/source_parser.vala"
					_tmp6_ = FALSE;
#line 8335 "source_parser.c"
				}
#line 980 "../src/source_parser.vala"
				if (_tmp6_) {
#line 981 "../src/source_parser.vala"
					in_single_quote = !in_single_quote;
#line 982 "../src/source_parser.vala"
					continue;
#line 8343 "source_parser.c"
				}
#line 984 "../src/source_parser.vala"
				if (c == '"') {
#line 984 "../src/source_parser.vala"
					_tmp7_ = !in_single_quote;
#line 8349 "source_parser.c"
				} else {
#line 984 "../src/source_parser.vala"
					_tmp7_ = FALSE;
#line 8353 "source_parser.c"
				}
#line 984 "../src/source_parser.vala"
				if (_tmp7_) {
#line 985 "../src/source_parser.vala"
					in_double_quote = !in_double_quote;
#line 986 "../src/source_parser.vala"
					continue;
#line 8361 "source_parser.c"
				}
#line 988 "../src/source_parser.vala"
				if (!in_single_quote) {
#line 988 "../src/source_parser.vala"
					_tmp8_ = !in_double_quote;
#line 8367 "source_parser.c"
				} else {
#line 988 "../src/source_parser.vala"
					_tmp8_ = FALSE;
#line 8371 "source_parser.c"
				}
#line 988 "../src/source_parser.vala"
				if (_tmp8_) {
#line 8375 "source_parser.c"
					gboolean _tmp9_ = FALSE;
#line 989 "../src/source_parser.vala"
					if (c == '(') {
#line 989 "../src/source_parser.vala"
						_tmp9_ = TRUE;
#line 8381 "source_parser.c"
					} else {
#line 989 "../src/source_parser.vala"
						_tmp9_ = c == '[';
#line 8385 "source_parser.c"
					}
#line 989 "../src/source_parser.vala"
					if (_tmp9_) {
#line 8389 "source_parser.c"
						gint _tmp10_;
#line 990 "../src/source_parser.vala"
						_tmp10_ = depth;
#line 990 "../src/source_parser.vala"
						depth = _tmp10_ + 1;
#line 8395 "source_parser.c"
					} else {
						gboolean _tmp11_ = FALSE;
#line 991 "../src/source_parser.vala"
						if (c == ')') {
#line 991 "../src/source_parser.vala"
							_tmp11_ = TRUE;
#line 8402 "source_parser.c"
						} else {
#line 991 "../src/source_parser.vala"
							_tmp11_ = c == ']';
#line 8406 "source_parser.c"
						}
#line 991 "../src/source_parser.vala"
						if (_tmp11_) {
#line 8410 "source_parser.c"
							gint _tmp12_;
#line 992 "../src/source_parser.vala"
							_tmp12_ = depth;
#line 992 "../src/source_parser.vala"
							depth = _tmp12_ - 1;
#line 8416 "source_parser.c"
						}
					}
				}
			}
		}
	}
#line 997 "../src/source_parser.vala"
	result = depth;
#line 997 "../src/source_parser.vala"
	return result;
#line 8427 "source_parser.c"
}

static gboolean
php_to_vala_source_parser_is_identifier (const gchar* name)
{
	gint _tmp0_;
	gint _tmp1_;
	gboolean result;
#line 1000 "../src/source_parser.vala"
	g_return_val_if_fail (name != NULL, FALSE);
#line 1001 "../src/source_parser.vala"
	_tmp0_ = strlen (name);
#line 1001 "../src/source_parser.vala"
	_tmp1_ = _tmp0_;
#line 1001 "../src/source_parser.vala"
	if (_tmp1_ == 0) {
#line 1002 "../src/source_parser.vala"
		result = FALSE;
#line 1002 "../src/source_parser.vala"
		return result;
#line 8448 "source_parser.c"
	}
	{
		gint i = 0;
#line 1004 "../src/source_parser.vala"
		i = 0;
#line 8454 "source_parser.c"
		{
			gboolean _tmp2_ = FALSE;
#line 1004 "../src/source_parser.vala"
			_tmp2_ = TRUE;
#line 1004 "../src/source_parser.vala"
			while (TRUE) {
#line 8461 "source_parser.c"
				gint _tmp4_;
				gint _tmp5_;
				gchar c = '\0';
				gboolean _tmp6_ = FALSE;
				gboolean _tmp7_ = FALSE;
				gboolean _tmp8_ = FALSE;
				gboolean _tmp9_ = FALSE;
				gboolean valid = FALSE;
#line 1004 "../src/source_parser.vala"
				if (!_tmp2_) {
#line 8472 "source_parser.c"
					gint _tmp3_;
#line 1004 "../src/source_parser.vala"
					_tmp3_ = i;
#line 1004 "../src/source_parser.vala"
					i = _tmp3_ + 1;
#line 8478 "source_parser.c"
				}
#line 1004 "../src/source_parser.vala"
				_tmp2_ = FALSE;
#line 1004 "../src/source_parser.vala"
				_tmp4_ = strlen (name);
#line 1004 "../src/source_parser.vala"
				_tmp5_ = _tmp4_;
#line 1004 "../src/source_parser.vala"
				if (!(i < _tmp5_)) {
#line 1004 "../src/source_parser.vala"
					break;
#line 8490 "source_parser.c"
				}
#line 1005 "../src/source_parser.vala"
				c = string_get (name, (glong) i);
#line 1006 "../src/source_parser.vala"
				if (c >= 'A') {
#line 1006 "../src/source_parser.vala"
					_tmp9_ = c <= 'Z';
#line 8498 "source_parser.c"
				} else {
#line 1006 "../src/source_parser.vala"
					_tmp9_ = FALSE;
#line 8502 "source_parser.c"
				}
#line 1006 "../src/source_parser.vala"
				if (_tmp9_) {
#line 1006 "../src/source_parser.vala"
					_tmp8_ = TRUE;
#line 8508 "source_parser.c"
				} else {
					gboolean _tmp10_ = FALSE;
#line 1006 "../src/source_parser.vala"
					if (c >= 'a') {
#line 1006 "../src/source_parser.vala"
						_tmp10_ = c <= 'z';
#line 8515 "source_parser.c"
					} else {
#line 1006 "../src/source_parser.vala"
						_tmp10_ = FALSE;
#line 8519 "source_parser.c"
					}
#line 1006 "../src/source_parser.vala"
					_tmp8_ = _tmp10_;
#line 8523 "source_parser.c"
				}
#line 1006 "../src/source_parser.vala"
				if (_tmp8_) {
#line 1006 "../src/source_parser.vala"
					_tmp7_ = TRUE;
#line 8529 "source_parser.c"
				} else {
#line 1006 "../src/source_parser.vala"
					_tmp7_ = c == '_';
#line 8533 "source_parser.c"
				}
#line 1006 "../src/source_parser.vala"
				if (_tmp7_) {
#line 1006 "../src/source_parser.vala"
					_tmp6_ = TRUE;
#line 8539 "source_parser.c"
				} else {
					gboolean _tmp11_ = FALSE;
					gboolean _tmp12_ = FALSE;
#line 1006 "../src/source_parser.vala"
					if (i > 0) {
#line 1006 "../src/source_parser.vala"
						_tmp12_ = c >= '0';
#line 8547 "source_parser.c"
					} else {
#line 1006 "../src/source_parser.vala"
						_tmp12_ = FALSE;
#line 8551 "source_parser.c"
					}
#line 1006 "../src/source_parser.vala"
					if (_tmp12_) {
#line 1006 "../src/source_parser.vala"
						_tmp11_ = c <= '9';
#line 8557 "source_parser.c"
					} else {
#line 1006 "../src/source_parser.vala"
						_tmp11_ = FALSE;
#line 8561 "source_parser.c"
					}
#line 1006 "../src/source_parser.vala"
					_tmp6_ = _tmp11_;
#line 8565 "source_parser.c"
				}
#line 1006 "../src/source_parser.vala"
				valid = _tmp6_;
#line 1007 "../src/source_parser.vala"
				if (!valid) {
#line 1008 "../src/source_parser.vala"
					result = FALSE;
#line 1008 "../src/source_parser.vala"
					return result;
#line 8575 "source_parser.c"
				}
			}
		}
	}
#line 1011 "../src/source_parser.vala"
	result = TRUE;
#line 1011 "../src/source_parser.vala"
	return result;
#line 8584 "source_parser.c"
}

static GeeArrayList*
php_to_vala_source_parser_split_top_level (const gchar* expression,
                                           gchar separator)
{
	GeeArrayList* parts = NULL;
	GeeArrayList* _tmp0_;
	gint depth = 0;
	gboolean in_single_quote = FALSE;
	gboolean in_double_quote = FALSE;
	gint start = 0;
	GeeArrayList* _tmp16_;
	gchar* _tmp17_;
	gchar* _tmp18_;
	GeeArrayList* result;
#line 1014 "../src/source_parser.vala"
	g_return_val_if_fail (expression != NULL, NULL);
#line 1015 "../src/source_parser.vala"
	_tmp0_ = gee_array_list_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, (GDestroyNotify) g_free, NULL, NULL, NULL);
#line 1015 "../src/source_parser.vala"
	parts = _tmp0_;
#line 1016 "../src/source_parser.vala"
	depth = 0;
#line 1017 "../src/source_parser.vala"
	in_single_quote = FALSE;
#line 1018 "../src/source_parser.vala"
	in_double_quote = FALSE;
#line 1019 "../src/source_parser.vala"
	start = 0;
#line 8615 "source_parser.c"
	{
		gint i = 0;
#line 1021 "../src/source_parser.vala"
		i = 0;
#line 8620 "source_parser.c"
		{
			gboolean _tmp1_ = FALSE;
#line 1021 "../src/source_parser.vala"
			_tmp1_ = TRUE;
#line 1021 "../src/source_parser.vala"
			while (TRUE) {
#line 8627 "source_parser.c"
				gint _tmp3_;
				gint _tmp4_;
				gchar c = '\0';
				gboolean _tmp5_ = FALSE;
#line 1021 "../src/source_parser.vala"
				if (!_tmp1_) {
#line 8634 "source_parser.c"
					gint _tmp2_;
#line 1021 "../src/source_parser.vala"
					_tmp2_ = i;
#line 1021 "../src/source_parser.vala"
					i = _tmp2_ + 1;
#line 8640 "source_parser.c"
				}
#line 1021 "../src/source_parser.vala"
				_tmp1_ = FALSE;
#line 1021 "../src/source_parser.vala"
				_tmp3_ = strlen (expression);
#line 1021 "../src/source_parser.vala"
				_tmp4_ = _tmp3_;
#line 1021 "../src/source_parser.vala"
				if (!(i < _tmp4_)) {
#line 1021 "../src/source_parser.vala"
					break;
#line 8652 "source_parser.c"
				}
#line 1022 "../src/source_parser.vala"
				c = string_get (expression, (glong) i);
#line 1023 "../src/source_parser.vala"
				if (c == '\'') {
#line 1023 "../src/source_parser.vala"
					_tmp5_ = !in_double_quote;
#line 8660 "source_parser.c"
				} else {
#line 1023 "../src/source_parser.vala"
					_tmp5_ = FALSE;
#line 8664 "source_parser.c"
				}
#line 1023 "../src/source_parser.vala"
				if (_tmp5_) {
#line 1024 "../src/source_parser.vala"
					in_single_quote = !in_single_quote;
#line 8670 "source_parser.c"
				} else {
					gboolean _tmp6_ = FALSE;
#line 1025 "../src/source_parser.vala"
					if (c == '"') {
#line 1025 "../src/source_parser.vala"
						_tmp6_ = !in_single_quote;
#line 8677 "source_parser.c"
					} else {
#line 1025 "../src/source_parser.vala"
						_tmp6_ = FALSE;
#line 8681 "source_parser.c"
					}
#line 1025 "../src/source_parser.vala"
					if (_tmp6_) {
#line 1026 "../src/source_parser.vala"
						in_double_quote = !in_double_quote;
#line 8687 "source_parser.c"
					} else {
						gboolean _tmp7_ = FALSE;
#line 1027 "../src/source_parser.vala"
						if (!in_single_quote) {
#line 1027 "../src/source_parser.vala"
							_tmp7_ = !in_double_quote;
#line 8694 "source_parser.c"
						} else {
#line 1027 "../src/source_parser.vala"
							_tmp7_ = FALSE;
#line 8698 "source_parser.c"
						}
#line 1027 "../src/source_parser.vala"
						if (_tmp7_) {
#line 8702 "source_parser.c"
							gboolean _tmp8_ = FALSE;
#line 1028 "../src/source_parser.vala"
							if (c == '(') {
#line 1028 "../src/source_parser.vala"
								_tmp8_ = TRUE;
#line 8708 "source_parser.c"
							} else {
#line 1028 "../src/source_parser.vala"
								_tmp8_ = c == '[';
#line 8712 "source_parser.c"
							}
#line 1028 "../src/source_parser.vala"
							if (_tmp8_) {
#line 8716 "source_parser.c"
								gint _tmp9_;
#line 1029 "../src/source_parser.vala"
								_tmp9_ = depth;
#line 1029 "../src/source_parser.vala"
								depth = _tmp9_ + 1;
#line 8722 "source_parser.c"
							} else {
								gboolean _tmp10_ = FALSE;
#line 1030 "../src/source_parser.vala"
								if (c == ')') {
#line 1030 "../src/source_parser.vala"
									_tmp10_ = TRUE;
#line 8729 "source_parser.c"
								} else {
#line 1030 "../src/source_parser.vala"
									_tmp10_ = c == ']';
#line 8733 "source_parser.c"
								}
#line 1030 "../src/source_parser.vala"
								if (_tmp10_) {
#line 8737 "source_parser.c"
									gint _tmp11_;
#line 1031 "../src/source_parser.vala"
									_tmp11_ = depth;
#line 1031 "../src/source_parser.vala"
									depth = _tmp11_ - 1;
#line 8743 "source_parser.c"
								} else {
									gboolean _tmp12_ = FALSE;
#line 1032 "../src/source_parser.vala"
									if (c == separator) {
#line 1032 "../src/source_parser.vala"
										_tmp12_ = depth == 0;
#line 8750 "source_parser.c"
									} else {
#line 1032 "../src/source_parser.vala"
										_tmp12_ = FALSE;
#line 8754 "source_parser.c"
									}
#line 1032 "../src/source_parser.vala"
									if (_tmp12_) {
#line 8758 "source_parser.c"
										GeeArrayList* _tmp13_;
										gchar* _tmp14_;
										gchar* _tmp15_;
#line 1033 "../src/source_parser.vala"
										_tmp13_ = parts;
#line 1033 "../src/source_parser.vala"
										_tmp14_ = string_substring (expression, (glong) start, (glong) (i - start));
#line 1033 "../src/source_parser.vala"
										_tmp15_ = _tmp14_;
#line 1033 "../src/source_parser.vala"
										gee_abstract_collection_add ((GeeAbstractCollection*) _tmp13_, _tmp15_);
#line 1033 "../src/source_parser.vala"
										_g_free0 (_tmp15_);
#line 1034 "../src/source_parser.vala"
										start = i + 1;
#line 8774 "source_parser.c"
									}
								}
							}
						}
					}
				}
			}
		}
	}
#line 1039 "../src/source_parser.vala"
	_tmp16_ = parts;
#line 1039 "../src/source_parser.vala"
	_tmp17_ = string_substring (expression, (glong) start, (glong) -1);
#line 1039 "../src/source_parser.vala"
	_tmp18_ = _tmp17_;
#line 1039 "../src/source_parser.vala"
	gee_abstract_collection_add ((GeeAbstractCollection*) _tmp16_, _tmp18_);
#line 1039 "../src/source_parser.vala"
	_g_free0 (_tmp18_);
#line 1040 "../src/source_parser.vala"
	result = parts;
#line 1040 "../src/source_parser.vala"
	return result;
#line 8798 "source_parser.c"
}

static GError*
php_to_vala_source_parser_unsupported_syntax (const gchar* source_path,
                                              gint php_line_number,
                                              const gchar* line)
{
	gchar* _tmp0_;
	gchar* _tmp1_;
	GError* _tmp2_;
	GError* _tmp3_;
	GError* result;
#line 1043 "../src/source_parser.vala"
	g_return_val_if_fail (source_path != NULL, NULL);
#line 1043 "../src/source_parser.vala"
	g_return_val_if_fail (line != NULL, NULL);
#line 1044 "../src/source_parser.vala"
	_tmp0_ = php_to_vala_source_parser_debug_tokens_for_snippet (source_path, line, php_line_number);
#line 1044 "../src/source_parser.vala"
	_tmp1_ = _tmp0_;
#line 1044 "../src/source_parser.vala"
	_tmp2_ = g_error_new (PHP_TO_VALA_ERROR, PHP_TO_VALA_ERROR_UNSUPPORTED, "Unsupported PHP syntax at %s:%d: %s\n%s", source_path, php_line_number, line, _tmp1_);
#line 1044 "../src/source_parser.vala"
	_tmp3_ = _tmp2_;
#line 1044 "../src/source_parser.vala"
	_g_free0 (_tmp1_);
#line 1044 "../src/source_parser.vala"
	result = _tmp3_;
#line 1044 "../src/source_parser.vala"
	return result;
#line 8829 "source_parser.c"
}

PhpToValaSourceParser*
php_to_vala_source_parser_construct (GType object_type)
{
	PhpToValaSourceParser * self = NULL;
#line 3 "../src/source_parser.vala"
	self = (PhpToValaSourceParser*) g_object_new (object_type, NULL);
#line 3 "../src/source_parser.vala"
	return self;
#line 8840 "source_parser.c"
}

PhpToValaSourceParser*
php_to_vala_source_parser_new (void)
{
#line 3 "../src/source_parser.vala"
	return php_to_vala_source_parser_construct (TYPE_PHP_TO_VALA_SOURCE_PARSER);
#line 8848 "source_parser.c"
}

static PhpToValaSourceParserPhpSourceToken*
php_to_vala_source_parser_php_source_token_construct (GType object_type,
                                                      const gchar* name,
                                                      const gchar* text,
                                                      gint line)
{
	PhpToValaSourceParserPhpSourceToken * self = NULL;
	gchar* _tmp0_;
	gchar* _tmp1_;
#line 182 "../src/source_parser.vala"
	g_return_val_if_fail (name != NULL, NULL);
#line 182 "../src/source_parser.vala"
	g_return_val_if_fail (text != NULL, NULL);
#line 182 "../src/source_parser.vala"
	self = (PhpToValaSourceParserPhpSourceToken*) g_object_new (object_type, NULL);
#line 183 "../src/source_parser.vala"
	_tmp0_ = g_strdup (name);
#line 183 "../src/source_parser.vala"
	_g_free0 (self->name);
#line 183 "../src/source_parser.vala"
	self->name = _tmp0_;
#line 184 "../src/source_parser.vala"
	_tmp1_ = g_strdup (text);
#line 184 "../src/source_parser.vala"
	_g_free0 (self->text);
#line 184 "../src/source_parser.vala"
	self->text = _tmp1_;
#line 185 "../src/source_parser.vala"
	self->line = line;
#line 182 "../src/source_parser.vala"
	return self;
#line 8882 "source_parser.c"
}

static PhpToValaSourceParserPhpSourceToken*
php_to_vala_source_parser_php_source_token_new (const gchar* name,
                                                const gchar* text,
                                                gint line)
{
#line 182 "../src/source_parser.vala"
	return php_to_vala_source_parser_php_source_token_construct (PHP_TO_VALA_SOURCE_PARSER_TYPE_PHP_SOURCE_TOKEN, name, text, line);
#line 8892 "source_parser.c"
}

static gboolean
php_to_vala_source_parser_php_source_token_is_symbol (PhpToValaSourceParserPhpSourceToken* self,
                                                      const gchar* value)
{
	const gchar* _tmp0_;
	gboolean result;
#line 188 "../src/source_parser.vala"
	g_return_val_if_fail (self != NULL, FALSE);
#line 188 "../src/source_parser.vala"
	g_return_val_if_fail (value != NULL, FALSE);
#line 189 "../src/source_parser.vala"
	_tmp0_ = self->name;
#line 189 "../src/source_parser.vala"
	result = g_strcmp0 (_tmp0_, value) == 0;
#line 189 "../src/source_parser.vala"
	return result;
#line 8911 "source_parser.c"
}

static gboolean
php_to_vala_source_parser_php_source_token_is_token (PhpToValaSourceParserPhpSourceToken* self,
                                                     const gchar* value)
{
	const gchar* _tmp0_;
	gboolean result;
#line 192 "../src/source_parser.vala"
	g_return_val_if_fail (self != NULL, FALSE);
#line 192 "../src/source_parser.vala"
	g_return_val_if_fail (value != NULL, FALSE);
#line 193 "../src/source_parser.vala"
	_tmp0_ = self->name;
#line 193 "../src/source_parser.vala"
	result = g_strcmp0 (_tmp0_, value) == 0;
#line 193 "../src/source_parser.vala"
	return result;
#line 8930 "source_parser.c"
}

static void
php_to_vala_source_parser_php_source_token_class_init (PhpToValaSourceParserPhpSourceTokenClass * klass,
                                                       gpointer klass_data)
{
#line 177 "../src/source_parser.vala"
	php_to_vala_source_parser_php_source_token_parent_class = g_type_class_peek_parent (klass);
#line 177 "../src/source_parser.vala"
	G_OBJECT_CLASS (klass)->finalize = php_to_vala_source_parser_php_source_token_finalize;
#line 8941 "source_parser.c"
}

static void
php_to_vala_source_parser_php_source_token_instance_init (PhpToValaSourceParserPhpSourceToken * self,
                                                          gpointer klass)
{
}

static void
php_to_vala_source_parser_php_source_token_finalize (GObject * obj)
{
	PhpToValaSourceParserPhpSourceToken * self;
#line 177 "../src/source_parser.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, PHP_TO_VALA_SOURCE_PARSER_TYPE_PHP_SOURCE_TOKEN, PhpToValaSourceParserPhpSourceToken);
#line 178 "../src/source_parser.vala"
	_g_free0 (self->name);
#line 179 "../src/source_parser.vala"
	_g_free0 (self->text);
#line 177 "../src/source_parser.vala"
	G_OBJECT_CLASS (php_to_vala_source_parser_php_source_token_parent_class)->finalize (obj);
#line 8962 "source_parser.c"
}

static GType
php_to_vala_source_parser_php_source_token_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (PhpToValaSourceParserPhpSourceTokenClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) php_to_vala_source_parser_php_source_token_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PhpToValaSourceParserPhpSourceToken), 0, (GInstanceInitFunc) php_to_vala_source_parser_php_source_token_instance_init, NULL };
	GType php_to_vala_source_parser_php_source_token_type_id;
	php_to_vala_source_parser_php_source_token_type_id = g_type_register_static (G_TYPE_OBJECT, "PhpToValaSourceParserPhpSourceToken", &g_define_type_info, 0);
	return php_to_vala_source_parser_php_source_token_type_id;
}

static GType
php_to_vala_source_parser_php_source_token_get_type (void)
{
	static volatile gsize php_to_vala_source_parser_php_source_token_type_id__once = 0;
	if (g_once_init_enter (&php_to_vala_source_parser_php_source_token_type_id__once)) {
		GType php_to_vala_source_parser_php_source_token_type_id;
		php_to_vala_source_parser_php_source_token_type_id = php_to_vala_source_parser_php_source_token_get_type_once ();
		g_once_init_leave (&php_to_vala_source_parser_php_source_token_type_id__once, php_to_vala_source_parser_php_source_token_type_id);
	}
	return php_to_vala_source_parser_php_source_token_type_id__once;
}

static PhpToValaSourceParserSourceSpan*
php_to_vala_source_parser_source_span_construct (GType object_type,
                                                 gint start_line,
                                                 gint end_line)
{
	PhpToValaSourceParserSourceSpan * self = NULL;
#line 201 "../src/source_parser.vala"
	self = (PhpToValaSourceParserSourceSpan*) g_object_new (object_type, NULL);
#line 202 "../src/source_parser.vala"
	self->start_line = start_line;
#line 203 "../src/source_parser.vala"
	self->end_line = end_line;
#line 201 "../src/source_parser.vala"
	return self;
#line 9000 "source_parser.c"
}

static PhpToValaSourceParserSourceSpan*
php_to_vala_source_parser_source_span_new (gint start_line,
                                           gint end_line)
{
#line 201 "../src/source_parser.vala"
	return php_to_vala_source_parser_source_span_construct (PHP_TO_VALA_SOURCE_PARSER_TYPE_SOURCE_SPAN, start_line, end_line);
#line 9009 "source_parser.c"
}

static void
php_to_vala_source_parser_source_span_class_init (PhpToValaSourceParserSourceSpanClass * klass,
                                                  gpointer klass_data)
{
#line 197 "../src/source_parser.vala"
	php_to_vala_source_parser_source_span_parent_class = g_type_class_peek_parent (klass);
#line 197 "../src/source_parser.vala"
	G_OBJECT_CLASS (klass)->finalize = php_to_vala_source_parser_source_span_finalize;
#line 9020 "source_parser.c"
}

static void
php_to_vala_source_parser_source_span_instance_init (PhpToValaSourceParserSourceSpan * self,
                                                     gpointer klass)
{
}

static void
php_to_vala_source_parser_source_span_finalize (GObject * obj)
{
	PhpToValaSourceParserSourceSpan * self;
#line 197 "../src/source_parser.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, PHP_TO_VALA_SOURCE_PARSER_TYPE_SOURCE_SPAN, PhpToValaSourceParserSourceSpan);
#line 197 "../src/source_parser.vala"
	G_OBJECT_CLASS (php_to_vala_source_parser_source_span_parent_class)->finalize (obj);
#line 9037 "source_parser.c"
}

static GType
php_to_vala_source_parser_source_span_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (PhpToValaSourceParserSourceSpanClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) php_to_vala_source_parser_source_span_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PhpToValaSourceParserSourceSpan), 0, (GInstanceInitFunc) php_to_vala_source_parser_source_span_instance_init, NULL };
	GType php_to_vala_source_parser_source_span_type_id;
	php_to_vala_source_parser_source_span_type_id = g_type_register_static (G_TYPE_OBJECT, "PhpToValaSourceParserSourceSpan", &g_define_type_info, 0);
	return php_to_vala_source_parser_source_span_type_id;
}

static GType
php_to_vala_source_parser_source_span_get_type (void)
{
	static volatile gsize php_to_vala_source_parser_source_span_type_id__once = 0;
	if (g_once_init_enter (&php_to_vala_source_parser_source_span_type_id__once)) {
		GType php_to_vala_source_parser_source_span_type_id;
		php_to_vala_source_parser_source_span_type_id = php_to_vala_source_parser_source_span_get_type_once ();
		g_once_init_leave (&php_to_vala_source_parser_source_span_type_id__once, php_to_vala_source_parser_source_span_type_id);
	}
	return php_to_vala_source_parser_source_span_type_id__once;
}

static PhpToValaSourceParserStatementSlice*
php_to_vala_source_parser_statement_slice_construct (GType object_type,
                                                     const gchar* text,
                                                     gint column)
{
	PhpToValaSourceParserStatementSlice * self = NULL;
	gchar* _tmp0_;
#line 753 "../src/source_parser.vala"
	g_return_val_if_fail (text != NULL, NULL);
#line 753 "../src/source_parser.vala"
	self = (PhpToValaSourceParserStatementSlice*) g_object_new (object_type, NULL);
#line 754 "../src/source_parser.vala"
	_tmp0_ = g_strdup (text);
#line 754 "../src/source_parser.vala"
	_g_free0 (self->text);
#line 754 "../src/source_parser.vala"
	self->text = _tmp0_;
#line 755 "../src/source_parser.vala"
	self->column = column;
#line 753 "../src/source_parser.vala"
	return self;
#line 9082 "source_parser.c"
}

static PhpToValaSourceParserStatementSlice*
php_to_vala_source_parser_statement_slice_new (const gchar* text,
                                               gint column)
{
#line 753 "../src/source_parser.vala"
	return php_to_vala_source_parser_statement_slice_construct (PHP_TO_VALA_SOURCE_PARSER_TYPE_STATEMENT_SLICE, text, column);
#line 9091 "source_parser.c"
}

static void
php_to_vala_source_parser_statement_slice_class_init (PhpToValaSourceParserStatementSliceClass * klass,
                                                      gpointer klass_data)
{
#line 749 "../src/source_parser.vala"
	php_to_vala_source_parser_statement_slice_parent_class = g_type_class_peek_parent (klass);
#line 749 "../src/source_parser.vala"
	G_OBJECT_CLASS (klass)->finalize = php_to_vala_source_parser_statement_slice_finalize;
#line 9102 "source_parser.c"
}

static void
php_to_vala_source_parser_statement_slice_instance_init (PhpToValaSourceParserStatementSlice * self,
                                                         gpointer klass)
{
}

static void
php_to_vala_source_parser_statement_slice_finalize (GObject * obj)
{
	PhpToValaSourceParserStatementSlice * self;
#line 749 "../src/source_parser.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, PHP_TO_VALA_SOURCE_PARSER_TYPE_STATEMENT_SLICE, PhpToValaSourceParserStatementSlice);
#line 750 "../src/source_parser.vala"
	_g_free0 (self->text);
#line 749 "../src/source_parser.vala"
	G_OBJECT_CLASS (php_to_vala_source_parser_statement_slice_parent_class)->finalize (obj);
#line 9121 "source_parser.c"
}

static GType
php_to_vala_source_parser_statement_slice_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (PhpToValaSourceParserStatementSliceClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) php_to_vala_source_parser_statement_slice_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PhpToValaSourceParserStatementSlice), 0, (GInstanceInitFunc) php_to_vala_source_parser_statement_slice_instance_init, NULL };
	GType php_to_vala_source_parser_statement_slice_type_id;
	php_to_vala_source_parser_statement_slice_type_id = g_type_register_static (G_TYPE_OBJECT, "PhpToValaSourceParserStatementSlice", &g_define_type_info, 0);
	return php_to_vala_source_parser_statement_slice_type_id;
}

static GType
php_to_vala_source_parser_statement_slice_get_type (void)
{
	static volatile gsize php_to_vala_source_parser_statement_slice_type_id__once = 0;
	if (g_once_init_enter (&php_to_vala_source_parser_statement_slice_type_id__once)) {
		GType php_to_vala_source_parser_statement_slice_type_id;
		php_to_vala_source_parser_statement_slice_type_id = php_to_vala_source_parser_statement_slice_get_type_once ();
		g_once_init_leave (&php_to_vala_source_parser_statement_slice_type_id__once, php_to_vala_source_parser_statement_slice_type_id);
	}
	return php_to_vala_source_parser_statement_slice_type_id__once;
}

static void
php_to_vala_source_parser_class_init (PhpToValaSourceParserClass * klass,
                                      gpointer klass_data)
{
#line 3 "../src/source_parser.vala"
	php_to_vala_source_parser_parent_class = g_type_class_peek_parent (klass);
#line 9151 "source_parser.c"
}

static void
php_to_vala_source_parser_instance_init (PhpToValaSourceParser * self,
                                         gpointer klass)
{
}

static GType
php_to_vala_source_parser_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (PhpToValaSourceParserClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) php_to_vala_source_parser_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PhpToValaSourceParser), 0, (GInstanceInitFunc) php_to_vala_source_parser_instance_init, NULL };
	GType php_to_vala_source_parser_type_id;
	php_to_vala_source_parser_type_id = g_type_register_static (G_TYPE_OBJECT, "PhpToValaSourceParser", &g_define_type_info, 0);
	return php_to_vala_source_parser_type_id;
}

GType
php_to_vala_source_parser_get_type (void)
{
	static volatile gsize php_to_vala_source_parser_type_id__once = 0;
	if (g_once_init_enter (&php_to_vala_source_parser_type_id__once)) {
		GType php_to_vala_source_parser_type_id;
		php_to_vala_source_parser_type_id = php_to_vala_source_parser_get_type_once ();
		g_once_init_leave (&php_to_vala_source_parser_type_id__once, php_to_vala_source_parser_type_id);
	}
	return php_to_vala_source_parser_type_id__once;
}

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

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

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

