~ubuntu-branches/ubuntu/trusty/anjuta/trusty

« back to all changes in this revision

Viewing changes to plugins/symbol-db/anjuta-tags/ctags-visitor.c

  • Committer: Package Import Robot
  • Author(s): Jeremy Bicha
  • Date: 2012-03-06 01:11:30 UTC
  • mfrom: (1.1.44)
  • Revision ID: package-import@ubuntu.com-20120306011130-yumg9s1nprogue2a
Tags: 2:3.3.91-0ubuntu1
* New upstream release.
* debian/control.in:
  - Bump minimum glade to 3.11 and vala to 0.16

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* ctags-visitor.c generated by valac 0.11.2, the Vala compiler
2
 
 * generated from ctags-visitor.vala, do not modify */
3
 
 
4
 
/*
5
 
 * ctags-visitor.vala
6
 
 *
7
 
 * Copyright 2008, 2010 Abderrahim Kitouni <a.kitouni@gmail.com>
8
 
 *
9
 
 * This program is free software; you can redistribute it and/or modify
10
 
 * it under the terms of the GNU General Public License as published by
11
 
 * the Free Software Foundation; either version 2 of the License, or
12
 
 * (at your option) any later version.
13
 
 *
14
 
 * This program is distributed in the hope that it will be useful,
15
 
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16
 
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17
 
 * GNU General Public License for more details.
18
 
 *
19
 
 * You should have received a copy of the GNU General Public License
20
 
 * along with this program; if not, write to the Free Software
21
 
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
22
 
 * MA 02110-1301, USA.
23
 
 */
24
 
 
25
 
#include <glib.h>
26
 
#include <glib-object.h>
27
 
#include <stdlib.h>
28
 
#include <string.h>
29
 
#include <vala.h>
30
 
#include <valagee.h>
31
 
 
32
 
 
33
 
#define TYPE_CTAGS_ENTRY (ctags_entry_get_type ())
34
 
typedef struct _CTagsEntry CTagsEntry;
35
 
#define _g_free0(var) (var = (g_free (var), NULL))
36
 
 
37
 
#define TYPE_DUMMY_REPORT (dummy_report_get_type ())
38
 
#define DUMMY_REPORT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DUMMY_REPORT, DummyReport))
39
 
#define DUMMY_REPORT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DUMMY_REPORT, DummyReportClass))
40
 
#define IS_DUMMY_REPORT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DUMMY_REPORT))
41
 
#define IS_DUMMY_REPORT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DUMMY_REPORT))
42
 
#define DUMMY_REPORT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DUMMY_REPORT, DummyReportClass))
43
 
 
44
 
typedef struct _DummyReport DummyReport;
45
 
typedef struct _DummyReportClass DummyReportClass;
46
 
typedef struct _DummyReportPrivate DummyReportPrivate;
47
 
 
48
 
#define TYPE_CTAGS_VISITOR (ctags_visitor_get_type ())
49
 
#define CTAGS_VISITOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_CTAGS_VISITOR, CTagsVisitor))
50
 
#define CTAGS_VISITOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_CTAGS_VISITOR, CTagsVisitorClass))
51
 
#define IS_CTAGS_VISITOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_CTAGS_VISITOR))
52
 
#define IS_CTAGS_VISITOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_CTAGS_VISITOR))
53
 
#define CTAGS_VISITOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_CTAGS_VISITOR, CTagsVisitorClass))
54
 
 
55
 
typedef struct _CTagsVisitor CTagsVisitor;
56
 
typedef struct _CTagsVisitorClass CTagsVisitorClass;
57
 
typedef struct _CTagsVisitorPrivate CTagsVisitorPrivate;
58
 
#define _vala_code_visitor_unref0(var) ((var == NULL) ? NULL : (var = (vala_code_visitor_unref (var), NULL)))
59
 
#define __g_list_free__ctags_entry_free0_0(var) ((var == NULL) ? NULL : (var = (_g_list_free__ctags_entry_free0_ (var), NULL)))
60
 
#define _vala_code_node_unref0(var) ((var == NULL) ? NULL : (var = (vala_code_node_unref (var), NULL)))
61
 
#define _vala_iterator_unref0(var) ((var == NULL) ? NULL : (var = (vala_iterator_unref (var), NULL)))
62
 
#define _g_string_free0(var) ((var == NULL) ? NULL : (var = (g_string_free (var, TRUE), NULL)))
63
 
#define __g_list_free__g_free0_0(var) ((var == NULL) ? NULL : (var = (_g_list_free__g_free0_ (var), NULL)))
64
 
#define _vala_iterable_unref0(var) ((var == NULL) ? NULL : (var = (vala_iterable_unref (var), NULL)))
65
 
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
66
 
#define _ctags_entry_free0(var) ((var == NULL) ? NULL : (var = (ctags_entry_free (var), NULL)))
67
 
#define _vala_source_file_unref0(var) ((var == NULL) ? NULL : (var = (vala_source_file_unref (var), NULL)))
68
 
#define _vala_code_context_unref0(var) ((var == NULL) ? NULL : (var = (vala_code_context_unref (var), NULL)))
69
 
 
70
 
struct _CTagsEntry {
71
 
        gint line_number;
72
 
        gchar* name;
73
 
        gchar* kind_name;
74
 
        gchar kind;
75
 
        gchar* access;
76
 
        gchar* implementation;
77
 
        gchar* inheritance;
78
 
        gchar* scope[2];
79
 
        gchar* signature;
80
 
        gchar* typeref;
81
 
        gchar* returntype;
82
 
};
83
 
 
84
 
struct _DummyReport {
85
 
        ValaReport parent_instance;
86
 
        DummyReportPrivate * priv;
87
 
};
88
 
 
89
 
struct _DummyReportClass {
90
 
        ValaReportClass parent_class;
91
 
};
92
 
 
93
 
typedef void (*CTagsEntryMaker) (CTagsEntry* entry);
94
 
struct _CTagsVisitor {
95
 
        ValaCodeVisitor parent_instance;
96
 
        CTagsVisitorPrivate * priv;
97
 
};
98
 
 
99
 
struct _CTagsVisitorClass {
100
 
        ValaCodeVisitorClass parent_class;
101
 
};
102
 
 
103
 
struct _CTagsVisitorPrivate {
104
 
        ValaParser* vala_parser;
105
 
        ValaGenieParser* genie_parser;
106
 
        GList* taglist;
107
 
};
108
 
 
109
 
 
110
 
static gpointer dummy_report_parent_class = NULL;
111
 
static gpointer ctags_visitor_parent_class = NULL;
112
 
 
113
 
GType ctags_entry_get_type (void) G_GNUC_CONST;
114
 
CTagsEntry* ctags_entry_dup (const CTagsEntry* self);
115
 
void ctags_entry_free (CTagsEntry* self);
116
 
void ctags_entry_copy (const CTagsEntry* self, CTagsEntry* dest);
117
 
void ctags_entry_destroy (CTagsEntry* self);
118
 
static void _vala_array_copy1 (gchar** self, gchar** dest);
119
 
GType dummy_report_get_type (void) G_GNUC_CONST;
120
 
enum  {
121
 
        DUMMY_REPORT_DUMMY_PROPERTY
122
 
};
123
 
static void dummy_report_real_warn (ValaReport* base, ValaSourceReference* source, const gchar* message);
124
 
static void dummy_report_real_err (ValaReport* base, ValaSourceReference* source, const gchar* message);
125
 
DummyReport* dummy_report_new (void);
126
 
DummyReport* dummy_report_construct (GType object_type);
127
 
GType ctags_visitor_get_type (void) G_GNUC_CONST;
128
 
#define CTAGS_VISITOR_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_CTAGS_VISITOR, CTagsVisitorPrivate))
129
 
enum  {
130
 
        CTAGS_VISITOR_DUMMY_PROPERTY
131
 
};
132
 
static void _ctags_entry_free0_ (gpointer var);
133
 
static void _g_list_free__ctags_entry_free0_ (GList* self);
134
 
CTagsVisitor* ctags_visitor_new (void);
135
 
CTagsVisitor* ctags_visitor_construct (GType object_type);
136
 
static gchar* ctags_visitor_get_access (ValaSymbol* sym);
137
 
static gchar* ctags_visitor_to_string (ValaIterable* seq, const gchar* sep);
138
 
static gchar* ctags_visitor_implementation (ValaSymbol* sym);
139
 
static void _g_free0_ (gpointer var);
140
 
static void _g_list_free__g_free0_ (GList* self);
141
 
static gchar* ctags_visitor_signature (ValaList* parameter);
142
 
static void ctags_visitor_scope (ValaSymbol* s, gchar** scope, int scope_length1);
143
 
static void ctags_visitor_real_visit_source_file (ValaCodeVisitor* base, ValaSourceFile* source_file);
144
 
static void ctags_visitor_real_visit_class (ValaCodeVisitor* base, ValaClass* cl);
145
 
static void ctags_visitor_real_visit_struct (ValaCodeVisitor* base, ValaStruct* st);
146
 
static void ctags_visitor_real_visit_interface (ValaCodeVisitor* base, ValaInterface* iface);
147
 
static void ctags_visitor_real_visit_enum (ValaCodeVisitor* base, ValaEnum* en);
148
 
static void ctags_visitor_real_visit_error_domain (ValaCodeVisitor* base, ValaErrorDomain* edomain);
149
 
static void ctags_visitor_real_visit_enum_value (ValaCodeVisitor* base, ValaEnumValue* ev);
150
 
static void ctags_visitor_real_visit_error_code (ValaCodeVisitor* base, ValaErrorCode* ecode);
151
 
static void ctags_visitor_real_visit_delegate (ValaCodeVisitor* base, ValaDelegate* d);
152
 
static void ctags_visitor_real_visit_signal (ValaCodeVisitor* base, ValaSignal* sig);
153
 
static void ctags_visitor_real_visit_field (ValaCodeVisitor* base, ValaField* f);
154
 
static void ctags_visitor_real_visit_constant (ValaCodeVisitor* base, ValaConstant* c);
155
 
static void ctags_visitor_real_visit_property (ValaCodeVisitor* base, ValaProperty* prop);
156
 
static void ctags_visitor_real_visit_method (ValaCodeVisitor* base, ValaMethod* m);
157
 
static void ctags_visitor_real_visit_local_variable (ValaCodeVisitor* base, ValaLocalVariable* local);
158
 
void ctags_visitor_parse_vala (CTagsVisitor* self, const gchar* filename, CTagsEntryMaker maker);
159
 
void ctags_visitor_parse_genie (CTagsVisitor* self, const gchar* filename, CTagsEntryMaker maker);
160
 
