/*
- * declarations.c
+ * types.c
*
* BabelTrace - Converter
*
return scope;
}
+GQuark new_definition_path(struct definition_scope *parent_scope, GQuark field_name)
+{
+ GQuark path;
+ GString *str;
+ gchar *c_str;
+ int i;
+
+ str = g_string_new("");
+ if (parent_scope) {
+ for (i = 0; i < parent_scope->scope_path->len; i++) {
+ GQuark q = g_array_index(parent_scope->scope_path,
+ GQuark, i);
+
+ g_string_append(str, g_quark_to_string(q));
+ g_string_append(str, ".");
+ }
+ }
+ g_string_append(str, g_quark_to_string(field_name));
+ c_str = g_string_free(str, FALSE);
+ path = g_quark_from_string(c_str);
+ g_free(c_str);
+ return path;
+}
+
struct definition_scope *
new_definition_scope(struct definition_scope *parent_scope,
GQuark field_name)