54 lines
1.2 KiB
C
54 lines
1.2 KiB
C
#ifndef _SPHO_BIND_H
|
|
#define _SPHO_BIND_H
|
|
|
|
#include <sys/queue.h>
|
|
|
|
#include "spho/scope.h"
|
|
|
|
#define SPHO_BIND_UNDECLARED 0x0
|
|
#define SPHO_BIND_UNDEFINED 0x01
|
|
#define SPHO_BIND_TP 0x11
|
|
#define SPHO_BIND_TP_OP 0x12
|
|
#define SPHO_BIND_MEMB_TP 0x13
|
|
|
|
union spho_prebind_val {
|
|
const void *undef;
|
|
const struct spho_tp *tp;
|
|
const struct spho_tp_op *op;
|
|
};
|
|
|
|
struct spho_prebind_pair {
|
|
const struct spho_nom *nom;
|
|
|
|
int kind;
|
|
union spho_prebind_val val;
|
|
};
|
|
|
|
struct spho_prebind {
|
|
struct spho_scope *sc;
|
|
|
|
size_t sz;
|
|
struct spho_prebind_pair *binds;
|
|
};
|
|
|
|
struct spho_prebind *spho_prebind_create(struct spho_scope *);
|
|
|
|
int spho_prebind_undef(struct spho_prebind *, const struct spho_nom *);
|
|
int spho_prebind_tp(struct spho_prebind *, const struct spho_nom *,
|
|
const struct spho_tp *);
|
|
int spho_prebind_tp_op(struct spho_prebind *, const struct spho_nom *,
|
|
const struct spho_tp_op *);
|
|
int spho_prebind_member_tp(struct spho_prebind *, const struct spho_nom *,
|
|
const struct spho_tp *);
|
|
|
|
struct spho_prebind *spho_prebind_dupl(const struct spho_prebind *);
|
|
|
|
void spho_prebind_free(struct spho_prebind *);
|
|
|
|
|
|
struct spho_bind {
|
|
struct spho_prebind *loc;
|
|
struct spho_bind *parent;
|
|
};
|
|
|
|
#endif
|