static void ctags_visitor_finalize (ValaCodeVisitor* obj);
161
 
static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func);
162
 
static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func);
163
 
 
164
 
 
165
 
static void _vala_array_copy1 (gchar** self, gchar** dest) {
166
 
        int i;
167
 
        for (i = 0; i < 2; i++) {
168
 
                dest[i] = g_strdup (self[i]);
169
 
        }
170
 
}
171
 
 
172
 
 
173
 
void ctags_entry_copy (const CTagsEntry* self, CTagsEntry* dest) {
174
 
        gchar* _tmp0_[2] = {0};
175
 
        dest->line_number = self->line_number;
176
 
        dest->name = g_strdup (self->name);
177
 
        dest->kind_name = g_strdup (self->kind_name);
178
 
        dest->kind = self->kind;
179
 
        dest->access = g_strdup (self->access);
180
 
        dest->implementation = g_strdup (self->implementation);
181
 
        dest->inheritance = g_strdup (self->inheritance);
182
 
        memcpy (dest->scope, (_vala_array_copy1 (self->scope, _tmp0_), _tmp0_), 2 * sizeof (gchar*));
183
 
        dest->signature = g_strdup (self->signature);
184
 
        dest->typeref = g_strdup (self->typeref);
185
 
        dest->returntype = g_strdup (self->returntype);
186
 
}
187
 
 
188
 
 
189
 
void ctags_entry_destroy (CTagsEntry* self) {
190
 
        _g_free0 (self->name);
191
 
        _g_free0 (self->kind_name);
192
 
        _g_free0 (self->access);
193
 
        _g_free0 (self->implementation);
194
 
        _g_free0 (self->inheritance);
195
 
        _vala_array_destroy (self->scope, 2, (GDestroyNotify) g_free);
196
 
        _g_free0 (self->signature);
197
 
        _g_free0 (self->typeref);
198
 
        _g_free0 (self->returntype);
199
 
}
200
 
 
201
 
 
202
 
CTagsEntry* ctags_entry_dup (const CTagsEntry* self) {
203
 
        CTagsEntry* dup;
204
 
        dup = g_new0 (CTagsEntry, 1);
205
 
        ctags_entry_copy (self, dup);
206
 
        return dup;
207
 
}
208
 
 
209
 
 
210
 
void ctags_entry_free (CTagsEntry* self) {
211
 
        ctags_entry_destroy (self);
212
 
        g_free (self);
213
 
}
214
 
 
215
 
 
216
 
GType ctags_entry_get_type (void) {
217
 
        static volatile gsize ctags_entry_type_id__volatile = 0;
218
 
        if (g_once_init_enter (&ctags_entry_type_id__volatile)) {
219
 
                GType ctags_entry_type_id;
220
 
                ctags_entry_type_id = g_boxed_type_register_static ("CTagsEntry", (GBoxedCopyFunc) ctags_entry_dup, (GBoxedFreeFunc) ctags_entry_free);
221
 
                g_once_init_leave (&ctags_entry_type_id__volatile, ctags_entry_type_id);
222
 
        }
223
 
        return ctags_entry_type_id__volatile;
224
 
}
225
 
 
226
 
 
227
 
static void dummy_report_real_warn (ValaReport* base, ValaSourceReference* source, const gchar* message) {
228
 
        DummyReport * self;
229
 
        self = (DummyReport*) base;
230
 
        g_return_if_fail (message != NULL);
231
 
}
232
 
 
233
 
 
234
 
static void dummy_report_real_err (ValaReport* base, ValaSourceReference* source, const gchar* message) {
235
 
        DummyReport * self;
236
 
        self = (DummyReport*) base;
237
 
        g_return_if_fail (message != NULL);
238
 
}
239
 
 
240
 
 
241
 
DummyReport* dummy_report_construct (GType object_type) {
242
 
        DummyReport * self = NULL;
243
 
        self = (DummyReport*) vala_report_construct (object_type);
244
 
        return self;
245
 
}
246
 
 
247
 
 
248
 
DummyReport* dummy_report_new (void) {
249
 
        return dummy_report_construct (TYPE_DUMMY_REPORT);
250
 
}
251
 
 
252
 
 
253
 
static void dummy_report_class_init (DummyReportClass * klass) {
254
 
        dummy_report_parent_class = g_type_class_peek_parent (klass);
255
 
        VALA_REPORT_CLASS (klass)->warn = dummy_report_real_warn;
256
 
        VALA_REPORT_CLASS (klass)->err = dummy_report_real_err;
257
 
}
258
 
 
259
 
 
260
 
static void dummy_report_instance_init (DummyReport * self) {
261
 
}
262
 
 
263
 
 
264
 
GType dummy_report_get_type (void) {
265
 
        static volatile gsize dummy_report_type_id__volatile = 0;
266
 
        if (g_once_init_enter (&dummy_report_type_id__volatile)) {
267
 
                static const GTypeInfo g_define_type_info = { sizeof (DummyReportClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) dummy_report_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DummyReport), 0, (GInstanceInitFunc) dummy_report_instance_init, NULL };
268
 
                GType dummy_report_type_id;
269
 
                dummy_report_type_id = g_type_register_static (VALA_TYPE_REPORT, "DummyReport", &g_define_type_info, 0);
270
 
                g_once_init_leave (&dummy_report_type_id__volatile, dummy_report_type_id);
271
 
        }
272
 
        return dummy_report_type_id__volatile;
273
 
}
274
 
 
275
 
 
276
 
static void _ctags_entry_free0_ (gpointer var) {
277
 
        (var == NULL) ? NULL : (var = (ctags_entry_free (var), NULL));
278
 
}
279
 
 
280
 
 
281
 
static void _g_list_free__ctags_entry_free0_ (GList* self) {
282
 
        g_list_foreach (self, (GFunc) _ctags_entry_free0_, NULL);
283
 
        g_list_free (self);
284
 
}
285
 
 
286
 
 
287
 
CTagsVisitor* ctags_visitor_construct (GType object_type) {
288
 
        CTagsVisitor* self = NULL;
289
 
        ValaParser* _tmp0_ = NULL;
290
 
        ValaParser* _tmp1_;
291
 
        ValaGenieParser* _tmp2_ = NULL;
292
 
        ValaGenieParser* _tmp3_;
293
 
        self = (CTagsVisitor*) vala_code_visitor_construct (object_type);
294
 
        _tmp0_ = vala_parser_new ();
295
 
        _tmp1_ = _tmp0_;
296
 
        _vala_code_visitor_unref0 (self->priv->vala_parser);
297
 
        self->priv->vala_parser = _tmp1_;
298
 
        _tmp2_ = vala_genie_parser_new ();
299
 
        _tmp3_ = _tmp2_;
300
 
        _vala_code_visitor_unref0 (self->priv->genie_parser);
301
 
        self->priv->genie_parser = _tmp3_;
302
 
        return self;
303
 
}
304
 
 
305
 
 
306
 
CTagsVisitor* ctags_visitor_new (void) {
307
 
        return ctags_visitor_construct (TYPE_CTAGS_VISITOR);
308
 
}
309
 
 
310
 
 
311
 
static gchar* ctags_visitor_get_access (ValaSymbol* sym) {
312
 
        gchar* result = NULL;
313
 
        ValaSymbolAccessibility _tmp0_;
314
 
        g_return_val_if_fail (sym != NULL, NULL);
315
 
        _tmp0_ = vala_symbol_get_access (sym);
316
 
        switch (_tmp0_) {
317
 
                case VALA_SYMBOL_ACCESSIBILITY_PRIVATE:
318
 
                {
319
 
                        gchar* _tmp1_;
320
 
                        _tmp1_ = g_strdup ("private");
321
 
                        result = _tmp1_;
322
 
                        return result;
323
 
                }
324
 
                case VALA_SYMBOL_ACCESSIBILITY_INTERNAL:
325
 
                {
326
 
                        gchar* _tmp2_;
327
 
                        _tmp2_ = g_strdup ("internal");
328
 
                        result = _tmp2_;
329
 
                        return result;
330
 
                }
331
 
                case VALA_SYMBOL_ACCESSIBILITY_PROTECTED:
332
 
                {
333
 
                        gchar* _tmp3_;
334
 
                        _tmp3_ = g_strdup ("protected");
335
 
                        result = _tmp3_;
336
 
                        return result;
337
 
                }
338
 
                case VALA_SYMBOL_ACCESSIBILITY_PUBLIC:
339
 
                {
340
 
                        gchar* _tmp4_;
341
 
                        _tmp4_ = g_strdup ("public");
342
 
                        result = _tmp4_;
343
 
                        return result;
344
 
                }
345
 
        }
346
 
        g_assert_not_reached ();
347
 
}
348
 
 
349
 
 
350
 
static gchar* ctags_visitor_to_string (ValaIterable* seq, const gchar* sep) {
351
 
        gchar* result = NULL;
352
 
        GString* _tmp0_ = NULL;
353
 
        GString* str;
354
 
        gboolean first;
355
 
        gchar* _tmp6_;
356
 
        g_return_val_if_fail (seq != NULL, NULL);
357
 
        g_return_val_if_fail (sep != NULL, NULL);
358
 
        _tmp0_ = g_string_new ("");
359
 
        str = _tmp0_;
360
 
        first = TRUE;
361
 
        {
362
 
                ValaIterator* _tmp1_ = NULL;
363
 
                ValaIterator* _type_it;
364
 
                _tmp1_ = vala_iterable_iterator (seq);
365
 
                _type_it = _tmp1_;
366
 
                while (TRUE) {
367
 
                        gboolean _tmp2_;
368
 
                        gpointer _tmp3_ = NULL;
369
 
                        ValaDataType* type;
370
 
                        gchar* _tmp4_ = NULL;
371
 
                        gchar* _tmp5_;
372
 
                        _tmp2_ = vala_iterator_next (_type_it);
373
 
                        if (!_tmp2_) {
374
 
                                break;
375
 
                        }
376
 
                        _tmp3_ = vala_iterator_get (_type_it);
377
 
                        type = (ValaDataType*) _tmp3_;
378
 
                        if (first) {
379
 
                                first = FALSE;
380
 
                        } else {
381
 
                                g_string_append (str, sep);
382
 
                        }
383
 
                        _tmp4_ = vala_data_type_to_qualified_string (type, NULL);
384
 
                        _tmp5_ = _tmp4_;
385
 
                        g_string_append (str, _tmp5_);
386
 
                        _g_free0 (_tmp5_);
387
 
                        _vala_code_node_unref0 (type);
388
 
                }
389
 
                _vala_iterator_unref0 (_type_it);
390
 
        }
391
 
        _tmp6_ = g_strdup (str->str);
392
 
        result = _tmp6_;
393
 
        _g_string_free0 (str);
394
 
        return result;
395
 
}
396
 
 
397
 
 
398
 
