broken code, but added attempt at writing grammar
This commit is contained in:
parent
fb95e5d026
commit
20e3757f44
18 changed files with 1145 additions and 142 deletions
34
include/spho/scope.h
Normal file
34
include/spho/scope.h
Normal file
|
@ -0,0 +1,34 @@
|
|||
#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 */
|
Loading…
Add table
Add a link
Reference in a new issue