| 1234567891011121314151617181920212223242526272829303132333435363738 |
- #ifndef _PLY_SYM_H
- #define _PLY_SYM_H
- #include <stdint.h>
- struct func;
- struct node;
- struct type;
- struct symtab;
- struct sym {
- struct symtab *st;
- const char *name;
- const struct func *func;
- struct type *type;
- /* irstate_t irs; */
- };
- struct symtab {
- struct sym **syms;
- size_t len;
- };
- #define symtab_foreach(_st, _sym) \
- for((_sym) = (_st)->syms; (_sym) < &(_st)->syms[(_st)->len]; (_sym)++)
- struct sym *sym_alloc(struct symtab *st, struct node *n,
- const struct func *func);
- void sym_dump(struct sym *sym, FILE *fp);
- void symtab_dump(struct symtab *st, FILE *fp);
- #endif /* _PLY_SYM_H */
|