static gpointer _vala_code_node_ref0 (gpointer self) {
399
 
        return self ? vala_code_node_ref (self) : NULL;
400
 
}
401
 
 
402
 
 
403
 
static void _g_free0_ (gpointer var) {
404
 
        var = (g_free (var), NULL);
405
 
}
406
 
 
407
 
 
408
 
static void _g_list_free__g_free0_ (GList* self) {
409
 
        g_list_foreach (self, (GFunc) _g_free0_, NULL);
410
 
        g_list_free (self);
411
 
}
412
 
 
413
 
 
414
 
static gchar* ctags_visitor_implementation (ValaSymbol* sym) {
415
 
        gchar* result = NULL;
416
 
        GList* list;
417
 
        GString* _tmp16_ = NULL;
418
 
        GString* ret;
419
 
        gboolean first;
420
 
        gchar* _tmp18_;
421
 
        g_return_val_if_fail (sym != NULL, NULL);
422
 
        list = NULL;
423
 
        if (VALA_IS_SIGNAL (sym)) {
424
 
                ValaSignal* _tmp0_;
425
 
                ValaSignal* sig;
426
 
                gboolean _tmp1_;
427
 
                _tmp0_ = _vala_code_node_ref0 (VALA_SIGNAL (sym));
428
 
                sig = _tmp0_;
429
 
                _tmp1_ = vala_signal_get_is_virtual (sig);
430
 
                if (_tmp1_) {
431
 
                        gchar* _tmp2_;
432
 
                        _tmp2_ = g_strdup ("virtual");
433
 
                        list = g_list_append (list, _tmp2_);
434
 
                }
435
 
                _vala_code_node_unref0 (sig);
436
 
        } else {
437
 
                if (VALA_IS_CLASS (sym)) {
438
 
                        ValaClass* _tmp3_;
439
 
                        ValaClass* cls;
440
 
                        gboolean _tmp4_;
441
 
                        _tmp3_ = _vala_code_node_ref0 (VALA_CLASS (sym));
442
 
                        cls = _tmp3_;
443
 
                        _tmp4_ = vala_class_get_is_abstract (cls);
444
 
                        if (_tmp4_) {
445
 
                                gchar* _tmp5_;
446
 
                                _tmp5_ = g_strdup ("abstract");
447
 
                                list = g_list_append (list, _tmp5_);
448
 
                        }
449
 
                        _vala_code_node_unref0 (cls);
450
 
                } else {
451
 
                        if (VALA_IS_METHOD (sym)) {
452
 
                                ValaMethod* _tmp6_;
453
 
                                ValaMethod* meth;
454
 
                                gboolean _tmp7_;
455
 
                                _tmp6_ = _vala_code_node_ref0 (VALA_METHOD (sym));
456
 
                                meth = _tmp6_;
457
 
                                _tmp7_ = vala_method_get_is_abstract (meth);
458
 
                                if (_tmp7_) {
459
 
                                        gchar* _tmp8_;
460
 
                                        _tmp8_ = g_strdup ("abstract");
461
 
                                        list = g_list_append (list, _tmp8_);
462
 
                                } else {
463
 
                                        gboolean _tmp9_;
464
 
                                        _tmp9_ = vala_method_get_is_virtual (meth);
465
 
                                        if (_tmp9_) {
466
 
                                                gchar* _tmp10_;
467
 
                                                _tmp10_ = g_strdup ("virtual");
468
 
                                                list = g_list_append (list, _tmp10_);
469
 
                                        }
470
 
                                }
471
 
                                _vala_code_node_unref0 (meth);
472
 
                        } else {
473
 
                                if (VALA_IS_PROPERTY (sym)) {
474
 
                                        ValaProperty* _tmp11_;
475
 
                                        ValaProperty* prop;
476
 
                                        gboolean _tmp12_;
477
 
                                        _tmp11_ = _vala_code_node_ref0 (VALA_PROPERTY (sym));
478
 
                                        prop = _tmp11_;
479
 
                                        _tmp12_ = vala_property_get_is_abstract (prop);
480
 
                                        if (_tmp12_) {
481
 
                                                gchar* _tmp13_;
482
 
                                                _tmp13_ = g_strdup ("abstract");
483
 
                                                list = g_list_append (list, _tmp13_);
484
 
                                        } else {
485
 
                                                gboolean _tmp14_;
486
 
                                                _tmp14_ = vala_property_get_is_virtual (prop);
487
 
                                                if (_tmp14_) {
488
 
                                                        gchar* _tmp15_;
489
 
                                                        _tmp15_ = g_strdup ("virtual");
490
 
                                                        list = g_list_append (list, _tmp15_);
491
 
                                                }
492
 
                                        }
493
 
                                        _vala_code_node_unref0 (prop);
494
 
                                } else {
495
 
                                        g_return_val_if_reached (NULL);
496
 
                                }
497
 
                        }
498
 
                }
499
 
        }
500
 
        _tmp16_ = g_string_new ("");
501
 
        ret = _tmp16_;
502
 
        first = TRUE;
503
 
        {
504
 
                GList* str_collection;
505
 
                GList* str_it;
506
 
                str_collection = list;
507
 
                for (str_it = str_collection; str_it != NULL; str_it = str_it->next) {
508
 
                        gchar* _tmp17_;
509
 
                        gchar* str;
510
 
                        _tmp17_ = g_strdup ((const gchar*) str_it->data);
511
 
                        str = _tmp17_;
512
 
                        {
513
 
                                if (first) {
514
 
                                        first = FALSE;
515
 
                                } else {
516
 
                                        g_string_append (ret, ",");
517
 
                                }
518
 
                                g_string_append (ret, str);
519
 
                                _g_free0 (str);
520
 
                        }
521
 
                }
522
 
        }
523
 
        _tmp18_ = g_strdup (ret->str);
524
 
        result = _tmp18_;
525
 
        _g_string_free0 (ret);
526
 
        __g_list_free__g_free0_0 (list);
527
 
        return result;
528
 
}
529
 
 
530
 
 
531
 
static gpointer _vala_iterable_ref0 (gpointer self) {
532
 
        return self ? vala_iterable_ref (self) : NULL;
533
 
}
534
 
 
535
 
 
536
 
static gchar* ctags_visitor_signature (ValaList* parameter) {
537
 
        gchar* result = NULL;
538
 
        GString* _tmp0_ = NULL;
539
 
        GString* ret;
540
 
        gboolean first;
541
 
        gchar* _tmp9_;
542
 
        g_return_val_if_fail (parameter != NULL, NULL);
543
 
        _tmp0_ = g_string_new ("(");
544
 
        ret = _tmp0_;
545
 
        first = TRUE;
546
 
        {
547
 
                ValaList* _tmp1_;
548
 
                ValaList* _p_list;
549
 
                gint _tmp2_;
550
 
                gint _p_size;
551
 
                gint _p_index;
552
 
                _tmp1_ = _vala_iterable_ref0 (parameter);
553
 
                _p_list = _tmp1_;
554
 
                _tmp2_ = vala_collection_get_size ((ValaCollection*) _p_list);
555
 
                _p_size = _tmp2_;
556
 
                _p_index = -1;
557
 
                while (TRUE) {
558
 
                        gpointer _tmp3_ = NULL;
559
 
                        ValaParameter* p;
560
 
                        gboolean _tmp4_;
561
 
                        _p_index = _p_index + 1;
562
 
                        if (!(_p_index < _p_size)) {
563
 
                                break;
564
 
                        }
565
 
                        _tmp3_ = vala_list_get (_p_list, _p_index);
566
 
                        p = (ValaParameter*) _tmp3_;
567
 
                        if (first) {
568
 
                                first = FALSE;
569
 
                        } else {
570
 
                                g_string_append (ret, ",");
571
 
                        }
572
 
                        _tmp4_ = vala_parameter_get_ellipsis (p);
573
 
                        if (_tmp4_) {
574
 
                                g_string_append (ret, "...");
575
 
                        } else {
576
 
                                ValaDataType* _tmp5_ = NULL;
577
 
                                gchar* _tmp6_ = NULL;
578
 
                                gchar* _tmp7_;
579
 
                                const gchar* _tmp8_ = NULL;
580
 
                                _tmp5_ = vala_variable_get_variable_type ((ValaVariable*) p);
581
 
                                _tmp6_ = vala_data_type_to_qualified_string (_tmp5_, NULL);
582
 
                                _tmp7_ = _tmp6_;
583
 
                                g_string_append (ret, _tmp7_);
584
 
                                _g_free0 (_tmp7_);
585
 
                                g_string_append (ret, " ");
586
 
                                _tmp8_ = vala_symbol_get_name ((ValaSymbol*) p);
587
 
                                g_string_append (ret, _tmp8_);
588
 
                        }
589
 
                        _vala_code_node_unref0 (p);
590
 
                }
591
 
                _vala_iterable_unref0 (_p_list);
592
 
        }
593
 
        g_string_append (ret, ")");
594
 
        _tmp9_ = g_strdup (ret->str);
595
 
        result = _tmp9_;
596
 
        _g_string_free0 (ret);
597
 
        return result;
598
 
}
599
 
 
600
 
 
601
 
