starting to add code for name bindings

This commit is contained in:
Ellen Arvidsson 2025-05-23 14:02:51 +02:00
parent 15fc99b8c8
commit 55970b1baf
8 changed files with 131 additions and 59 deletions

29
include/spho/bind.h Normal file
View file

@ -0,0 +1,29 @@
#ifndef _SPHO_BIND_H
#define _SPHO_BIND_H
#include <sys/queue.h>
#include "spho/scope.h"
struct spho_binding {
struct spho_nom *nom;
struct spho_tp *tp;
STAILQ_ENTRY(spho_binding) entries;
};
struct spho_bind {
STAILQ_HEAD(spho_binding_l, spho_binding) head;
struct spho_ctx *ctx;
struct spho_bind *parent;
};
struct spho_bind *spho_bind_create(struct spho_ctx *, struct spho_bind *);
int spho_bind_add(struct spho_bind *, struct spho_nom *, struct spho_tp *);
void spho_bind_destroy(struct spho_bind *);
#endif