2463
2477
if (common_prefix == NULL) {
2465
common_prefix = (_tmp9_ = g_strdup (value->name), _g_free0 (common_prefix), _tmp9_);
2479
common_prefix = (_tmp10_ = g_strdup (value->name), _g_free0 (common_prefix), _tmp10_);
2467
gboolean _tmp10_ = FALSE;
2481
gboolean _tmp11_ = FALSE;
2469
2483
if (g_utf8_strlen (common_prefix, -1) > 0) {
2470
_tmp10_ = !g_str_has_suffix (common_prefix, "_");
2484
_tmp11_ = !g_str_has_suffix (common_prefix, "_");
2477
common_prefix = (_tmp11_ = g_strndup (common_prefix, strlen (common_prefix) - 1), _g_free0 (common_prefix), _tmp11_);
2491
common_prefix = (_tmp12_ = g_strndup (common_prefix, strlen (common_prefix) - 1), _g_free0 (common_prefix), _tmp12_);
2482
2496
if (!(!g_str_has_prefix (value->name, common_prefix))) {
2485
common_prefix = (_tmp12_ = g_strndup (common_prefix, strlen (common_prefix) - 1), _g_free0 (common_prefix), _tmp12_);
2499
common_prefix = (_tmp13_ = g_strndup (common_prefix, strlen (common_prefix) - 1), _g_free0 (common_prefix), _tmp13_);
2489
gboolean _tmp13_ = FALSE;
2503
gboolean _tmp14_ = FALSE;
2491
2505
if (g_utf8_strlen (common_prefix, -1) > 0) {
2492
gboolean _tmp14_ = FALSE;
2506
gboolean _tmp15_ = FALSE;
2493
2507
if (!g_str_has_suffix (common_prefix, "_")) {
2496
gboolean _tmp15_ = FALSE;
2510
gboolean _tmp16_ = FALSE;
2497
2511
if (g_unichar_isdigit (g_utf8_get_char (g_utf8_offset_to_pointer (value->name, string_get_length (common_prefix))))) {
2498
_tmp15_ = (g_utf8_strlen (value->name, -1) - g_utf8_strlen (common_prefix, -1)) <= 1;
2512
_tmp16_ = (g_utf8_strlen (value->name, -1) - g_utf8_strlen (common_prefix, -1)) <= 1;
2511
common_prefix = (_tmp16_ = g_strndup (common_prefix, strlen (common_prefix) - 1), _g_free0 (common_prefix), _tmp16_);
2525
common_prefix = (_tmp17_ = g_strndup (common_prefix, strlen (common_prefix) - 1), _g_free0 (common_prefix), _tmp17_);
2513
2527
val_attributes = (_vala_array_free (val_attributes, val_attributes_length1, (GDestroyNotify) g_free), NULL);
2529
2543
attr = g_strdup (attr_collection[attr_it]);
2532
2546
gint _nv_size_;
2533
2547
gint nv_length1;
2536
nv = (_tmp20_ = _tmp19_ = g_strsplit (attr, "=", 2), nv_length1 = _vala_array_length (_tmp19_), _nv_size_ = nv_length1, _tmp20_);
2550
nv = (_tmp21_ = _tmp20_ = g_strsplit (attr, "=", 2), nv_length1 = _vala_array_length (_tmp20_), _nv_size_ = nv_length1, _tmp21_);
2537
2551
if (_vala_strcmp0 (nv[0], "common_prefix") == 0) {
2539
common_prefix = (_tmp21_ = vala_gidl_parser_eval (self, nv[1]), _g_free0 (common_prefix), _tmp21_);
2553
common_prefix = (_tmp22_ = vala_gidl_parser_eval (self, nv[1]), _g_free0 (common_prefix), _tmp22_);
2541
2555
if (_vala_strcmp0 (nv[0], "cheader_filename") == 0) {
2544
vala_collection_add ((ValaCollection*) cheader_filenames, _tmp22_ = vala_gidl_parser_eval (self, nv[1]));
2546
vala_typesymbol_add_cheader_filename ((ValaTypeSymbol*) en, _tmp23_ = vala_gidl_parser_eval (self, nv[1]));
2558
vala_collection_add ((ValaCollection*) cheader_filenames, _tmp23_ = vala_gidl_parser_eval (self, nv[1]));
2547
2559
_g_free0 (_tmp23_);
2560
vala_symbol_add_cheader_filename ((ValaSymbol*) en, _tmp24_ = vala_gidl_parser_eval (self, nv[1]));
2549
2563
if (_vala_strcmp0 (nv[0], "hidden") == 0) {
2552
if ((_tmp25_ = _vala_strcmp0 (_tmp24_ = vala_gidl_parser_eval (self, nv[1]), "1") == 0, _g_free0 (_tmp24_), _tmp25_)) {
2566
if ((_tmp26_ = _vala_strcmp0 (_tmp25_ = vala_gidl_parser_eval (self, nv[1]), "1") == 0, _g_free0 (_tmp25_), _tmp26_)) {
2553
2567
nv = (_vala_array_free (nv, nv_length1, (GDestroyNotify) g_free), NULL);
2554
2568
_g_free0 (attr);
2555
2569
en_attributes = (_vala_array_free (en_attributes, en_attributes_length1, (GDestroyNotify) g_free), NULL);
2563
2577
if (_vala_strcmp0 (nv[0], "deprecated") == 0) {
2566
if ((_tmp27_ = _vala_strcmp0 (_tmp26_ = vala_gidl_parser_eval (self, nv[1]), "1") == 0, _g_free0 (_tmp26_), _tmp27_)) {
2580
if ((_tmp28_ = _vala_strcmp0 (_tmp27_ = vala_gidl_parser_eval (self, nv[1]), "1") == 0, _g_free0 (_tmp27_), _tmp28_)) {
2567
2581
vala_symbol_set_deprecated ((ValaSymbol*) en, TRUE);
2570
2584
if (_vala_strcmp0 (nv[0], "replacement") == 0) {
2572
vala_symbol_set_replacement ((ValaSymbol*) en, _tmp28_ = vala_gidl_parser_eval (self, nv[1]));
2586
vala_symbol_set_replacement ((ValaSymbol*) en, _tmp29_ = vala_gidl_parser_eval (self, nv[1]));
2575
2589
if (_vala_strcmp0 (nv[0], "deprecated_since") == 0) {
2577
vala_symbol_set_deprecated_since ((ValaSymbol*) en, _tmp29_ = vala_gidl_parser_eval (self, nv[1]));
2591
vala_symbol_set_deprecated_since ((ValaSymbol*) en, _tmp30_ = vala_gidl_parser_eval (self, nv[1]));
2580
2594
if (_vala_strcmp0 (nv[0], "rename_to") == 0) {
2582
vala_symbol_set_name ((ValaSymbol*) en, _tmp30_ = vala_gidl_parser_eval (self, nv[1]));
2596
vala_symbol_set_name ((ValaSymbol*) en, _tmp31_ = vala_gidl_parser_eval (self, nv[1]));
2585
2599
if (_vala_strcmp0 (nv[0], "errordomain") == 0) {
2588
if ((_tmp32_ = _vala_strcmp0 (_tmp31_ = vala_gidl_parser_eval (self, nv[1]), "1") == 0, _g_free0 (_tmp31_), _tmp32_)) {
2602
if ((_tmp33_ = _vala_strcmp0 (_tmp32_ = vala_gidl_parser_eval (self, nv[1]), "1") == 0, _g_free0 (_tmp32_), _tmp33_)) {
2589
2603
is_errordomain = TRUE;
2592
2606
if (_vala_strcmp0 (nv[0], "to_string") == 0) {
2593
2607
ValaUnresolvedType* return_type;
2594
ValaUnresolvedSymbol* _tmp33_;
2608
ValaUnresolvedSymbol* _tmp34_;
2597
2611
return_type = vala_unresolved_type_new ();
2598
vala_unresolved_type_set_unresolved_symbol (return_type, _tmp33_ = vala_unresolved_symbol_new (NULL, "string", NULL));
2599
_vala_code_node_unref0 (_tmp33_);
2612
vala_unresolved_type_set_unresolved_symbol (return_type, _tmp34_ = vala_unresolved_symbol_new (NULL, "string", NULL));
2613
_vala_code_node_unref0 (_tmp34_);
2600
2614
vala_data_type_set_value_owned ((ValaDataType*) return_type, FALSE);
2601
2615
m = vala_method_new ("to_string", (ValaDataType*) return_type, self->priv->current_source_reference, NULL);
2602
2616
vala_symbol_set_access ((ValaSymbol*) m, VALA_SYMBOL_ACCESSIBILITY_PUBLIC);
2603
vala_method_set_cname (m, _tmp34_ = vala_gidl_parser_eval (self, nv[1]));
2617
vala_method_set_cname (m, _tmp35_ = vala_gidl_parser_eval (self, nv[1]));
2605
2619
vala_enum_add_method (en, m);
2606
2620
_vala_code_node_unref0 (m);
2607
2621
_vala_code_node_unref0 (return_type);
3231
3245
static void vala_gidl_parser_handle_async_methods (ValaGIdlParser* self, ValaObjectTypeSymbol* type_symbol) {
3246
ValaSet* finish_methods;
3232
3247
ValaList* methods;
3233
3248
g_return_if_fail (self != NULL);
3234
3249
g_return_if_fail (type_symbol != NULL);
3250
finish_methods = (ValaSet*) vala_hash_set_new (VALA_TYPE_METHOD, (GBoxedCopyFunc) vala_code_node_ref, vala_code_node_unref, g_direct_hash, g_direct_equal);
3235
3251
methods = vala_object_type_symbol_get_methods (type_symbol);
3248
if (!(method_n < vala_collection_get_size ((ValaCollection*) methods))) {
3251
m = (ValaMethod*) vala_list_get (methods, method_n);
3252
if (vala_method_get_coroutine (m)) {
3253
char* finish_method_base;
3257
ValaMethod* finish_method;
3258
finish_method_base = NULL;
3259
if (g_str_has_suffix (vala_symbol_get_name ((ValaSymbol*) m), "_async")) {
3261
finish_method_base = (_tmp1_ = string_substring (vala_symbol_get_name ((ValaSymbol*) m), (glong) 0, string_get_length (vala_symbol_get_name ((ValaSymbol*) m)) - string_get_length ("_async")), _g_free0 (finish_method_base), _tmp1_);
3264
finish_method_base = (_tmp2_ = g_strdup (vala_symbol_get_name ((ValaSymbol*) m)), _g_free0 (finish_method_base), _tmp2_);
3266
finish_method = (_tmp5_ = (_tmp4_ = vala_scope_lookup (vala_symbol_get_scope ((ValaSymbol*) type_symbol), _tmp3_ = g_strconcat (finish_method_base, "_finish", NULL)), VALA_IS_METHOD (_tmp4_) ? ((ValaMethod*) _tmp4_) : NULL), _g_free0 (_tmp3_), _tmp5_);
3267
if (finish_method == NULL) {
3269
method_cname = vala_method_get_finish_cname (m);
3272
ValaIterator* _tmp7_;
3273
ValaIterator* _method_it;
3274
_method_it = (_tmp7_ = vala_iterable_iterator ((ValaIterable*) (_tmp6_ = vala_object_type_symbol_get_methods (type_symbol))), _vala_collection_object_unref0 (_tmp6_), _tmp7_);
3279
if (!vala_iterator_next (_method_it)) {
3282
method = (ValaMethod*) vala_iterator_get (_method_it);
3283
if ((_tmp9_ = _vala_strcmp0 (_tmp8_ = vala_method_get_cname (method), method_cname) == 0, _g_free0 (_tmp8_), _tmp9_)) {
3284
ValaMethod* _tmp10_;
3285
finish_method = (_tmp10_ = _vala_code_node_ref0 (method), _vala_code_node_unref0 (finish_method), _tmp10_);
3286
_vala_code_node_unref0 (method);
3253
ValaIterator* _m_it;
3254
_m_it = vala_iterable_iterator ((ValaIterable*) methods);
3257
if (!vala_iterator_next (_m_it)) {
3260
m = (ValaMethod*) vala_iterator_get (_m_it);
3261
if (vala_method_get_coroutine (m)) {
3262
char* finish_method_base;
3266
ValaMethod* finish_method;
3267
finish_method_base = NULL;
3268
if (g_str_has_suffix (vala_symbol_get_name ((ValaSymbol*) m), "_async")) {
3270
finish_method_base = (_tmp0_ = string_substring (vala_symbol_get_name ((ValaSymbol*) m), (glong) 0, string_get_length (vala_symbol_get_name ((ValaSymbol*) m)) - string_get_length ("_async")), _g_free0 (finish_method_base), _tmp0_);
3273
finish_method_base = (_tmp1_ = g_strdup (vala_symbol_get_name ((ValaSymbol*) m)), _g_free0 (finish_method_base), _tmp1_);
3275
finish_method = (_tmp4_ = (_tmp3_ = vala_scope_lookup (vala_symbol_get_scope ((ValaSymbol*) type_symbol), _tmp2_ = g_strconcat (finish_method_base, "_finish", NULL)), VALA_IS_METHOD (_tmp3_) ? ((ValaMethod*) _tmp3_) : NULL), _g_free0 (_tmp2_), _tmp4_);
3276
if (finish_method == NULL) {
3278
method_cname = vala_method_get_finish_cname (m);
3281
ValaIterator* _tmp6_;
3282
ValaIterator* _method_it;
3283
_method_it = (_tmp6_ = vala_iterable_iterator ((ValaIterable*) (_tmp5_ = vala_object_type_symbol_get_methods (type_symbol))), _vala_collection_object_unref0 (_tmp5_), _tmp6_);
3288
if (!vala_iterator_next (_method_it)) {
3291
method = (ValaMethod*) vala_iterator_get (_method_it);
3292
if ((_tmp8_ = _vala_strcmp0 (_tmp7_ = vala_method_get_cname (method), method_cname) == 0, _g_free0 (_tmp7_), _tmp8_)) {
3294
finish_method = (_tmp9_ = _vala_code_node_ref0 (method), _vala_code_node_unref0 (finish_method), _tmp9_);
3289
3295
_vala_code_node_unref0 (method);
3291
_vala_collection_object_unref0 (_method_it);
3293
_g_free0 (method_cname);
3295
if (finish_method != NULL) {
3296
ValaDataType* _tmp11_;
3297
vala_method_set_return_type (m, _tmp11_ = vala_data_type_copy (vala_method_get_return_type (finish_method)));
3298
_vala_code_node_unref0 (_tmp11_);
3299
vala_method_set_no_array_length (m, vala_method_get_no_array_length (finish_method));
3300
vala_method_set_array_null_terminated (m, vala_method_get_array_null_terminated (finish_method));
3303
ValaIterator* _tmp13_;
3304
ValaIterator* _param_it;
3305
_param_it = (_tmp13_ = vala_iterable_iterator ((ValaIterable*) (_tmp12_ = vala_method_get_parameters (finish_method))), _vala_collection_object_unref0 (_tmp12_), _tmp13_);
3307
ValaFormalParameter* param;
3308
if (!vala_iterator_next (_param_it)) {
3311
param = (ValaFormalParameter*) vala_iterator_get (_param_it);
3312
if (vala_formal_parameter_get_direction (param) == VALA_PARAMETER_DIRECTION_OUT) {
3313
ValaFormalParameter* async_param;
3314
ValaSymbol* _tmp14_;
3316
async_param = vala_formal_parameter_copy (param);
3317
if ((_tmp15_ = (_tmp14_ = vala_scope_lookup (vala_symbol_get_scope ((ValaSymbol*) m), vala_symbol_get_name ((ValaSymbol*) param))) != NULL, _vala_code_node_unref0 (_tmp14_), _tmp15_)) {
3319
vala_symbol_set_name ((ValaSymbol*) async_param, _tmp16_ = g_strconcat (vala_symbol_get_name ((ValaSymbol*) async_param), "_out", NULL));
3322
vala_method_add_parameter (m, async_param);
3323
_vala_code_node_unref0 (async_param);
3325
_vala_code_node_unref0 (param);
3327
_vala_collection_object_unref0 (_param_it);
3331
ValaIterator* _tmp18_;
3332
ValaIterator* _error_type_it;
3333
_error_type_it = (_tmp18_ = vala_iterable_iterator ((ValaIterable*) (_tmp17_ = vala_code_node_get_error_types ((ValaCodeNode*) finish_method))), _vala_collection_object_unref0 (_tmp17_), _tmp18_);
3335
ValaDataType* error_type;
3336
ValaDataType* _tmp19_;
3337
if (!vala_iterator_next (_error_type_it)) {
3340
error_type = (ValaDataType*) vala_iterator_get (_error_type_it);
3341
vala_code_node_add_error_type ((ValaCodeNode*) m, _tmp19_ = vala_data_type_copy (error_type));
3342
_vala_code_node_unref0 (_tmp19_);
3343
_vala_code_node_unref0 (error_type);
3345
_vala_collection_object_unref0 (_error_type_it);
3347
if (vala_list_index_of (methods, finish_method) < method_n) {
3350
vala_scope_remove (vala_symbol_get_scope ((ValaSymbol*) type_symbol), vala_symbol_get_name ((ValaSymbol*) finish_method));
3351
vala_collection_remove ((ValaCollection*) methods, finish_method);
3353
_vala_code_node_unref0 (finish_method);
3354
_g_free0 (finish_method_base);
3356
_vala_code_node_unref0 (m);
3298
_vala_code_node_unref0 (method);
3300
_vala_collection_object_unref0 (_method_it);
3302
_g_free0 (method_cname);
3304
if (finish_method != NULL) {
3305
ValaDataType* _tmp10_;
3306
vala_method_set_return_type (m, _tmp10_ = vala_data_type_copy (vala_method_get_return_type (finish_method)));
3307
_vala_code_node_unref0 (_tmp10_);
3308
vala_method_set_no_array_length (m, vala_method_get_no_array_length (finish_method));
3309
vala_method_set_array_null_terminated (m, vala_method_get_array_null_terminated (finish_method));
3312
ValaIterator* _tmp12_;
3313
ValaIterator* _param_it;
3314
_param_it = (_tmp12_ = vala_iterable_iterator ((ValaIterable*) (_tmp11_ = vala_method_get_parameters (finish_method))), _vala_collection_object_unref0 (_tmp11_), _tmp12_);
3316
ValaFormalParameter* param;
3317
if (!vala_iterator_next (_param_it)) {
3320
param = (ValaFormalParameter*) vala_iterator_get (_param_it);
3321
if (vala_formal_parameter_get_direction (param) == VALA_PARAMETER_DIRECTION_OUT) {
3322
ValaFormalParameter* async_param;
3323
ValaSymbol* _tmp13_;
3325
async_param = vala_formal_parameter_copy (param);
3326
if ((_tmp14_ = (_tmp13_ = vala_scope_lookup (vala_symbol_get_scope ((ValaSymbol*) m), vala_symbol_get_name ((ValaSymbol*) param))) != NULL, _vala_code_node_unref0 (_tmp13_), _tmp14_)) {
3328
vala_symbol_set_name ((ValaSymbol*) async_param, _tmp15_ = g_strconcat (vala_symbol_get_name ((ValaSymbol*) async_param), "_out", NULL));
3331
vala_method_add_parameter (m, async_param);
3332
_vala_code_node_unref0 (async_param);
3334
_vala_code_node_unref0 (param);
3336
_vala_collection_object_unref0 (_param_it);
3340
ValaIterator* _tmp17_;
3341
ValaIterator* _error_type_it;
3342
_error_type_it = (_tmp17_ = vala_iterable_iterator ((ValaIterable*) (_tmp16_ = vala_code_node_get_error_types ((ValaCodeNode*) finish_method))), _vala_collection_object_unref0 (_tmp16_), _tmp17_);
3344
ValaDataType* error_type;
3345
ValaDataType* _tmp18_;
3346
if (!vala_iterator_next (_error_type_it)) {
3349
error_type = (ValaDataType*) vala_iterator_get (_error_type_it);
3350
vala_code_node_add_error_type ((ValaCodeNode*) m, _tmp18_ = vala_data_type_copy (error_type));
3351
_vala_code_node_unref0 (_tmp18_);
3352
_vala_code_node_unref0 (error_type);
3354
_vala_collection_object_unref0 (_error_type_it);
3356
vala_collection_add ((ValaCollection*) finish_methods, finish_method);
3358
_vala_code_node_unref0 (finish_method);
3359
_g_free0 (finish_method_base);
3361
_vala_code_node_unref0 (m);
3363
_vala_collection_object_unref0 (_m_it);
3366
ValaIterator* _m_it;
3367
_m_it = vala_iterable_iterator ((ValaIterable*) finish_methods);
3370
if (!vala_iterator_next (_m_it)) {
3373
m = (ValaMethod*) vala_iterator_get (_m_it);
3374
vala_scope_remove (vala_symbol_get_scope ((ValaSymbol*) type_symbol), vala_symbol_get_name ((ValaSymbol*) m));
3375
vala_collection_remove ((ValaCollection*) methods, m);
3376
_vala_code_node_unref0 (m);
3378
_vala_collection_object_unref0 (_m_it);
3360
3380
_vala_collection_object_unref0 (methods);
3381
_vala_collection_object_unref0 (finish_methods);
4238
4259
vala_method_set_array_null_terminated (m, TRUE);
4241
if (_vala_strcmp0 (nv[0], "type_name") == 0) {
4262
if (_vala_strcmp0 (nv[0], "array_length_type") == 0) {
4243
ValaUnresolvedSymbol* _tmp44_;
4244
ValaUnresolvedSymbol* sym;
4245
sym = (_tmp44_ = vala_unresolved_symbol_new (NULL, _tmp43_ = vala_gidl_parser_eval (self, nv[1]), NULL), _g_free0 (_tmp43_), _tmp44_);
4246
if (VALA_IS_UNRESOLVED_TYPE (return_type)) {
4247
vala_unresolved_type_set_unresolved_symbol (VALA_UNRESOLVED_TYPE (return_type), sym);
4249
ValaDataType* _tmp45_;
4250
vala_method_set_return_type (m, return_type = (_tmp45_ = (ValaDataType*) vala_unresolved_type_new_from_symbol (sym, vala_code_node_get_source_reference ((ValaCodeNode*) return_type)), _vala_code_node_unref0 (return_type), _tmp45_));
4252
_vala_code_node_unref0 (sym);
4264
vala_method_set_array_length_type (m, _tmp43_ = vala_gidl_parser_eval (self, nv[1]));
4254
if (_vala_strcmp0 (nv[0], "type_arguments") == 0) {
4256
gint _type_args_size_;
4257
gint type_args_length1;
4262
type_args = (_tmp49_ = (_tmp48_ = _tmp47_ = g_strsplit (_tmp46_ = vala_gidl_parser_eval (self, nv[1]), ",", 0), _g_free0 (_tmp46_), _tmp48_), type_args_length1 = _vala_array_length (_tmp47_), _type_args_size_ = type_args_length1, _tmp49_);
4264
char** type_arg_collection;
4265
int type_arg_collection_length1;
4267
type_arg_collection = type_args;
4268
type_arg_collection_length1 = type_args_length1;
4269
for (type_arg_it = 0; type_arg_it < type_args_length1; type_arg_it = type_arg_it + 1) {
4271
type_arg = g_strdup (type_arg_collection[type_arg_it]);
4273
ValaDataType* _tmp50_;
4274
vala_data_type_add_type_argument (return_type, _tmp50_ = vala_gidl_parser_get_type_from_string (self, type_arg));
4275
_vala_code_node_unref0 (_tmp50_);
4276
_g_free0 (type_arg);
4267
if (_vala_strcmp0 (nv[0], "type_name") == 0) {
4269
ValaUnresolvedSymbol* _tmp45_;
4270
ValaUnresolvedSymbol* sym;
4271
sym = (_tmp45_ = vala_unresolved_symbol_new (NULL, _tmp44_ = vala_gidl_parser_eval (self, nv[1]), NULL), _g_free0 (_tmp44_), _tmp45_);
4272
if (VALA_IS_UNRESOLVED_TYPE (return_type)) {
4273
vala_unresolved_type_set_unresolved_symbol (VALA_UNRESOLVED_TYPE (return_type), sym);
4275
ValaDataType* _tmp46_;
4276
vala_method_set_return_type (m, return_type = (_tmp46_ = (ValaDataType*) vala_unresolved_type_new_from_symbol (sym, vala_code_node_get_source_reference ((ValaCodeNode*) return_type)), _vala_code_node_unref0 (return_type), _tmp46_));
4280
type_args = (_vala_array_free (type_args, type_args_length1, (GDestroyNotify) g_free), NULL);
4278
_vala_code_node_unref0 (sym);
4282
if (_vala_strcmp0 (nv[0], "deprecated") == 0) {
4285
if ((_tmp52_ = _vala_strcmp0 (_tmp51_ = vala_gidl_parser_eval (self, nv[1]), "1") == 0, _g_free0 (_tmp51_), _tmp52_)) {
4286
vala_symbol_set_deprecated ((ValaSymbol*) m, TRUE);
4280
if (_vala_strcmp0 (nv[0], "type_arguments") == 0) {
4282
gint _type_args_size_;
4283
gint type_args_length1;
4288
type_args = (_tmp50_ = (_tmp49_ = _tmp48_ = g_strsplit (_tmp47_ = vala_gidl_parser_eval (self, nv[1]), ",", 0), _g_free0 (_tmp47_), _tmp49_), type_args_length1 = _vala_array_length (_tmp48_), _type_args_size_ = type_args_length1, _tmp50_);
4290
char** type_arg_collection;
4291
int type_arg_collection_length1;
4293
type_arg_collection = type_args;
4294
type_arg_collection_length1 = type_args_length1;
4295
for (type_arg_it = 0; type_arg_it < type_args_length1; type_arg_it = type_arg_it + 1) {
4297
type_arg = g_strdup (type_arg_collection[type_arg_it]);
4299
ValaDataType* _tmp51_;
4300
vala_data_type_add_type_argument (return_type, _tmp51_ = vala_gidl_parser_get_type_from_string (self, type_arg));
4301
_vala_code_node_unref0 (_tmp51_);
4302
_g_free0 (type_arg);
4306
type_args = (_vala_array_free (type_args, type_args_length1, (GDestroyNotify) g_free), NULL);
4289
if (_vala_strcmp0 (nv[0], "replacement") == 0) {
4291
vala_symbol_set_replacement ((ValaSymbol*) m, _tmp53_ = vala_gidl_parser_eval (self, nv[1]));
4308
if (_vala_strcmp0 (nv[0], "deprecated") == 0) {
4311
if ((_tmp53_ = _vala_strcmp0 (_tmp52_ = vala_gidl_parser_eval (self, nv[1]), "1") == 0, _g_free0 (_tmp52_), _tmp53_)) {
4312
vala_symbol_set_deprecated ((ValaSymbol*) m, TRUE);
4294
if (_vala_strcmp0 (nv[0], "deprecated_since") == 0) {
4315
if (_vala_strcmp0 (nv[0], "replacement") == 0) {
4296
vala_symbol_set_deprecated_since ((ValaSymbol*) m, _tmp54_ = vala_gidl_parser_eval (self, nv[1]));
4317
vala_symbol_set_replacement ((ValaSymbol*) m, _tmp54_ = vala_gidl_parser_eval (self, nv[1]));
4297
4318
_g_free0 (_tmp54_);
4299
if (_vala_strcmp0 (nv[0], "cheader_filename") == 0) {
4320
if (_vala_strcmp0 (nv[0], "deprecated_since") == 0) {
4301
vala_member_add_cheader_filename ((ValaMember*) m, _tmp55_ = vala_gidl_parser_eval (self, nv[1]));
4322
vala_symbol_set_deprecated_since ((ValaSymbol*) m, _tmp55_ = vala_gidl_parser_eval (self, nv[1]));
4302
4323
_g_free0 (_tmp55_);
4304
if (_vala_strcmp0 (nv[0], "abstract") == 0) {
4325
if (_vala_strcmp0 (nv[0], "cheader_filename") == 0) {
4307
if ((_tmp57_ = _vala_strcmp0 (_tmp56_ = vala_gidl_parser_eval (self, nv[1]), "1") == 0, _g_free0 (_tmp56_), _tmp57_)) {
4308
vala_method_set_is_abstract (m, TRUE);
4327
vala_symbol_add_cheader_filename ((ValaSymbol*) m, _tmp56_ = vala_gidl_parser_eval (self, nv[1]));
4311
if (_vala_strcmp0 (nv[0], "virtual") == 0) {
4314
if ((_tmp59_ = _vala_strcmp0 (_tmp58_ = vala_gidl_parser_eval (self, nv[1]), "1") == 0, _g_free0 (_tmp58_), _tmp59_)) {
4315
vala_method_set_is_virtual (m, TRUE);
4330
if (_vala_strcmp0 (nv[0], "abstract") == 0) {
4333
if ((_tmp58_ = _vala_strcmp0 (_tmp57_ = vala_gidl_parser_eval (self, nv[1]), "1") == 0, _g_free0 (_tmp57_), _tmp58_)) {
4334
vala_method_set_is_abstract (m, TRUE);
4318
if (_vala_strcmp0 (nv[0], "vfunc_name") == 0) {
4320
vala_method_set_vfunc_name (m, _tmp60_ = vala_gidl_parser_eval (self, nv[1]));
4337
if (_vala_strcmp0 (nv[0], "virtual") == 0) {
4340
if ((_tmp60_ = _vala_strcmp0 (_tmp59_ = vala_gidl_parser_eval (self, nv[1]), "1") == 0, _g_free0 (_tmp59_), _tmp60_)) {
4341
vala_method_set_is_virtual (m, TRUE);
4323
if (_vala_strcmp0 (nv[0], "finish_name") == 0) {
4344
if (_vala_strcmp0 (nv[0], "vfunc_name") == 0) {
4325
vala_method_set_finish_cname (m, _tmp61_ = vala_gidl_parser_eval (self, nv[1]));
4346
vala_method_set_vfunc_name (m, _tmp61_ = vala_gidl_parser_eval (self, nv[1]));
4326
4347
_g_free0 (_tmp61_);
4328
if (_vala_strcmp0 (nv[0], "async") == 0) {
4349
if (_vala_strcmp0 (nv[0], "finish_name") == 0) {
4331
if ((_tmp63_ = _vala_strcmp0 (_tmp62_ = vala_gidl_parser_eval (self, nv[1]), "1") == 0, _g_free0 (_tmp62_), _tmp63_)) {
4332
vala_method_set_coroutine (m, TRUE);
4351
vala_method_set_finish_cname (m, _tmp62_ = vala_gidl_parser_eval (self, nv[1]));
4354
if (_vala_strcmp0 (nv[0], "async") == 0) {
4357
if ((_tmp64_ = _vala_strcmp0 (_tmp63_ = vala_gidl_parser_eval (self, nv[1]), "1") == 0, _g_free0 (_tmp63_), _tmp64_)) {
4358
vala_method_set_coroutine (m, TRUE);
4386
4413
double delegate_target_pos;
4387
4414
gboolean array_requested;
4388
4415
gboolean out_requested;
4392
gboolean _tmp138_ = FALSE;
4393
gboolean _tmp142_ = FALSE;
4394
ValaFormalParameter* _tmp143_;
4395
ValaDataType* _tmp144_;
4419
gboolean _tmp139_ = FALSE;
4420
gboolean _tmp143_ = FALSE;
4421
ValaFormalParameter* _tmp144_;
4422
ValaDataType* _tmp145_;
4396
4423
param_node = (GIdlNode*) param;
4398
gboolean _tmp64_ = FALSE;
4399
4425
gboolean _tmp65_ = FALSE;
4400
4426
gboolean _tmp66_ = FALSE;
4427
gboolean _tmp67_ = FALSE;
4402
4429
if (!VALA_IS_CREATION_METHOD (m)) {
4403
_tmp66_ = self->priv->current_data_type != NULL;
4430
_tmp67_ = self->priv->current_data_type != NULL;
4435
_tmp66_ = param->type->is_interface;
4405
4437
_tmp66_ = FALSE;
4408
_tmp65_ = param->type->is_interface;
4440
gboolean _tmp68_ = FALSE;
4441
if (_vala_strcmp0 (param_node->name, "self") == 0) {
4445
_tmp68_ = g_str_has_suffix (param->type->interface, _tmp69_ = vala_typesymbol_get_cname (self->priv->current_data_type, FALSE));
4410
4450
_tmp65_ = FALSE;
4413
gboolean _tmp67_ = FALSE;
4414
if (_vala_strcmp0 (param_node->name, "self") == 0) {
4418
_tmp67_ = g_str_has_suffix (param->type->interface, _tmp68_ = vala_typesymbol_get_cname (self->priv->current_data_type, FALSE));
4428
gboolean _tmp69_ = FALSE;
4429
4455
gboolean _tmp70_ = FALSE;
4430
4456
gboolean _tmp71_ = FALSE;
4457
gboolean _tmp72_ = FALSE;
4431
4458
if (!VALA_IS_CREATION_METHOD (m)) {
4432
_tmp71_ = self->priv->current_data_type != NULL;
4459
_tmp72_ = self->priv->current_data_type != NULL;
4464
_tmp71_ = param->type->is_interface;
4434
4466
_tmp71_ = FALSE;
4437
_tmp70_ = param->type->is_interface;
4442
gboolean _tmp72_ = FALSE;
4469
gboolean _tmp73_ = FALSE;
4443
4470
if (_vala_strcmp0 (param_node->name, "klass") == 0) {
4448
_tmp72_ = g_str_has_suffix (param->type->interface, _tmp74_ = g_strdup_printf ("%sClass", _tmp73_ = vala_typesymbol_get_cname (self->priv->current_data_type, FALSE)));
4475
_tmp73_ = g_str_has_suffix (param->type->interface, _tmp75_ = g_strdup_printf ("%sClass", _tmp74_ = vala_typesymbol_get_cname (self->priv->current_data_type, FALSE)));
4449
4477
_g_free0 (_tmp74_);
4457
4484
vala_method_set_binding (m, MEMBER_BINDING_CLASS);
4458
4485
if (g_str_has_prefix (vala_symbol_get_name ((ValaSymbol*) m), "class_")) {
4460
vala_symbol_set_name ((ValaSymbol*) m, _tmp75_ = string_substring (vala_symbol_get_name ((ValaSymbol*) m), g_utf8_strlen ("class_", -1), g_utf8_strlen (vala_symbol_get_name ((ValaSymbol*) m), -1) - g_utf8_strlen ("class_", -1)));
4487
vala_symbol_set_name ((ValaSymbol*) m, _tmp76_ = string_substring (vala_symbol_get_name ((ValaSymbol*) m), g_utf8_strlen ("class_", -1), g_utf8_strlen (vala_symbol_get_name ((ValaSymbol*) m), -1) - g_utf8_strlen ("class_", -1)));
4548
4575
if (_vala_strcmp0 (nv[0], "is_out") == 0) {
4551
if ((_tmp91_ = _vala_strcmp0 (_tmp90_ = vala_gidl_parser_eval (self, nv[1]), "1") == 0, _g_free0 (_tmp90_), _tmp91_)) {
4552
gboolean _tmp92_ = FALSE;
4578
if ((_tmp92_ = _vala_strcmp0 (_tmp91_ = vala_gidl_parser_eval (self, nv[1]), "1") == 0, _g_free0 (_tmp91_), _tmp92_)) {
4579
gboolean _tmp93_ = FALSE;
4553
4580
vala_formal_parameter_set_direction (p, VALA_PARAMETER_DIRECTION_OUT);
4554
4581
out_requested = TRUE;
4555
4582
if (!array_requested) {
4556
_tmp92_ = VALA_IS_ARRAY_TYPE (param_type);
4583
_tmp93_ = VALA_IS_ARRAY_TYPE (param_type);
4561
4588
ValaArrayType* array_type;
4562
ValaDataType* _tmp93_;
4589
ValaDataType* _tmp94_;
4563
4590
array_type = _vala_code_node_ref0 (VALA_ARRAY_TYPE (param_type));
4564
param_type = (_tmp93_ = _vala_code_node_ref0 (vala_array_type_get_element_type (array_type)), _vala_code_node_unref0 (param_type), _tmp93_);
4565
vala_formal_parameter_set_parameter_type (p, param_type);
4591
param_type = (_tmp94_ = _vala_code_node_ref0 (vala_array_type_get_element_type (array_type)), _vala_code_node_unref0 (param_type), _tmp94_);
4592
vala_variable_set_variable_type ((ValaVariable*) p, param_type);
4566
4593
_vala_code_node_unref0 (array_type);
4570
4597
if (_vala_strcmp0 (nv[0], "is_ref") == 0) {
4573
if ((_tmp95_ = _vala_strcmp0 (_tmp94_ = vala_gidl_parser_eval (self, nv[1]), "1") == 0, _g_free0 (_tmp94_), _tmp95_)) {
4574
gboolean _tmp96_ = FALSE;
4600
if ((_tmp96_ = _vala_strcmp0 (_tmp95_ = vala_gidl_parser_eval (self, nv[1]), "1") == 0, _g_free0 (_tmp95_), _tmp96_)) {
4601
gboolean _tmp97_ = FALSE;
4575
4602
vala_formal_parameter_set_direction (p, VALA_PARAMETER_DIRECTION_REF);
4576
4603
if (!array_requested) {
4577
_tmp96_ = VALA_IS_ARRAY_TYPE (param_type);
4604
_tmp97_ = VALA_IS_ARRAY_TYPE (param_type);
4582
4609
ValaArrayType* array_type;
4583
ValaDataType* _tmp97_;
4610
ValaDataType* _tmp98_;
4584
4611
array_type = _vala_code_node_ref0 (VALA_ARRAY_TYPE (param_type));
4585
param_type = (_tmp97_ = _vala_code_node_ref0 (vala_array_type_get_element_type (array_type)), _vala_code_node_unref0 (param_type), _tmp97_);
4586
vala_formal_parameter_set_parameter_type (p, param_type);
4612
param_type = (_tmp98_ = _vala_code_node_ref0 (vala_array_type_get_element_type (array_type)), _vala_code_node_unref0 (param_type), _tmp98_);
4613
vala_variable_set_variable_type ((ValaVariable*) p, param_type);
4587
4614
_vala_code_node_unref0 (array_type);
4591
4618
if (_vala_strcmp0 (nv[0], "nullable") == 0) {
4594
if ((_tmp99_ = _vala_strcmp0 (_tmp98_ = vala_gidl_parser_eval (self, nv[1]), "1") == 0, _g_free0 (_tmp98_), _tmp99_)) {
4621
if ((_tmp100_ = _vala_strcmp0 (_tmp99_ = vala_gidl_parser_eval (self, nv[1]), "1") == 0, _g_free0 (_tmp99_), _tmp100_)) {
4595
4622
vala_data_type_set_nullable (param_type, TRUE);
4598
4625
if (_vala_strcmp0 (nv[0], "transfer_ownership") == 0) {
4601
if ((_tmp101_ = _vala_strcmp0 (_tmp100_ = vala_gidl_parser_eval (self, nv[1]), "1") == 0, _g_free0 (_tmp100_), _tmp101_)) {
4628
if ((_tmp102_ = _vala_strcmp0 (_tmp101_ = vala_gidl_parser_eval (self, nv[1]), "1") == 0, _g_free0 (_tmp101_), _tmp102_)) {
4602
4629
vala_data_type_set_value_owned (param_type, TRUE);
4605
4632
if (_vala_strcmp0 (nv[0], "takes_ownership") == 0) {
4608
if ((_tmp103_ = _vala_strcmp0 (_tmp102_ = vala_gidl_parser_eval (self, nv[1]), "1") == 0, _g_free0 (_tmp102_), _tmp103_)) {
4635
if ((_tmp104_ = _vala_strcmp0 (_tmp103_ = vala_gidl_parser_eval (self, nv[1]), "1") == 0, _g_free0 (_tmp103_), _tmp104_)) {
4609
4636
vala_data_type_set_value_owned (param_type, TRUE);
4612
4639
if (_vala_strcmp0 (nv[0], "value_owned") == 0) {
4615
if ((_tmp105_ = _vala_strcmp0 (_tmp104_ = vala_gidl_parser_eval (self, nv[1]), "0") == 0, _g_free0 (_tmp104_), _tmp105_)) {
4642
if ((_tmp106_ = _vala_strcmp0 (_tmp105_ = vala_gidl_parser_eval (self, nv[1]), "0") == 0, _g_free0 (_tmp105_), _tmp106_)) {
4616
4643
vala_data_type_set_value_owned (param_type, FALSE);
4620
if ((_tmp107_ = _vala_strcmp0 (_tmp106_ = vala_gidl_parser_eval (self, nv[1]), "1") == 0, _g_free0 (_tmp106_), _tmp107_)) {
4647
if ((_tmp108_ = _vala_strcmp0 (_tmp107_ = vala_gidl_parser_eval (self, nv[1]), "1") == 0, _g_free0 (_tmp107_), _tmp108_)) {
4621
4648
vala_data_type_set_value_owned (param_type, TRUE);
4625
4652
if (_vala_strcmp0 (nv[0], "hidden") == 0) {
4628
if ((_tmp109_ = _vala_strcmp0 (_tmp108_ = vala_gidl_parser_eval (self, nv[1]), "1") == 0, _g_free0 (_tmp108_), _tmp109_)) {
4655
if ((_tmp110_ = _vala_strcmp0 (_tmp109_ = vala_gidl_parser_eval (self, nv[1]), "1") == 0, _g_free0 (_tmp109_), _tmp110_)) {
4629
4656
hide_param = TRUE;
4633
if ((_tmp111_ = _vala_strcmp0 (_tmp110_ = vala_gidl_parser_eval (self, nv[1]), "0") == 0, _g_free0 (_tmp110_), _tmp111_)) {
4660
if ((_tmp112_ = _vala_strcmp0 (_tmp111_ = vala_gidl_parser_eval (self, nv[1]), "0") == 0, _g_free0 (_tmp111_), _tmp112_)) {
4634
4661
show_param = TRUE;
4638
4665
if (_vala_strcmp0 (nv[0], "no_array_length") == 0) {
4641
if ((_tmp113_ = _vala_strcmp0 (_tmp112_ = vala_gidl_parser_eval (self, nv[1]), "1") == 0, _g_free0 (_tmp112_), _tmp113_)) {
4668
if ((_tmp114_ = _vala_strcmp0 (_tmp113_ = vala_gidl_parser_eval (self, nv[1]), "1") == 0, _g_free0 (_tmp113_), _tmp114_)) {
4642
4669
vala_formal_parameter_set_no_array_length (p, TRUE);
4645
4672
if (_vala_strcmp0 (nv[0], "array_length_type") == 0) {
4647
vala_formal_parameter_set_array_length_type (p, _tmp114_ = vala_gidl_parser_eval (self, nv[1]));
4648
_g_free0 (_tmp114_);
4674
vala_formal_parameter_set_array_length_type (p, _tmp115_ = vala_gidl_parser_eval (self, nv[1]));
4675
_g_free0 (_tmp115_);
4650
4677
if (_vala_strcmp0 (nv[0], "array_null_terminated") == 0) {
4653
if ((_tmp116_ = _vala_strcmp0 (_tmp115_ = vala_gidl_parser_eval (self, nv[1]), "1") == 0, _g_free0 (_tmp115_), _tmp116_)) {
4680
if ((_tmp117_ = _vala_strcmp0 (_tmp116_ = vala_gidl_parser_eval (self, nv[1]), "1") == 0, _g_free0 (_tmp116_), _tmp117_)) {
4654
4681
vala_formal_parameter_set_no_array_length (p, TRUE);
4655
4682
vala_formal_parameter_set_array_null_terminated (p, TRUE);
4658
4685
if (_vala_strcmp0 (nv[0], "array_length_pos") == 0) {
4660
4687
set_array_length_pos = TRUE;
4661
array_length_pos = g_ascii_strtod (_tmp117_ = vala_gidl_parser_eval (self, nv[1]), NULL);
4662
_g_free0 (_tmp117_);
4688
array_length_pos = g_ascii_strtod (_tmp118_ = vala_gidl_parser_eval (self, nv[1]), NULL);
4689
_g_free0 (_tmp118_);
4664
4691
if (_vala_strcmp0 (nv[0], "delegate_target_pos") == 0) {
4666
4693
set_delegate_target_pos = TRUE;
4667
delegate_target_pos = g_ascii_strtod (_tmp118_ = vala_gidl_parser_eval (self, nv[1]), NULL);
4668
_g_free0 (_tmp118_);
4694
delegate_target_pos = g_ascii_strtod (_tmp119_ = vala_gidl_parser_eval (self, nv[1]), NULL);
4695
_g_free0 (_tmp119_);
4670
4697
if (_vala_strcmp0 (nv[0], "type_name") == 0) {
4672
ValaUnresolvedSymbol* _tmp120_;
4699
ValaUnresolvedSymbol* _tmp121_;
4673
4700
ValaUnresolvedSymbol* sym;
4674
sym = (_tmp120_ = vala_unresolved_symbol_new (NULL, _tmp119_ = vala_gidl_parser_eval (self, nv[1]), NULL), _g_free0 (_tmp119_), _tmp120_);
4701
sym = (_tmp121_ = vala_unresolved_symbol_new (NULL, _tmp120_ = vala_gidl_parser_eval (self, nv[1]), NULL), _g_free0 (_tmp120_), _tmp121_);
4675
4702
if (VALA_IS_UNRESOLVED_TYPE (param_type)) {
4676
4703
vala_unresolved_type_set_unresolved_symbol (VALA_UNRESOLVED_TYPE (param_type), sym);
4678
ValaDataType* _tmp121_;
4679
vala_formal_parameter_set_parameter_type (p, param_type = (_tmp121_ = (ValaDataType*) vala_unresolved_type_new_from_symbol (sym, vala_code_node_get_source_reference ((ValaCodeNode*) return_type)), _vala_code_node_unref0 (param_type), _tmp121_));
4705
ValaDataType* _tmp122_;
4706
vala_variable_set_variable_type ((ValaVariable*) p, param_type = (_tmp122_ = (ValaDataType*) vala_unresolved_type_new_from_symbol (sym, vala_code_node_get_source_reference ((ValaCodeNode*) return_type)), _vala_code_node_unref0 (param_type), _tmp122_));
4681
4708
_vala_code_node_unref0 (sym);
4683
4710
if (_vala_strcmp0 (nv[0], "ctype") == 0) {
4685
vala_formal_parameter_set_ctype (p, _tmp122_ = vala_gidl_parser_eval (self, nv[1]));
4686
_g_free0 (_tmp122_);
4712
vala_formal_parameter_set_ctype (p, _tmp123_ = vala_gidl_parser_eval (self, nv[1]));
4713
_g_free0 (_tmp123_);
4688
4715
if (_vala_strcmp0 (nv[0], "type_arguments") == 0) {
4690
4717
gint _type_args_size_;
4691
4718
gint type_args_length1;
4694
4719
char** _tmp125_;
4695
4722
char** type_args;
4696
type_args = (_tmp126_ = (_tmp125_ = _tmp124_ = g_strsplit (_tmp123_ = vala_gidl_parser_eval (self, nv[1]), ",", 0), _g_free0 (_tmp123_), _tmp125_), type_args_length1 = _vala_array_length (_tmp124_), _type_args_size_ = type_args_length1, _tmp126_);
4723
type_args = (_tmp127_ = (_tmp126_ = _tmp125_ = g_strsplit (_tmp124_ = vala_gidl_parser_eval (self, nv[1]), ",", 0), _g_free0 (_tmp124_), _tmp126_), type_args_length1 = _vala_array_length (_tmp125_), _type_args_size_ = type_args_length1, _tmp127_);
4698
4725
char** type_arg_collection;
4699
4726
int type_arg_collection_length1;
4718
4745
val = vala_gidl_parser_eval (self, nv[1]);
4719
4746
if (_vala_strcmp0 (val, "null") == 0) {
4720
ValaNullLiteral* _tmp128_;
4721
vala_formal_parameter_set_default_expression (p, (ValaExpression*) (_tmp128_ = vala_null_literal_new (vala_code_node_get_source_reference ((ValaCodeNode*) param_type))));
4722
_vala_code_node_unref0 (_tmp128_);
4747
ValaNullLiteral* _tmp129_;
4748
vala_variable_set_initializer ((ValaVariable*) p, (ValaExpression*) (_tmp129_ = vala_null_literal_new (vala_code_node_get_source_reference ((ValaCodeNode*) param_type))));
4749
_vala_code_node_unref0 (_tmp129_);
4724
4751
if (_vala_strcmp0 (val, "true") == 0) {
4725
ValaBooleanLiteral* _tmp129_;
4726
vala_formal_parameter_set_default_expression (p, (ValaExpression*) (_tmp129_ = vala_boolean_literal_new (TRUE, vala_code_node_get_source_reference ((ValaCodeNode*) param_type))));
4727
_vala_code_node_unref0 (_tmp129_);
4752
ValaBooleanLiteral* _tmp130_;
4753
vala_variable_set_initializer ((ValaVariable*) p, (ValaExpression*) (_tmp130_ = vala_boolean_literal_new (TRUE, vala_code_node_get_source_reference ((ValaCodeNode*) param_type))));
4754
_vala_code_node_unref0 (_tmp130_);
4729
4756
if (_vala_strcmp0 (val, "false") == 0) {
4730
ValaBooleanLiteral* _tmp130_;
4731
vala_formal_parameter_set_default_expression (p, (ValaExpression*) (_tmp130_ = vala_boolean_literal_new (FALSE, vala_code_node_get_source_reference ((ValaCodeNode*) param_type))));
4732
_vala_code_node_unref0 (_tmp130_);
4757
ValaBooleanLiteral* _tmp131_;
4758
vala_variable_set_initializer ((ValaVariable*) p, (ValaExpression*) (_tmp131_ = vala_boolean_literal_new (FALSE, vala_code_node_get_source_reference ((ValaCodeNode*) param_type))));
4759
_vala_code_node_unref0 (_tmp131_);
4734
4761
if (_vala_strcmp0 (val, "") == 0) {
4735
ValaStringLiteral* _tmp131_;
4736
vala_formal_parameter_set_default_expression (p, (ValaExpression*) (_tmp131_ = vala_string_literal_new ("\"\"", vala_code_node_get_source_reference ((ValaCodeNode*) param_type))));
4737
_vala_code_node_unref0 (_tmp131_);
4762
ValaStringLiteral* _tmp132_;
4763
vala_variable_set_initializer ((ValaVariable*) p, (ValaExpression*) (_tmp132_ = vala_string_literal_new ("\"\"", vala_code_node_get_source_reference ((ValaCodeNode*) param_type))));
4764
_vala_code_node_unref0 (_tmp132_);
4739
4766
const char* endptr;
4740
4767
const char* val_end;
4742
4769
val_end = g_utf8_offset_to_pointer (val, g_utf8_strlen (val, -1));
4743
4770
strtol (val, &endptr, 0);
4744
4771
if (((glong) endptr) == ((glong) val_end)) {
4745
ValaIntegerLiteral* _tmp132_;
4746
vala_formal_parameter_set_default_expression (p, (ValaExpression*) (_tmp132_ = vala_integer_literal_new (val, vala_code_node_get_source_reference ((ValaCodeNode*) param_type))));
4747
_vala_code_node_unref0 (_tmp132_);
4772
ValaIntegerLiteral* _tmp133_;
4773
vala_variable_set_initializer ((ValaVariable*) p, (ValaExpression*) (_tmp133_ = vala_integer_literal_new (val, vala_code_node_get_source_reference ((ValaCodeNode*) param_type))));
4774
_vala_code_node_unref0 (_tmp133_);
4749
4776
g_ascii_strtod (val, &endptr);
4750
4777
if (((glong) endptr) == ((glong) val_end)) {
4751
ValaRealLiteral* _tmp133_;
4752
vala_formal_parameter_set_default_expression (p, (ValaExpression*) (_tmp133_ = vala_real_literal_new (val, vala_code_node_get_source_reference ((ValaCodeNode*) param_type))));
4753
_vala_code_node_unref0 (_tmp133_);
4778
ValaRealLiteral* _tmp134_;
4779
vala_variable_set_initializer ((ValaVariable*) p, (ValaExpression*) (_tmp134_ = vala_real_literal_new (val, vala_code_node_get_source_reference ((ValaCodeNode*) param_type))));
4780
_vala_code_node_unref0 (_tmp134_);
4755
gboolean _tmp134_ = FALSE;
4782
gboolean _tmp135_ = FALSE;
4756
4783
if (g_str_has_prefix (val, "\"")) {
4757
_tmp134_ = g_str_has_suffix (val, "\"");
4784
_tmp135_ = g_str_has_suffix (val, "\"");
4762
ValaStringLiteral* _tmp135_;
4763
vala_formal_parameter_set_default_expression (p, (ValaExpression*) (_tmp135_ = vala_string_literal_new (val, vala_code_node_get_source_reference ((ValaCodeNode*) param_type))));
4764
_vala_code_node_unref0 (_tmp135_);
4789
ValaStringLiteral* _tmp136_;
4790
vala_variable_set_initializer ((ValaVariable*) p, (ValaExpression*) (_tmp136_ = vala_string_literal_new (val, vala_code_node_get_source_reference ((ValaCodeNode*) param_type))));
4791
_vala_code_node_unref0 (_tmp136_);
4768
4795
char** member_collection;
4769
4796
int member_collection_length1;
4771
member_collection = _tmp136_ = g_strsplit (val, ".", 0);
4772
member_collection_length1 = _vala_array_length (_tmp136_);
4773
for (member_it = 0; member_it < _vala_array_length (_tmp136_); member_it = member_it + 1) {
4798
member_collection = _tmp137_ = g_strsplit (val, ".", 0);
4799
member_collection_length1 = _vala_array_length (_tmp137_);
4800
for (member_it = 0; member_it < _vala_array_length (_tmp137_); member_it = member_it + 1) {
4775
4802
member = g_strdup (member_collection[member_it]);
4777
ValaMemberAccess* _tmp137_;
4778
vala_formal_parameter_set_default_expression (p, (ValaExpression*) (_tmp137_ = vala_member_access_new (vala_formal_parameter_get_default_expression (p), member, vala_code_node_get_source_reference ((ValaCodeNode*) param_type))));
4779
_vala_code_node_unref0 (_tmp137_);
4804
ValaMemberAccess* _tmp138_;
4805
vala_variable_set_initializer ((ValaVariable*) p, (ValaExpression*) (_tmp138_ = vala_member_access_new (vala_variable_get_initializer ((ValaVariable*) p), member, vala_code_node_get_source_reference ((ValaCodeNode*) param_type))));
4806
_vala_code_node_unref0 (_tmp138_);
4780
4807
_g_free0 (member);