static void ctags_visitor_scope (ValaSymbol* s, gchar** scope, int scope_length1) {
602
 
        ValaSymbol* _tmp0_ = NULL;
603
 
        ValaSymbol* _tmp1_;
604
 
        ValaSymbol* par;
605
 
        gboolean _tmp2_ = FALSE;
606
 
        g_return_if_fail (s != NULL);
607
 
        _tmp0_ = vala_symbol_get_parent_symbol (s);
608
 
        _tmp1_ = _vala_code_node_ref0 (_tmp0_);
609
 
        par = _tmp1_;
610
 
        if (par != NULL) {
611
 
                const gchar* _tmp3_ = NULL;
612
 
                _tmp3_ = vala_symbol_get_name (par);
613
 
                _tmp2_ = _tmp3_ != NULL;
614
 
        } else {
615
 
                _tmp2_ = FALSE;
616
 
        }
617
 
        if (_tmp2_) {
618
 
                const gchar* _tmp10_ = NULL;
619
 
                gchar* _tmp11_;
620
 
                gchar* _tmp12_;
621
 
                if (VALA_IS_CLASS (par)) {
622
 
                        gchar* _tmp4_;
623
 
                        gchar* _tmp5_;
624
 
                        _tmp4_ = g_strdup ("class");
625
 
                        _tmp5_ = _tmp4_;
626
 
                        _g_free0 (scope[0]);
627
 
                        scope[0] = _tmp5_;
628
 
                } else {
629
 
                        if (VALA_IS_STRUCT (par)) {
630
 
                                gchar* _tmp6_;
631
 
                                gchar* _tmp7_;
632
 
                                _tmp6_ = g_strdup ("struct");
633
 
                                _tmp7_ = _tmp6_;
634
 
                                _g_free0 (scope[0]);
635
 
                                scope[0] = _tmp7_;
636
 
                        } else {
637
 
                                if (VALA_IS_INTERFACE (par)) {
638
 
                                        gchar* _tmp8_;
639
 
                                        gchar* _tmp9_;
640
 
                                        _tmp8_ = g_strdup ("interface");
641
 
                                        _tmp9_ = _tmp8_;
642
 
                                        _g_free0 (scope[0]);
643
 
                                        scope[0] = _tmp9_;
644
 
                                } else {
645
 
                                        _vala_code_node_unref0 (par);
646
 
                                        return;
647
 
                                }
648
 
                        }
649
 
                }
650
 
                _tmp10_ = vala_symbol_get_name (par);
651
 
                _tmp11_ = g_strdup (_tmp10_);
652
 
                _tmp12_ = _tmp11_;
653
 
                _g_free0 (scope[1]);
654
 
                scope[1] = _tmp12_;
655
 
        }
656
 
        _vala_code_node_unref0 (par);
657
 
}
658
 
 
659
 
 
660
 
static void ctags_visitor_real_visit_source_file (ValaCodeVisitor* base, ValaSourceFile* source_file) {
661
 
        CTagsVisitor * self;
662
 
        self = (CTagsVisitor*) base;
663
 
        g_return_if_fail (source_file != NULL);
664
 
        vala_source_file_accept_children (source_file, (ValaCodeVisitor*) self);
665
 
}
666
 
 
667
 
 
668
 
static gpointer _ctags_entry_dup0 (gpointer self) {
669
 
        return self ? ctags_entry_dup (self) : NULL;
670
 
}
671
 
 
672
 
 
673
 
static void ctags_visitor_real_visit_class (ValaCodeVisitor* base, ValaClass* cl) {
674
 
        CTagsVisitor * self;
675
 
        CTagsEntry entry = {0};
676
 
        ValaSourceReference* _tmp0_ = NULL;
677
 
        gint _tmp1_;
678
 
        const gchar* _tmp2_ = NULL;
679
 
        gchar* _tmp3_;
680
 
        gchar* _tmp4_;
681
 
        gchar* _tmp5_;
682
 
        gchar* _tmp6_;
683
 
        gchar* _tmp7_ = NULL;
684
 
        gchar* _tmp8_;
685
 
        gchar* _tmp9_ = NULL;
686
 
        gchar* _tmp10_;
687
 
        ValaList* _tmp11_ = NULL;
688
 
        ValaList* _tmp12_;
689
 
        gchar* _tmp13_ = NULL;
690
 
        gchar* _tmp14_;
691
 
        CTagsEntry* _tmp15_;
692
 
        self = (CTagsVisitor*) base;
693
 
        g_return_if_fail (cl != NULL);
694
 
        memset (&entry, 0, sizeof (CTagsEntry));
695
 
        _tmp0_ = vala_code_node_get_source_reference ((ValaCodeNode*) cl);
696
 
        _tmp1_ = vala_source_reference_get_first_line (_tmp0_);
697
 
        entry.line_number = _tmp1_;
698
 
        _tmp2_ = vala_symbol_get_name ((ValaSymbol*) cl);
699
 
        _tmp3_ = g_strdup (_tmp2_);
700
 
        _tmp4_ = _tmp3_;
701
 
        _g_free0 (entry.name);
702
 
        entry.name = _tmp4_;
703
 
        _tmp5_ = g_strdup ("class");
704
 
        _tmp6_ = _tmp5_;
705
 
        _g_free0 (entry.kind_name);
706
 
        entry.kind_name = _tmp6_;
707
 
        entry.kind = 'c';
708
 
        _tmp7_ = ctags_visitor_get_access ((ValaSymbol*) cl);
709
 
        _tmp8_ = _tmp7_;
710
 
        _g_free0 (entry.access);
711
 
        entry.access = _tmp8_;
712
 
        _tmp9_ = ctags_visitor_implementation ((ValaSymbol*) cl);
713
 
        _tmp10_ = _tmp9_;
714
 
        _g_free0 (entry.implementation);
715
 
        entry.implementation = _tmp10_;
716
 
        _tmp11_ = vala_class_get_base_types (cl);
717
 
        _tmp12_ = _tmp11_;
718
 
        _tmp13_ = ctags_visitor_to_string ((ValaIterable*) _tmp12_, ",");
719
 
        _tmp14_ = _tmp13_;
720
 
        _g_free0 (entry.inheritance);
721
 
        entry.inheritance = _tmp14_;
722
 
        _vala_iterable_unref0 (_tmp12_);
723
 
        ctags_visitor_scope ((ValaSymbol*) cl, entry.scope, 2);
724
 
        _tmp15_ = _ctags_entry_dup0 (&entry);
725
 
        self->priv->taglist = g_list_append (self->priv->taglist, _tmp15_);
726
 
        vala_code_node_accept_children ((ValaCodeNode*) cl, (ValaCodeVisitor*) self);
727
 
        ctags_entry_destroy (&entry);
728
 
}
729
 
 
730
 
 
731
 
static void ctags_visitor_real_visit_struct (ValaCodeVisitor* base, ValaStruct* st) {
732
 
        CTagsVisitor * self;
733
 
        CTagsEntry entry = {0};
734
 
        ValaSourceReference* _tmp0_ = NULL;
735
 
        gint _tmp1_;
736
 
        const gchar* _tmp2_ = NULL;
737
 
        gchar* _tmp3_;
738
 
        gchar* _tmp4_;
739
 
        gchar* _tmp5_;
740
 
        gchar* _tmp6_;
741
 
        gchar* _tmp7_ = NULL;
742
 
        gchar* _tmp8_;
743
 
        CTagsEntry* _tmp9_;
744
 
        self = (CTagsVisitor*) base;
745
 
        g_return_if_fail (st != NULL);
746
 
        memset (&entry, 0, sizeof (CTagsEntry));
747
 
        _tmp0_ = vala_code_node_get_source_reference ((ValaCodeNode*) st);
748
 
        _tmp1_ = vala_source_reference_get_first_line (_tmp0_);
749
 
        entry.line_number = _tmp1_;
750
 
        _tmp2_ = vala_symbol_get_name ((ValaSymbol*) st);
751
 
        _tmp3_ = g_strdup (_tmp2_);
752
 
        _tmp4_ = _tmp3_;
753
 
        _g_free0 (entry.name);
754
 
        entry.name = _tmp4_;
755
 
        _tmp5_ = g_strdup ("struct");
756
 
        _tmp6_ = _tmp5_;
757
 
        _g_free0 (entry.kind_name);
758
 
        entry.kind_name = _tmp6_;
759
 
        entry.kind = 's';
760
 
        _tmp7_ = ctags_visitor_get_access ((ValaSymbol*) st);
761
 
        _tmp8_ = _tmp7_;
762
 
        _g_free0 (entry.access);
763
 
        entry.access = _tmp8_;
764
 
        ctags_visitor_scope ((ValaSymbol*) st, entry.scope, 2);
765
 
        _tmp9_ = _ctags_entry_dup0 (&entry);
766
 
        self->priv->taglist = g_list_append (self->priv->taglist, _tmp9_);
767
 
        vala_code_node_accept_children ((ValaCodeNode*) st, (ValaCodeVisitor*) self);
768
 
        ctags_entry_destroy (&entry);
769
 
}
770
 
 
771
 
 
772
 
static void ctags_visitor_real_visit_interface (ValaCodeVisitor* base, ValaInterface* iface) {
773
 
        CTagsVisitor * self;
774
 
        CTagsEntry entry = {0};
775
 
        ValaSourceReference* _tmp0_ = NULL;
776
 
        gint _tmp1_;
777
 
        const gchar* _tmp2_ = NULL;
778
 
        gchar* _tmp3_;
779
 
        gchar* _tmp4_;
780
 
        gchar* _tmp5_;
781
 
        gchar* _tmp6_;
782
 
        gchar* _tmp7_ = NULL;
783
 
        gchar* _tmp8_;
784
 
        ValaList* _tmp9_ = NULL;
785
 
        ValaList* _tmp10_;
786
 
        gchar* _tmp11_ = NULL;
787
 
        gchar* _tmp12_;
788
 
        CTagsEntry* _tmp13_;
789
 
        self = (CTagsVisitor*) base;
790
 
        g_return_if_fail (iface != NULL);
791
 
        memset (&entry, 0, sizeof (CTagsEntry));
792
 
        _tmp0_ = vala_code_node_get_source_reference ((ValaCodeNode*) iface);
793
 
        _tmp1_ = vala_source_reference_get_first_line (_tmp0_);
794
 
        entry.line_number = _tmp1_;
795
 
        _tmp2_ = vala_symbol_get_name ((ValaSymbol*) iface);
796
 
        _tmp3_ = g_strdup (_tmp2_);
797
 
        _tmp4_ = _tmp3_;
798
 
        _g_free0 (entry.name);
799
 
        entry.name = _tmp4_;
800
 
        _tmp5_ = g_strdup ("interface");
801
 
        _tmp6_ = _tmp5_;
802
 
        _g_free0 (entry.kind_name);
803
 
        entry.kind_name = _tmp6_;
804
 
        entry.kind = 'i';
805
 
        _tmp7_ = ctags_visitor_get_access ((ValaSymbol*) iface);
806
 
        _tmp8_ = _tmp7_;
807
 
        _g_free0 (entry.access);
808
 
        entry.access = _tmp8_;
809
 
        _tmp9_ = vala_interface_get_prerequisites (iface);
810
 
        _tmp10_ = _tmp9_;
811
 
        _tmp11_ = ctags_visitor_to_string ((ValaIterable*) _tmp10_, ",");
812
 
        _tmp12_ = _tmp11_;
813
 
        _g_free0 (entry.inheritance);
814
 
        entry.inheritance = _tmp12_;
815
 
        _vala_iterable_unref0 (_tmp10_);
816
 
        ctags_visitor_scope ((ValaSymbol*) iface, entry.scope, 2);
817
 
        _tmp13_ = _ctags_entry_dup0 (&entry);
818
 
        self->priv->taglist = g_list_append (self->priv->taglist, _tmp13_);
819
 
        vala_code_node_accept_children ((ValaCodeNode*) iface, (ValaCodeVisitor*) self);
820
 
        ctags_entry_destroy (&entry);
821
 
}
822
 
 
823
 
 
824
 
