void vala_ccode_file_add_include (ValaCCodeFile* self, const gchar* filename, gboolean local) { ValaSet* _tmp0_; const gchar* _tmp1_; gboolean _tmp2_ = FALSE; g_return_if_fail (self != NULL); g_return_if_fail (filename != NULL); _tmp0_ = self->priv->includes; _tmp1_ = filename; _tmp2_ = vala_collection_contains ((ValaCollection*) _tmp0_, _tmp1_); if (!_tmp2_) { ValaCCodeFragment* _tmp3_; const gchar* _tmp4_; gboolean _tmp5_; ValaCCodeIncludeDirective* _tmp6_; ValaCCodeIncludeDirective* _tmp7_; ValaSet* _tmp8_; const gchar* _tmp9_; _tmp3_ = self->priv->include_directives; _tmp4_ = filename; _tmp5_ = local; _tmp6_ = vala_ccode_include_directive_new (_tmp4_, _tmp5_); _tmp7_ = _tmp6_; vala_ccode_fragment_append (_tmp3_, (ValaCCodeNode*) _tmp7_); _vala_ccode_node_unref0 (_tmp7_); _tmp8_ = self->priv->includes; _tmp9_ = filename; vala_collection_add ((ValaCollection*) _tmp8_, _tmp9_); } }
void vala_tuple_add_expression (ValaTuple* self, ValaExpression* expr) { ValaList* _tmp0_; ValaExpression* _tmp1_; g_return_if_fail (self != NULL); g_return_if_fail (expr != NULL); _tmp0_ = self->priv->expression_list; _tmp1_ = expr; vala_collection_add ((ValaCollection*) _tmp0_, _tmp1_); }
/** * Append the specified statement to the list of statements. */ void vala_ccode_block_add_statement (ValaCCodeBlock* self, ValaCCodeNode* statement) { ValaList* _tmp0_; ValaCCodeNode* _tmp1_; g_return_if_fail (self != NULL); g_return_if_fail (statement != NULL); _tmp0_ = self->priv->statements; _tmp1_ = statement; vala_collection_add ((ValaCollection*) _tmp0_, _tmp1_); }
gboolean vala_ccode_file_add_declaration (ValaCCodeFile* self, const gchar* name) { gboolean result = FALSE; ValaSet* _tmp0_; const gchar* _tmp1_; gboolean _tmp2_ = FALSE; ValaSet* _tmp3_; const gchar* _tmp4_; g_return_val_if_fail (self != NULL, FALSE); g_return_val_if_fail (name != NULL, FALSE); _tmp0_ = self->priv->declarations; _tmp1_ = name; _tmp2_ = vala_collection_contains ((ValaCollection*) _tmp0_, _tmp1_); if (_tmp2_) { result = TRUE; return result; } _tmp3_ = self->priv->declarations; _tmp4_ = name; vala_collection_add ((ValaCollection*) _tmp3_, _tmp4_); result = FALSE; return result; }
static void vala_ccode_file_get_symbols_from_fragment (ValaCCodeFile* self, ValaList* symbols, ValaCCodeFragment* fragment) { g_return_if_fail (self != NULL); g_return_if_fail (symbols != NULL); g_return_if_fail (fragment != NULL); { ValaCCodeFragment* _tmp0_; ValaList* _tmp1_ = NULL; ValaList* _node_list; ValaList* _tmp2_; gint _tmp3_; gint _tmp4_; gint _node_size; gint _node_index; _tmp0_ = fragment; _tmp1_ = vala_ccode_fragment_get_children (_tmp0_); _node_list = _tmp1_; _tmp2_ = _node_list; _tmp3_ = vala_collection_get_size ((ValaCollection*) _tmp2_); _tmp4_ = _tmp3_; _node_size = _tmp4_; _node_index = -1; while (TRUE) { gint _tmp5_; gint _tmp6_; gint _tmp7_; ValaList* _tmp8_; gint _tmp9_; gpointer _tmp10_ = NULL; ValaCCodeNode* node; ValaCCodeNode* _tmp11_; _tmp5_ = _node_index; _node_index = _tmp5_ + 1; _tmp6_ = _node_index; _tmp7_ = _node_size; if (!(_tmp6_ < _tmp7_)) { break; } _tmp8_ = _node_list; _tmp9_ = _node_index; _tmp10_ = vala_list_get (_tmp8_, _tmp9_); node = (ValaCCodeNode*) _tmp10_; _tmp11_ = node; if (VALA_IS_CCODE_FRAGMENT (_tmp11_)) { ValaList* _tmp12_; ValaCCodeNode* _tmp13_; _tmp12_ = symbols; _tmp13_ = node; vala_ccode_file_get_symbols_from_fragment (self, _tmp12_, VALA_CCODE_FRAGMENT (_tmp13_)); } else { ValaCCodeNode* _tmp14_; ValaCCodeFunction* _tmp15_; ValaCCodeFunction* func; ValaCCodeFunction* _tmp16_; _tmp14_ = node; _tmp15_ = _vala_ccode_node_ref0 (VALA_IS_CCODE_FUNCTION (_tmp14_) ? ((ValaCCodeFunction*) _tmp14_) : NULL); func = _tmp15_; _tmp16_ = func; if (_tmp16_ != NULL) { ValaList* _tmp17_; ValaCCodeFunction* _tmp18_; const gchar* _tmp19_; const gchar* _tmp20_; _tmp17_ = symbols; _tmp18_ = func; _tmp19_ = vala_ccode_function_get_name (_tmp18_); _tmp20_ = _tmp19_; vala_collection_add ((ValaCollection*) _tmp17_, _tmp20_); } _vala_ccode_node_unref0 (func); } _vala_ccode_node_unref0 (node); } _vala_iterable_unref0 (_node_list); } }