#ifndef _SPHO_SCOPE_H #define _SPHO_SCOPE_H #include "spho/data.h" SLIST_HEAD(spho_scope_l, spho_scope); struct spho_scope { struct spho_ctx *ctx; struct spho_scope *parent; struct spho_scope_l subs; struct spho_nom_l noms; SLIST_ENTRY(spho_scope) next; }; #define SPHO_SC_ERR(sc, err) SPHO_ERR((sc)->ctx, (err)) int spho_scope_init(struct spho_scope *, struct spho_ctx *, struct spho_scope *); void spho_scope_term(struct spho_scope *); struct spho_scope *spho_scope_global(struct spho_ctx *); struct spho_scope *spho_scope_create(struct spho_scope *); void spho_scope_destroy(struct spho_scope *); struct spho_nom *spho_scope_nom_add(struct spho_scope *, const char *, size_t); int spho_scope_nom_get(struct spho_scope *, const char *, size_t, struct spho_nom **); // int spho_scope_nom_del(struct spho_nom *); #endif /* _SPHO_SCOPE_H */