static void ctags_visitor_real_visit_enum (ValaCodeVisitor* base, ValaEnum* en) {
825
 
        CTagsVisitor * self;
826
 
        CTagsEntry entry = {0};
827
 
        ValaSourceReference* _tmp0_ = NULL;
828
 
        gint _tmp1_;
829
 
        const gchar* _tmp2_ = NULL;
830
 
        gchar* _tmp3_;
831
 
        gchar* _tmp4_;
832
 
        gchar* _tmp5_;
833
 
        gchar* _tmp6_;
834
 
        gchar* _tmp7_ = NULL;
835
 
        gchar* _tmp8_;
836
 
        CTagsEntry* _tmp9_;
837
 
        self = (CTagsVisitor*) base;
838
 
        g_return_if_fail (en != NULL);
839
 
        memset (&entry, 0, sizeof (CTagsEntry));
840
 
        _tmp0_ = vala_code_node_get_source_reference ((ValaCodeNode*) en);
841
 
        _tmp1_ = vala_source_reference_get_first_line (_tmp0_);
842
 
        entry.line_number = _tmp1_;
843
 
        _tmp2_ = vala_symbol_get_name ((ValaSymbol*) en);
844
 
        _tmp3_ = g_strdup (_tmp2_);
845
 
        _tmp4_ = _tmp3_;
846
 
        _g_free0 (entry.name);
847
 
        entry.name = _tmp4_;
848
 
        _tmp5_ = g_strdup ("enum");
849
 
        _tmp6_ = _tmp5_;
850
 
        _g_free0 (entry.kind_name);
851
 
        entry.kind_name = _tmp6_;
852
 
        entry.kind = 'e';
853
 
        _tmp7_ = ctags_visitor_get_access ((ValaSymbol*) en);
854
 
        _tmp8_ = _tmp7_;
855
 
        _g_free0 (entry.access);
856
 
        entry.access = _tmp8_;
857
 
        ctags_visitor_scope ((ValaSymbol*) en, entry.scope, 2);
858
 
        _tmp9_ = _ctags_entry_dup0 (&entry);
859
 
        self->priv->taglist = g_list_append (self->priv->taglist, _tmp9_);
860
 
        vala_code_node_accept_children ((ValaCodeNode*) en, (ValaCodeVisitor*) self);
861
 
        ctags_entry_destroy (&entry);
862
 
}
863
 
 
864
 
 
865
 
static void ctags_visitor_real_visit_error_domain (ValaCodeVisitor* base, ValaErrorDomain* edomain) {
866
 
        CTagsVisitor * self;
867
 
        CTagsEntry entry = {0};
868
 
        ValaSourceReference* _tmp0_ = NULL;
869
 
        gint _tmp1_;
870
 
        const gchar* _tmp2_ = NULL;
871
 
        gchar* _tmp3_;
872
 
        gchar* _tmp4_;
873
 
        gchar* _tmp5_;
874
 
        gchar* _tmp6_;
875
 
        gchar* _tmp7_ = NULL;
876
 
        gchar* _tmp8_;
877
 
        CTagsEntry* _tmp9_;
878
 
        self = (CTagsVisitor*) base;
879
 
        g_return_if_fail (edomain != NULL);
880
 
        memset (&entry, 0, sizeof (CTagsEntry));
881
 
        _tmp0_ = vala_code_node_get_source_reference ((ValaCodeNode*) edomain);
882
 
        _tmp1_ = vala_source_reference_get_first_line (_tmp0_);
883
 
        entry.line_number = _tmp1_;
884
 
        _tmp2_ = vala_symbol_get_name ((ValaSymbol*) edomain);
885
 
        _tmp3_ = g_strdup (_tmp2_);
886
 
        _tmp4_ = _tmp3_;
887
 
        _g_free0 (entry.name);
888
 
        entry.name = _tmp4_;
889
 
        _tmp5_ = g_strdup ("errordomain");
890
 
        _tmp6_ = _tmp5_;
891
 
        _g_free0 (entry.kind_name);
892
 
        entry.kind_name = _tmp6_;
893
 
        entry.kind = 'E';
894
 
        _tmp7_ = ctags_visitor_get_access ((ValaSymbol*) edomain);
895
 
        _tmp8_ = _tmp7_;
896
 
        _g_free0 (entry.access);
897
 
        entry.access = _tmp8_;
898
 
        ctags_visitor_scope ((ValaSymbol*) edomain, entry.scope, 2);
899
 
        _tmp9_ = _ctags_entry_dup0 (&entry);
900
 
        self->priv->taglist = g_list_append (self->priv->taglist, _tmp9_);
901
 
        vala_code_node_accept_children ((ValaCodeNode*) edomain, (ValaCodeVisitor*) self);
902
 
        ctags_entry_destroy (&entry);
903
 
}
904
 
 
905
 
 
906
 
static void ctags_visitor_real_visit_enum_value (ValaCodeVisitor* base, ValaEnumValue* ev) {
907
 
        CTagsVisitor * self;
908
 
        CTagsEntry entry = {0};
909
 
        ValaSourceReference* _tmp0_ = NULL;
910
 
        gint _tmp1_;
911
 
        const gchar* _tmp2_ = NULL;
912
 
        gchar* _tmp3_;
913
 
        gchar* _tmp4_;
914
 
        gchar* _tmp5_;
915
 
        gchar* _tmp6_;
916
 
        gchar* _tmp7_ = NULL;
917
 
        gchar* _tmp8_;
918
 
        CTagsEntry* _tmp9_;
919
 
        self = (CTagsVisitor*) base;
920
 
        g_return_if_fail (ev != NULL);
921
 
        memset (&entry, 0, sizeof (CTagsEntry));
922
 
        _tmp0_ = vala_code_node_get_source_reference ((ValaCodeNode*) ev);
923
 
        _tmp1_ = vala_source_reference_get_first_line (_tmp0_);
924
 
        entry.line_number = _tmp1_;
925
 
        _tmp2_ = vala_symbol_get_name ((ValaSymbol*) ev);
926
 
        _tmp3_ = g_strdup (_tmp2_);
927
 
        _tmp4_ = _tmp3_;
928
 
        _g_free0 (entry.name);
929
 
        entry.name = _tmp4_;
930
 
        _tmp5_ = g_strdup ("enumvalue");
931
 
        _tmp6_ = _tmp5_;
932
 
        _g_free0 (entry.kind_name);
933
 
        entry.kind_name = _tmp6_;
934
 
        entry.kind = 'v';
935
 
        _tmp7_ = ctags_visitor_get_access ((ValaSymbol*) ev);
936
 
        _tmp8_ = _tmp7_;
937
 
        _g_free0 (entry.access);
938
 
        entry.access = _tmp8_;
939
 
        ctags_visitor_scope ((ValaSymbol*) ev, entry.scope, 2);
940
 
        _tmp9_ = _ctags_entry_dup0 (&entry);
941
 
        self->priv->taglist = g_list_append (self->priv->taglist, _tmp9_);
942
 
        ctags_entry_destroy (&entry);
943
 
}
944
 
 
945
 
 
946
 
static void ctags_visitor_real_visit_error_code (ValaCodeVisitor* base, ValaErrorCode* ecode) {
947
 
        CTagsVisitor * self;
948
 
        CTagsEntry entry = {0};
949
 
        const gchar* _tmp0_ = NULL;
950
 
        gchar* _tmp1_;
951
 
        gchar* _tmp2_;
952
 
        gchar* _tmp3_;
953
 
        gchar* _tmp4_;
954
 
        gchar* _tmp5_ = NULL;
955
 
        gchar* _tmp6_;
956
 
        CTagsEntry* _tmp7_;
957
 
        self = (CTagsVisitor*) base;
958
 
        g_return_if_fail (ecode != NULL);
959
 
        memset (&entry, 0, sizeof (CTagsEntry));
960
 
        _tmp0_ = vala_symbol_get_name ((ValaSymbol*) ecode);
961
 
        _tmp1_ = g_strdup (_tmp0_);
962
 
        _tmp2_ = _tmp1_;
963
 
        _g_free0 (entry.name);
964
 
        entry.name = _tmp2_;
965
 
        _tmp3_ = g_strdup ("errorcode");
966
 
        _tmp4_ = _tmp3_;
967
 
        _g_free0 (entry.kind_name);
968
 
        entry.kind_name = _tmp4_;
969
 
        entry.kind = 'r';
970
 
        _tmp5_ = ctags_visitor_get_access ((ValaSymbol*) ecode);
971
 
        _tmp6_ = _tmp5_;
972
 
        _g_free0 (entry.access);
973
 
        entry.access = _tmp6_;
974
 
        ctags_visitor_scope ((ValaSymbol*) ecode, entry.scope, 2);
975
 
        _tmp7_ = _ctags_entry_dup0 (&entry);
976
 
        self->priv->taglist = g_list_append (self->priv->taglist, _tmp7_);
977
 
        ctags_entry_destroy (&entry);
978
 
}
979
 
 
980
 
 
981
 
