sphophi decorating with types

This commit is contained in:
Ellen Arvidsson 2025-05-01 18:16:10 +02:00
parent 17be15d7b5
commit a22c9726cd
19 changed files with 1762 additions and 380 deletions

33
include/msph/decor.h Normal file
View file

@ -0,0 +1,33 @@
#ifndef _MSPH_DECOR_H
#define _MSPH_DECOR_H
struct msph_tp_decor {
struct spho_tp *tp;
};
#define TP_DECOR_INIT(ptr) \
do { \
(ptr)->tp = NULL; \
} while (0)
struct msph_scope_decor {
struct spho_scope *sc;
};
#define SCOPE_DECOR_INIT(ptr) \
do { \
(ptr)->sc = NULL; \
} while (0)
struct msph_nom_decor {
struct spho_nom *nom;
};
#define NOM_DECOR_INIT(ptr) \
do { \
(ptr)->nom = NULL; \
} while (0)
#define GET_SCOPE(ptr) ((ptr)->dec.sc)
#endif /* _MSPH_DECOR_H */