aboutsummaryrefslogtreecommitdiff
path: root/storage.h
blob: a3509c532a166a5f8580f9e1bcefe52024dfd030 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#ifndef STORAGE_H
#define STORAGE_H

#include "lex.h"
#include "prv.h"
#include <stddef.h>

struct stentry
{
    const struct tk *tk;
    const struct type *t;
    size_t offset;
};

struct storage
{
    const char *name;
    const struct tk *tk;
    struct stentry *entries;
    size_t nentries, offset;
    int check;
};

int storage(const struct lex *l, struct prv *p, const char *name, int check,
    struct storage **out);
const struct stentry *storage_find(const char *name, const struct storage *s);
void storage_free(struct storage *s);

#endif