static void ctags_visitor_real_visit_delegate (ValaCodeVisitor* base, ValaDelegate* d) {
982
 
        CTagsVisitor * self;
983
 
        CTagsEntry entry = {0};
984
 
        ValaSourceReference* _tmp0_ = NULL;
985
 
        gint _tmp1_;
986
 
        const gchar* _tmp2_ = NULL;
987
 
        gchar* _tmp3_;
988
 
        gchar* _tmp4_;
989
 
        gchar* _tmp5_;
990
 
        gchar* _tmp6_;
991
 
        gchar* _tmp7_ = NULL;
992
 
        gchar* _tmp8_;
993
 
        ValaDataType* _tmp9_ = NULL;
994
 
        gchar* _tmp10_ = NULL;
995
 
        gchar* _tmp11_;
996
 
        ValaList* _tmp12_ = NULL;
997
 
        ValaList* _tmp13_;
998
 
        gchar* _tmp14_ = NULL;
999
 
        gchar* _tmp15_;
1000
 
        CTagsEntry* _tmp16_;
1001
 
        self = (CTagsVisitor*) base;
1002
 
        g_return_if_fail (d != NULL);
1003
 
        memset (&entry, 0, sizeof (CTagsEntry));
1004
 
        _tmp0_ = vala_code_node_get_source_reference ((ValaCodeNode*) d);
1005
 
        _tmp1_ = vala_source_reference_get_first_line (_tmp0_);
1006
 
        entry.line_number = _tmp1_;
1007
 
        _tmp2_ = vala_symbol_get_name ((ValaSymbol*) d);
1008
 
        _tmp3_ = g_strdup (_tmp2_);
1009
 
        _tmp4_ = _tmp3_;
1010
 
        _g_free0 (entry.name);
1011
 
        entry.name = _tmp4_;
1012
 
        _tmp5_ = g_strdup ("delegate");
1013
 
        _tmp6_ = _tmp5_;
1014
 
        _g_free0 (entry.kind_name);
1015
 
        entry.kind_name = _tmp6_;
1016
 
        entry.kind = 'd';
1017
 
        _tmp7_ = ctags_visitor_get_access ((ValaSymbol*) d);
1018
 
        _tmp8_ = _tmp7_;
1019
 
        _g_free0 (entry.access);
1020
 
        entry.access = _tmp8_;
1021
 
        ctags_visitor_scope ((ValaSymbol*) d, entry.scope, 2);
1022
 
        _tmp9_ = vala_delegate_get_return_type (d);
1023
 
        _tmp10_ = vala_data_type_to_qualified_string (_tmp9_, NULL);
1024
 
        _tmp11_ = _tmp10_;
1025
 
        _g_free0 (entry.returntype);
1026
 
        entry.returntype = _tmp11_;
1027
 
        _tmp12_ = vala_delegate_get_parameters (d);
1028
 
        _tmp13_ = _tmp12_;
1029
 
        _tmp14_ = ctags_visitor_signature (_tmp13_);
1030
 
        _tmp15_ = _tmp14_;
1031
 
        _g_free0 (entry.signature);
1032
 
        entry.signature = _tmp15_;
1033
 
        _vala_iterable_unref0 (_tmp13_);
1034
 
        _tmp16_ = _ctags_entry_dup0 (&entry);
1035
 
        self->priv->taglist = g_list_append (self->priv->taglist, _tmp16_);
1036
 
        ctags_entry_destroy (&entry);
1037
 
}
1038
 
 
1039
 
 
1040
 
static void ctags_visitor_real_visit_signal (ValaCodeVisitor* base, ValaSignal* sig) {
1041
 
        CTagsVisitor * self;
1042
 
        CTagsEntry entry = {0};
1043
 
        ValaSourceReference* _tmp0_ = NULL;
1044
 
        gint _tmp1_;
1045
 
        const gchar* _tmp2_ = NULL;
1046
 
        gchar* _tmp3_;
1047
 
        gchar* _tmp4_;
1048
 
        gchar* _tmp5_;
1049
 
        gchar* _tmp6_;
1050
 
        gchar* _tmp7_ = NULL;
1051
 
        gchar* _tmp8_;
1052
 
        gchar* _tmp9_ = NULL;
1053
 
        gchar* _tmp10_;
1054
 
        ValaDataType* _tmp11_ = NULL;
1055
 
        gchar* _tmp12_ = NULL;
1056
 
        gchar* _tmp13_;
1057
 
        ValaList* _tmp14_ = NULL;
1058
 
        ValaList* _tmp15_;
1059
 
        gchar* _tmp16_ = NULL;
1060
 
        gchar* _tmp17_;
1061
 
        CTagsEntry* _tmp18_;
1062
 
        self = (CTagsVisitor*) base;
1063
 
        g_return_if_fail (sig != NULL);
1064
 
        memset (&entry, 0, sizeof (CTagsEntry));
1065
 
        _tmp0_ = vala_code_node_get_source_reference ((ValaCodeNode*) sig);
1066
 
        _tmp1_ = vala_source_reference_get_first_line (_tmp0_);
1067
 
        entry.line_number = _tmp1_;
1068
 
        _tmp2_ = vala_symbol_get_name ((ValaSymbol*) sig);
1069
 
        _tmp3_ = g_strdup (_tmp2_);
1070
 
        _tmp4_ = _tmp3_;
1071
 
        _g_free0 (entry.name);
1072
 
        entry.name = _tmp4_;
1073
 
        _tmp5_ = g_strdup ("signal");
1074
 
        _tmp6_ = _tmp5_;
1075
 
        _g_free0 (entry.kind_name);
1076
 
        entry.kind_name = _tmp6_;
1077
 
        entry.kind = 'S';
1078
 
        _tmp7_ = ctags_visitor_get_access ((ValaSymbol*) sig);
1079
 
        _tmp8_ = _tmp7_;
1080
 
        _g_free0 (entry.access);
1081
 
        entry.access = _tmp8_;
1082
 
        _tmp9_ = ctags_visitor_implementation ((ValaSymbol*) sig);
1083
 
        _tmp10_ = _tmp9_;
1084
 
        _g_free0 (entry.implementation);
1085
 
        entry.implementation = _tmp10_;
1086
 
        ctags_visitor_scope ((ValaSymbol*) sig, entry.scope, 2);
1087
 
        _tmp11_ = vala_signal_get_return_type (sig);
1088
 
        _tmp12_ = vala_data_type_to_qualified_string (_tmp11_, NULL);
1089
 
        _tmp13_ = _tmp12_;
1090
 
        _g_free0 (entry.returntype);
1091
 
        entry.returntype = _tmp13_;
1092
 
        _tmp14_ = vala_signal_get_parameters (sig);
1093
 
        _tmp15_ = _tmp14_;
1094
 
        _tmp16_ = ctags_visitor_signature (_tmp15_);
1095
 
        _tmp17_ = _tmp16_;
1096
 
        _g_free0 (entry.signature);
1097
 
        entry.signature = _tmp17_;
1098
 
        _vala_iterable_unref0 (_tmp15_);
1099
 
        _tmp18_ = _ctags_entry_dup0 (&entry);
1100
 
        self->priv->taglist = g_list_append (self->priv->taglist, _tmp18_);
1101
 
        ctags_entry_destroy (&entry);
1102
 
}
1103
 
 
1104
 
 
1105
 
static void ctags_visitor_real_visit_field (ValaCodeVisitor* base, ValaField* f) {
1106
 
        CTagsVisitor * self;
1107
 
        CTagsEntry entry = {0};
1108
 
        ValaSourceReference* _tmp0_ = NULL;
1109
 
        gint _tmp1_;
1110
 
        const gchar* _tmp2_ = NULL;
1111
 
        gchar* _tmp3_;
1112
 
        gchar* _tmp4_;
1113
 
        gchar* _tmp5_;
1114
 
        gchar* _tmp6_;
1115
 
        gchar* _tmp7_ = NULL;
1116
 
        gchar* _tmp8_;
1117
 
        ValaDataType* _tmp9_ = NULL;
1118
 
        gchar* _tmp10_ = NULL;
1119
 
        gchar* _tmp11_;
1120
 
        CTagsEntry* _tmp12_;
1121
 
        self = (CTagsVisitor*) base;
1122
 
        g_return_if_fail (f != NULL);
1123
 
        memset (&entry, 0, sizeof (CTagsEntry));
1124
 
        _tmp0_ = vala_code_node_get_source_reference ((ValaCodeNode*) f);
1125
 
        _tmp1_ = vala_source_reference_get_first_line (_tmp0_);
1126
 
        entry.line_number = _tmp1_;
1127
 
        _tmp2_ = vala_symbol_get_name ((ValaSymbol*) f);
1128
 
        _tmp3_ = g_strdup (_tmp2_);
1129
 
        _tmp4_ = _tmp3_;
1130
 
        _g_free0 (entry.name);
1131
 
        entry.name = _tmp4_;
1132
 
        _tmp5_ = g_strdup ("field");
1133
 
        _tmp6_ = _tmp5_;
1134
 
        _g_free0 (entry.kind_name);
1135
 
        entry.kind_name = _tmp6_;
1136
 
        entry.kind = 'f';
1137
 
        _tmp7_ = ctags_visitor_get_access ((ValaSymbol*) f);
1138
 
        _tmp8_ = _tmp7_;
1139
 
        _g_free0 (entry.access);
1140
 
        entry.access = _tmp8_;
1141
 
        ctags_visitor_scope ((ValaSymbol*) f, entry.scope, 2);
1142
 
        _tmp9_ = vala_variable_get_variable_type ((ValaVariable*) f);
1143
 
        _tmp10_ = vala_data_type_to_qualified_string (_tmp9_, NULL);
1144
 
        _tmp11_ = _tmp10_;
1145
 
        _g_free0 (entry.typeref);
1146
 
        entry.typeref = _tmp11_;
1147
 
        _tmp12_ = _ctags_entry_dup0 (&entry);
1148
 
        self->priv->taglist = g_list_append (self->priv->taglist, _tmp12_);
1149
 
        ctags_entry_destroy (&entry);
1150
 
}
1151
 
 
1152
 
 
1153
 
static void ctags_visitor_real_visit_constant (ValaCodeVisitor* base, ValaConstant* c) {
1154
 
        CTagsVisitor * self;
1155
 
        CTagsEntry entry = {0};
1156
 
        ValaSourceReference* _tmp0_ = NULL;
1157
 
        gint _tmp1_;
1158
 
        const gchar* _tmp2_ = NULL;
1159
 
        gchar* _tmp3_;
1160
 
        gchar* _tmp4_;
1161
 
        gchar* _tmp5_;
1162
 
        gchar* _tmp6_;
1163
 
        gchar* _tmp7_ = NULL;
1164
 
        gchar* _tmp8_;
1165
 
        ValaDataType* _tmp9_ = NULL;
1166
 
        gchar* _tmp10_ = NULL;
1167
 
        gchar* _tmp11_;
1168
 
        CTagsEntry* _tmp12_;
1169
 
        self = (CTagsVisitor*) base;
1170
 
        g_return_if_fail (c != NULL);
1171
 
        memset (&entry, 0, sizeof (CTagsEntry));
1172
 
        _tmp0_ = vala_code_node_get_source_reference ((ValaCodeNode*) c);
1173
 
        _tmp1_ = vala_source_reference_get_first_line (_tmp0_);
1174
 
        entry.line_number = _tmp1_;
1175
 
        _tmp2_ = vala_symbol_get_name ((ValaSymbol*) c);
1176
 
        _tmp3_ = g_strdup (_tmp2_);
1177
 
        _tmp4_ = _tmp3_;
1178
 
        _g_free0 (entry.name);
1179
 
        entry.name = _tmp4_;
1180
 
        _tmp5_ = g_strdup ("field");
1181
 
        _tmp6_ = _tmp5_;
1182
 
        _g_free0 (entry.kind_name);
1183
 
        entry.kind_name = _tmp6_;
1184
 
        entry.kind = 'f';
1185
 
        _tmp7_ = ctags_visitor_get_access ((ValaSymbol*) c);
1186
 
        _tmp8_ = _tmp7_;
1187
 
        _g_free0 (entry.access);
1188
 
        entry.access = _tmp8_;
1189
 
        ctags_visitor_scope ((ValaSymbol*) c, entry.scope, 2);
1190
 
        _tmp9_ = vala_constant_get_type_reference (c);
1191
 
        _tmp10_ = vala_data_type_to_qualified_string (_tmp9_, NULL);
1192
 
        _tmp11_ = _tmp10_;
1193
 
        _g_free0 (entry.typeref);
1194
 
        entry.typeref = _tmp11_;
1195
 
        _tmp12_ = _ctags_entry_dup0 (&entry);
1196
 
        self->priv->taglist = g_list_append (self->priv->taglist, _tmp12_);
1197
 
        ctags_entry_destroy (&entry);
1198
 
}
1199
 
 
1200
 
 
1201
 
