common: implement ident and selector manipulation

This commit is contained in:
2024-12-13 12:25:40 +00:00
parent 24d443b818
commit 0a8d913fdd
5 changed files with 201 additions and 7 deletions
+23
View File
@@ -0,0 +1,23 @@
#ifndef IVY_IDENT_H_
#define IVY_IDENT_H_
#include <blue/core/queue.h>
#include <ivy/misc.h>
#include <stddef.h>
struct ivy_ident_part {
char *p_str;
b_queue_entry p_entry;
};
struct ivy_ident {
b_queue id_parts;
};
IVY_API struct ivy_ident *ivy_ident_create(void);
IVY_API void ivy_ident_destroy(struct ivy_ident *ident);
IVY_API void ivy_ident_add_part(struct ivy_ident *ident, const char *s);
IVY_API size_t ivy_ident_to_string(const struct ivy_ident *ident, char *out, size_t max);
#endif