36 lines
673 B
C
36 lines
673 B
C
#ifndef MIE_FUNC_H_
|
|
#define MIE_FUNC_H_
|
|
|
|
#include <mie/value.h>
|
|
|
|
struct mie_type;
|
|
struct mie_arg;
|
|
struct b_dict;
|
|
|
|
enum mie_func_type {
|
|
MIE_FUNC_NONE = 0x00u,
|
|
MIE_FUNC_STATIC = 0x01u,
|
|
MIE_FUNC_INSTANCE = 0x02u,
|
|
MIE_FUNC_LAMBDA = 0x03u,
|
|
};
|
|
|
|
struct mie_func {
|
|
struct mie_value f_base;
|
|
|
|
struct b_dict *f_named_values;
|
|
enum mie_func_type f_type;
|
|
|
|
struct mie_type *f_ret;
|
|
|
|
b_queue f_args;
|
|
b_queue f_blocks;
|
|
};
|
|
|
|
extern struct mie_func *mie_func_create(
|
|
const char *name, enum mie_func_type type, struct mie_type *ret_type,
|
|
struct mie_arg **args, unsigned int nr_args);
|
|
extern char *mie_func_generate_value_name(
|
|
struct mie_func *func, const char *name_hint);
|
|
|
|
#endif
|