static void ctags_visitor_real_visit_property (ValaCodeVisitor* base, ValaProperty* prop) {
1202
 
        CTagsVisitor * self;
1203
 
        CTagsEntry entry = {0};
1204
 
        ValaSourceReference* _tmp0_ = NULL;
1205
 
        gint _tmp1_;
1206
 
        const gchar* _tmp2_ = NULL;
1207
 
        gchar* _tmp3_;
1208
 
        gchar* _tmp4_;
1209
 
        gchar* _tmp5_;
1210
 
        gchar* _tmp6_;
1211
 
        gchar* _tmp7_ = NULL;
1212
 
        gchar* _tmp8_;
1213
 
        gchar* _tmp9_ = NULL;
1214
 
        gchar* _tmp10_;
1215
 
        ValaDataType* _tmp11_ = NULL;
1216
 
        gchar* _tmp12_ = NULL;
1217
 
        gchar* _tmp13_;
1218
 
        CTagsEntry* _tmp14_;
1219
 
        self = (CTagsVisitor*) base;
1220
 
        g_return_if_fail (prop != NULL);
1221
 
        memset (&entry, 0, sizeof (CTagsEntry));
1222
 
        _tmp0_ = vala_code_node_get_source_reference ((ValaCodeNode*) prop);
1223
 
        _tmp1_ = vala_source_reference_get_first_line (_tmp0_);
1224
 
        entry.line_number = _tmp1_;
1225
 
        _tmp2_ = vala_symbol_get_name ((ValaSymbol*) prop);
1226
 
        _tmp3_ = g_strdup (_tmp2_);
1227
 
        _tmp4_ = _tmp3_;
1228
 
        _g_free0 (entry.name);
1229
 
        entry.name = _tmp4_;
1230
 
        _tmp5_ = g_strdup ("property");
1231
 
        _tmp6_ = _tmp5_;
1232
 
        _g_free0 (entry.kind_name);
1233
 
        entry.kind_name = _tmp6_;
1234
 
        entry.kind = 'p';
1235
 
        _tmp7_ = ctags_visitor_get_access ((ValaSymbol*) prop);
1236
 
        _tmp8_ = _tmp7_;
1237
 
        _g_free0 (entry.access);
1238
 
        entry.access = _tmp8_;
1239
 
        _tmp9_ = ctags_visitor_implementation ((ValaSymbol*) prop);
1240
 
        _tmp10_ = _tmp9_;
1241
 
        _g_free0 (entry.implementation);
1242
 
        entry.implementation = _tmp10_;
1243
 
        ctags_visitor_scope ((ValaSymbol*) prop, entry.scope, 2);
1244
 
        _tmp11_ = vala_property_get_property_type (prop);
1245
 
        _tmp12_ = vala_data_type_to_qualified_string (_tmp11_, NULL);
1246
 
        _tmp13_ = _tmp12_;
1247
 
        _g_free0 (entry.typeref);
1248
 
        entry.typeref = _tmp13_;
1249
 
        _tmp14_ = _ctags_entry_dup0 (&entry);
1250
 
        self->priv->taglist = g_list_append (self->priv->taglist, _tmp14_);
1251
 
        ctags_entry_destroy (&entry);
1252
 
}
1253
 
 
1254
 
 
1255
 
static void ctags_visitor_real_visit_method (ValaCodeVisitor* base, ValaMethod* m) {
1256
 
        CTagsVisitor * self;
1257
 
        CTagsEntry entry = {0};
1258
 
        ValaSourceReference* _tmp0_ = NULL;
1259
 
        gint _tmp1_;
1260
 
        const gchar* _tmp2_ = NULL;
1261
 
        gchar* _tmp3_;
1262
 
        gchar* _tmp4_;
1263
 
        gchar* _tmp5_;
1264
 
        gchar* _tmp6_;
1265
 
        gchar* _tmp7_ = NULL;
1266
 
        gchar* _tmp8_;
1267
 
        gchar* _tmp9_ = NULL;
1268
 
        gchar* _tmp10_;
1269
 
        ValaDataType* _tmp11_ = NULL;
1270
 
        gchar* _tmp12_ = NULL;
1271
 
        gchar* _tmp13_;
1272
 
        ValaList* _tmp14_ = NULL;
1273
 
        ValaList* _tmp15_;
1274
 
        gchar* _tmp16_ = NULL;
1275
 
        gchar* _tmp17_;
1276
 
        CTagsEntry* _tmp18_;
1277
 
        self = (CTagsVisitor*) base;
1278
 
        g_return_if_fail (m != NULL);
1279
 
        memset (&entry, 0, sizeof (CTagsEntry));
1280
 
        _tmp0_ = vala_code_node_get_source_reference ((ValaCodeNode*) m);
1281
 
        _tmp1_ = vala_source_reference_get_first_line (_tmp0_);
1282
 
        entry.line_number = _tmp1_;
1283
 
        _tmp2_ = vala_symbol_get_name ((ValaSymbol*) m);
1284
 
        _tmp3_ = g_strdup (_tmp2_);
1285
 
        _tmp4_ = _tmp3_;
1286
 
        _g_free0 (entry.name);
1287
 
        entry.name = _tmp4_;
1288
 
        _tmp5_ = g_strdup ("method");
1289
 
        _tmp6_ = _tmp5_;
1290
 
        _g_free0 (entry.kind_name);
1291
 
        entry.kind_name = _tmp6_;
1292
 
        entry.kind = 'm';
1293
 
        _tmp7_ = ctags_visitor_get_access ((ValaSymbol*) m);
1294
 
        _tmp8_ = _tmp7_;
1295
 
        _g_free0 (entry.access);
1296
 
        entry.access = _tmp8_;
1297
 
        _tmp9_ = ctags_visitor_implementation ((ValaSymbol*) m);
1298
 
        _tmp10_ = _tmp9_;
1299
 
        _g_free0 (entry.implementation);
1300
 
        entry.implementation = _tmp10_;
1301
 
        ctags_visitor_scope ((ValaSymbol*) m, entry.scope, 2);
1302
 
        _tmp11_ = vala_method_get_return_type (m);
1303
 
        _tmp12_ = vala_data_type_to_qualified_string (_tmp11_, NULL);
1304
 
        _tmp13_ = _tmp12_;
1305
 
        _g_free0 (entry.returntype);
1306
 
        entry.returntype = _tmp13_;
1307
 
        _tmp14_ = vala_method_get_parameters (m);
1308
 
        _tmp15_ = _tmp14_;
1309
 
        _tmp16_ = ctags_visitor_signature (_tmp15_);
1310
 
        _tmp17_ = _tmp16_;
1311
 
        _g_free0 (entry.signature);
1312
 
        entry.signature = _tmp17_;
1313
 
        _vala_iterable_unref0 (_tmp15_);
1314
 
        _tmp18_ = _ctags_entry_dup0 (&entry);
1315
 
        self->priv->taglist = g_list_append (self->priv->taglist, _tmp18_);
1316
 
        ctags_entry_destroy (&entry);
1317
 
}
1318
 
 
1319
 
 
1320
 
static void ctags_visitor_real_visit_local_variable (ValaCodeVisitor* base, ValaLocalVariable* local) {
1321
 
        CTagsVisitor * self;
1322
 
        CTagsEntry entry = {0};
1323
 
        ValaSourceReference* _tmp0_ = NULL;
1324
 
        gint _tmp1_;
1325
 
        const gchar* _tmp2_ = NULL;
1326
 
        gchar* _tmp3_;
1327
 
        gchar* _tmp4_;
1328
 
        gchar* _tmp5_;
1329
 
        gchar* _tmp6_;
1330
 
        gchar* _tmp7_ = NULL;
1331
 
        gchar* _tmp8_;
1332
 
        CTagsEntry* _tmp9_;
1333
 
        self = (CTagsVisitor*) base;
1334
 
        g_return_if_fail (local != NULL);
1335
 
        memset (&entry, 0, sizeof (CTagsEntry));
1336
 
        _tmp0_ = vala_code_node_get_source_reference ((ValaCodeNode*) local);
1337
 
        _tmp1_ = vala_source_reference_get_first_line (_tmp0_);
1338
 
        entry.line_number = _tmp1_;
1339
 
        _tmp2_ = vala_symbol_get_name ((ValaSymbol*) local);
1340
 
        _tmp3_ = g_strdup (_tmp2_);
1341
 
        _tmp4_ = _tmp3_;
1342
 
        _g_free0 (entry.name);
1343
 
        entry.name = _tmp4_;
1344
 
        _tmp5_ = g_strdup ("local");
1345
 
        _tmp6_ = _tmp5_;
1346
 
        _g_free0 (entry.kind_name);
1347
 
        entry.kind_name = _tmp6_;
1348
 
        entry.kind = 'l';
1349
 
        _tmp7_ = ctags_visitor_get_access ((ValaSymbol*) local);
1350
 
        _tmp8_ = _tmp7_;
1351
 
        _g_free0 (entry.access);
1352
 
        entry.access = _tmp8_;
1353
 
        _tmp9_ = _ctags_entry_dup0 (&entry);
1354
 
        self->priv->taglist = g_list_append (self->priv->taglist, _tmp9_);
1355
 
        ctags_entry_destroy (&entry);
1356
 
}
1357
 
 
1358
 
 
1359
 
