2026-03-10 19:12:14 +00:00
|
|
|
#ifndef XPCG_CTX_H_
|
|
|
|
|
#define XPCG_CTX_H_
|
2026-02-26 19:44:21 +00:00
|
|
|
|
|
|
|
|
#include "type.h"
|
|
|
|
|
|
|
|
|
|
struct ctx {
|
|
|
|
|
struct type ctx_builtin_types[TYPE_OTHER];
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
extern struct ctx *ctx_create(void);
|
|
|
|
|
extern void ctx_destroy(struct ctx *ctx);
|
|
|
|
|
|
|
|
|
|
extern const struct type *ctx_get_type(struct ctx *ctx, const char *name);
|
|
|
|
|
extern const struct type *ctx_get_builtin_type(
|
|
|
|
|
struct ctx *ctx,
|
|
|
|
|
enum type_id id);
|
|
|
|
|
|
|
|
|
|
#endif
|