~ubuntu-branches/ubuntu/vivid/vala/vivid

« back to all changes in this revision

Viewing changes to vala/valacodenode.c

  • Committer: Bazaar Package Importer
  • Author(s): Sebastian Dröge
  • Date: 2010-07-28 07:58:01 UTC
  • mfrom: (1.5.5 upstream) (7.3.14 experimental)
  • Revision ID: james.westby@ubuntu.com-20100728075801-18u9cg5hv5oety6m
Tags: 0.9.4-1
New upstream development release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
93
93
typedef struct _ValaSymbol ValaSymbol;
94
94
typedef struct _ValaSymbolClass ValaSymbolClass;
95
95
 
 
96
#define VALA_TYPE_VARIABLE (vala_variable_get_type ())
 
97
#define VALA_VARIABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALA_TYPE_VARIABLE, ValaVariable))
 
98
#define VALA_VARIABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VALA_TYPE_VARIABLE, ValaVariableClass))
 
99
#define VALA_IS_VARIABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VALA_TYPE_VARIABLE))
 
100
#define VALA_IS_VARIABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VALA_TYPE_VARIABLE))
 
101
#define VALA_VARIABLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VALA_TYPE_VARIABLE, ValaVariableClass))
 
102
 
 
103
typedef struct _ValaVariable ValaVariable;
 
104
typedef struct _ValaVariableClass ValaVariableClass;
 
105
 
96
106
#define VALA_TYPE_LOCAL_VARIABLE (vala_local_variable_get_type ())
97
107
#define VALA_LOCAL_VARIABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALA_TYPE_LOCAL_VARIABLE, ValaLocalVariable))
98
108
#define VALA_LOCAL_VARIABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VALA_TYPE_LOCAL_VARIABLE, ValaLocalVariableClass))
200
210
GType vala_data_type_get_type (void) G_GNUC_CONST;
201
211
GType vala_expression_get_type (void) G_GNUC_CONST;
202
212
GType vala_symbol_get_type (void) G_GNUC_CONST;
 
213
GType vala_variable_get_type (void) G_GNUC_CONST;
203
214
GType vala_local_variable_get_type (void) G_GNUC_CONST;
204
215
GType vala_attribute_get_type (void) G_GNUC_CONST;
205
216
gpointer vala_source_reference_ref (gpointer instance);
278
289
}
279
290
 
280
291
 
 
292
/**
 
293
 * Specifies the exceptions that can be thrown by this node or a child node
 
294
 */
281
295
ValaList* vala_code_node_get_error_types (ValaCodeNode* self) {
282
296
        ValaList* result = NULL;
283
297
        g_return_val_if_fail (self != NULL, NULL);
294
308
}
295
309
 
296
310
 
 
311
/**
 
312
 * Adds an error type to the exceptions that can be thrown by this node
 
313
 * or a child node 
 
314
 */
297
315
void vala_code_node_add_error_type (ValaCodeNode* self, ValaDataType* error_type) {
298
316
        g_return_if_fail (self != NULL);
299
317
        g_return_if_fail (error_type != NULL);
306
324
}
307
325
 
308
326
 
 
327
/**
 
328
 * Adds a collection of error types to the exceptions that can be thrown by this node
 
329
 * or a child node 
 
330
 */
309
331
void vala_code_node_add_error_types (ValaCodeNode* self, ValaList* error_types) {
310
332
        g_return_if_fail (self != NULL);
311
333
        g_return_if_fail (error_types != NULL);
326
348
}
327
349
 
328
350
 
 
351
/**
 
352
 * Visits this code node with the specified CodeVisitor.
 
353
 *
 
354
 * @param visitor the visitor to be called while traversing
 
355
 */
329
356
static void vala_code_node_real_accept (ValaCodeNode* self, ValaCodeVisitor* visitor) {
330
357
        g_return_if_fail (self != NULL);
331
358
        g_return_if_fail (visitor != NULL);
337
364
}
338
365
 
339
366
 
 
367
/**
 
368
 * Visits all children of this code node with the specified CodeVisitor.
 
369
 *
 
370
 * @param visitor the visitor to be called while traversing
 
371
 */
340
372
static void vala_code_node_real_accept_children (ValaCodeNode* self, ValaCodeVisitor* visitor) {
341
373
        g_return_if_fail (self != NULL);
342
374
        g_return_if_fail (visitor != NULL);
391
423
}
392
424
 
393
425
 
 
426
/**
 
427
 * Returns the specified attribute.
 
428
 *
 
429
 * @param name attribute name
 
430
 * @return     attribute
 
431
 */
394
432
ValaAttribute* vala_code_node_get_attribute (ValaCodeNode* self, const char* name) {
395
433
        ValaAttribute* result = NULL;
396
434
        g_return_val_if_fail (self != NULL, NULL);
416
454
}
417
455
 
418
456
 
 
457
/**
 
458
 * Returns a string that represents this code node.
 
459
 *
 
460
 * @return a string representation
 
461
 */
419
462
static char* vala_code_node_real_to_string (ValaCodeNode* self) {
420
463
        char* result = NULL;
421
464
        GString* str;
748
791
}
749
792
 
750
793
 
 
794
/**
 
795
 * Represents a part of the parsed source code.
 
796
 *
 
797
 * Code nodes get created by the parser and are used throughout the whole
 
798
 * compilation process.
 
799
 */
751
800
GType vala_code_node_get_type (void) {
752
801
        static volatile gsize vala_code_node_type_id__volatile = 0;
753
802
        if (g_once_init_enter (&vala_code_node_type_id__volatile)) {