void ctags_visitor_parse_vala (CTagsVisitor* self, const gchar* filename, CTagsEntryMaker maker) {
1360
 
        GList* _tmp0_;
1361
 
        ValaCodeContext* _tmp1_ = NULL;
1362
 
        ValaCodeContext* context;
1363
 
        DummyReport* _tmp2_ = NULL;
1364
 
        DummyReport* _tmp3_;
1365
 
        ValaSourceFileType _tmp4_ = 0;
1366
 
        gboolean _tmp5_;
1367
 
        ValaSourceFile* _tmp6_ = NULL;
1368
 
        ValaSourceFile* source_file;
1369
 
        GList* _tmp8_;
1370
 
        g_return_if_fail (self != NULL);
1371
 
        g_return_if_fail (filename != NULL);
1372
 
        _tmp0_ = NULL;
1373
 
        __g_list_free__ctags_entry_free0_0 (self->priv->taglist);
1374
 
        self->priv->taglist = _tmp0_;
1375
 
        _tmp1_ = vala_code_context_new ();
1376
 
        context = _tmp1_;
1377
 
        _tmp2_ = dummy_report_new ();
1378
 
        _tmp3_ = _tmp2_;
1379
 
        vala_code_context_set_report (context, (ValaReport*) _tmp3_);
1380
 
        _g_object_unref0 (_tmp3_);
1381
 
        _tmp5_ = g_str_has_suffix (filename, "vapi");
1382
 
        if (_tmp5_) {
1383
 
                _tmp4_ = VALA_SOURCE_FILE_TYPE_PACKAGE;
1384
 
        } else {
1385
 
                _tmp4_ = VALA_SOURCE_FILE_TYPE_SOURCE;
1386
 
        }
1387
 
        _tmp6_ = vala_source_file_new (context, _tmp4_, filename, NULL);
1388
 
        source_file = _tmp6_;
1389
 
        vala_code_context_push (context);
1390
 
        vala_code_context_add_source_file (context, source_file);
1391
 
        vala_parser_parse (self->priv->vala_parser, context);
1392
 
        vala_code_context_accept (context, (ValaCodeVisitor*) self);
1393
 
        {
1394
 
                GList* tagentry_collection;
1395
 
                GList* tagentry_it;
1396
 
                tagentry_collection = self->priv->taglist;
1397
 
                for (tagentry_it = tagentry_collection; tagentry_it != NULL; tagentry_it = tagentry_it->next) {
1398
 
                        CTagsEntry* _tmp7_;
1399
 
                        CTagsEntry* tagentry;
1400
 
                        _tmp7_ = _ctags_entry_dup0 ((CTagsEntry*) tagentry_it->data);
1401
 
                        tagentry = _tmp7_;
1402
 
                        {
1403
 
                                maker (tagentry);
1404
 
                                _ctags_entry_free0 (tagentry);
1405
 
                        }
1406
 
                }
1407
 
        }
1408
 
        _tmp8_ = NULL;
1409
 
        __g_list_free__ctags_entry_free0_0 (self->priv->taglist);
1410
 
        self->priv->taglist = _tmp8_;
1411
 
        vala_code_context_pop ();
1412
 
        _vala_source_file_unref0 (source_file);
1413
 
        _vala_code_context_unref0 (context);
1414
 
}
1415
 
 
1416
 
 
1417
 
void ctags_visitor_parse_genie (CTagsVisitor* self, const gchar* filename, CTagsEntryMaker maker) {
1418
 
        GList* _tmp0_;
1419
 
        ValaCodeContext* _tmp1_ = NULL;
1420
 
        ValaCodeContext* context;
1421
 
        DummyReport* _tmp2_ = NULL;
1422
 
        DummyReport* _tmp3_;
1423
 
        ValaSourceFile* _tmp4_ = NULL;
1424
 
        ValaSourceFile* source_file;
1425
 
        GList* _tmp6_;
1426
 
        g_return_if_fail (self != NULL);
1427
 
        g_return_if_fail (filename != NULL);
1428
 
        _tmp0_ = NULL;
1429
 
        __g_list_free__ctags_entry_free0_0 (self->priv->taglist);
1430
 
        self->priv->taglist = _tmp0_;
1431
 
        _tmp1_ = vala_code_context_new ();
1432
 
        context = _tmp1_;
1433
 
        _tmp2_ = dummy_report_new ();
1434
 
        _tmp3_ = _tmp2_;
1435
 
        vala_code_context_set_report (context, (ValaReport*) _tmp3_);
1436
 
        _g_object_unref0 (_tmp3_);
1437
 
        _tmp4_ = vala_source_file_new (context, VALA_SOURCE_FILE_TYPE_SOURCE, filename, NULL);
1438
 
        source_file = _tmp4_;
1439
 
        vala_code_context_add_source_file (context, source_file);
1440
 
        vala_code_context_push (context);
1441
 
        vala_genie_parser_parse (self->priv->genie_parser, context);
1442
 
        vala_code_context_accept (context, (ValaCodeVisitor*) self);
1443
 
        {
1444
 
                GList* tagentry_collection;
1445
 
                GList* tagentry_it;
1446
 
                tagentry_collection = self->priv->taglist;
1447
 
                for (tagentry_it = tagentry_collection; tagentry_it != NULL; tagentry_it = tagentry_it->next) {
1448
 
                        CTagsEntry* _tmp5_;
1449
 
                        CTagsEntry* tagentry;
1450
 
                        _tmp5_ = _ctags_entry_dup0 ((CTagsEntry*) tagentry_it->data);
1451
 
                        tagentry = _tmp5_;
1452
 
                        {
1453
 
                                maker (tagentry);
1454
 
                                _ctags_entry_free0 (tagentry);
1455
 
                        }
1456
 
                }
1457
 
        }
1458
 
        _tmp6_ = NULL;
1459
 
        __g_list_free__ctags_entry_free0_0 (self->priv->taglist);
1460
 
        self->priv->taglist = _tmp6_;
1461
 
        vala_code_context_pop ();
1462
 
        _vala_source_file_unref0 (source_file);
1463
 
        _vala_code_context_unref0 (context);
1464
 
}
1465
 
 
1466
 
 
1467
 
static void ctags_visitor_class_init (CTagsVisitorClass * klass) {
1468
 
        ctags_visitor_parent_class = g_type_class_peek_parent (klass);
1469
 
        VALA_CODE_VISITOR_CLASS (klass)->finalize = ctags_visitor_finalize;
1470
 
        g_type_class_add_private (klass, sizeof (CTagsVisitorPrivate));
1471
 
        VALA_CODE_VISITOR_CLASS (klass)->visit_source_file = ctags_visitor_real_visit_source_file;
1472
 
        VALA_CODE_VISITOR_CLASS (klass)->visit_class = ctags_visitor_real_visit_class;
1473
 
        VALA_CODE_VISITOR_CLASS (klass)->visit_struct = ctags_visitor_real_visit_struct;
1474
 
        VALA_CODE_VISITOR_CLASS (klass)->visit_interface = ctags_visitor_real_visit_interface;
1475
 
        VALA_CODE_VISITOR_CLASS (klass)->visit_enum = ctags_visitor_real_visit_enum;
1476
 
        VALA_CODE_VISITOR_CLASS (klass)->visit_error_domain = ctags_visitor_real_visit_error_domain;
1477
 
        VALA_CODE_VISITOR_CLASS (klass)->visit_enum_value = ctags_visitor_real_visit_enum_value;
1478
 
        VALA_CODE_VISITOR_CLASS (klass)->visit_error_code = ctags_visitor_real_visit_error_code;
1479
 
        VALA_CODE_VISITOR_CLASS (klass)->visit_delegate = ctags_visitor_real_visit_delegate;
1480
 
        VALA_CODE_VISITOR_CLASS (klass)->visit_signal = ctags_visitor_real_visit_signal;
1481
 
        VALA_CODE_VISITOR_CLASS (klass)->visit_field = ctags_visitor_real_visit_field;
1482
 
        VALA_CODE_VISITOR_CLASS (klass)->visit_constant = ctags_visitor_real_visit_constant;
1483
 
        VALA_CODE_VISITOR_CLASS (klass)->visit_property = ctags_visitor_real_visit_property;
1484
 
        VALA_CODE_VISITOR_CLASS (klass)->visit_method = ctags_visitor_real_visit_method;
1485
 
        VALA_CODE_VISITOR_CLASS (klass)->visit_local_variable = ctags_visitor_real_visit_local_variable;
1486
 
}
1487
 
 
1488
 
 
1489
 
static void ctags_visitor_instance_init (CTagsVisitor * self) {
1490
 
        self->priv = CTAGS_VISITOR_GET_PRIVATE (self);
1491
 
}
1492
 
 
1493
 
 
1494
 
static void ctags_visitor_finalize (ValaCodeVisitor* obj) {
1495
 
        CTagsVisitor * self;
1496
 
        self = CTAGS_VISITOR (obj);
1497
 
        _vala_code_visitor_unref0 (self->priv->vala_parser);
1498
 
        _vala_code_visitor_unref0 (self->priv->genie_parser);
1499
 
        __g_list_free__ctags_entry_free0_0 (self->priv->taglist);
1500
 
        VALA_CODE_VISITOR_CLASS (ctags_visitor_parent_class)->finalize (obj);
1501
 
}
1502
 
 
1503
 
 
1504
 
GType ctags_visitor_get_type (void) {
1505
 
        static volatile gsize ctags_visitor_type_id__volatile = 0;
1506
 
        if (g_once_init_enter (&ctags_visitor_type_id__volatile)) {
1507
 
                static const GTypeInfo g_define_type_info = { sizeof (CTagsVisitorClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) ctags_visitor_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (CTagsVisitor), 0, (GInstanceInitFunc) ctags_visitor_instance_init, NULL };
1508
 
                GType ctags_visitor_type_id;
1509
 
                ctags_visitor_type_id = g_type_register_static (VALA_TYPE_CODE_VISITOR, "CTagsVisitor", &g_define_type_info, 0);
1510
 
                g_once_init_leave (&ctags_visitor_type_id__volatile, ctags_visitor_type_id);
1511
 
        }
1512
 
        return ctags_visitor_type_id__volatile;
1513
 
}
1514
 
 
1515
 
 
1516
 
static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func) {
1517
 
        if ((array != NULL) && (destroy_func != NULL)) {
1518
 
                int i;
1519
 
                for (i = 0; i < array_length; i = i + 1) {
1520
 
                        if (((gpointer*) array)[i] != NULL) {
1521
 
                                destroy_func (((gpointer*) array)[i]);
1522
 
                        }
1523
 
                }
1524
 
        }
1525
 
}
1526
 
 
1527
 
 
1528
 
static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func) {
1529
 
        _vala_array_destroy (array, array_length, destroy_func);
1530
 
        g_free (array);
1531
 
}
1532
 
 
1533
 
 
1534