21 .
id =
"frontend-editor",
25 .desc =
"ImGui based frontend for the Cthulhu Compiler Collection",
26 .author =
"Elliot Haisley",
46 const char *path = sources.get_path(index);
49 char *ext =
str_ext(path, arena);
52 return str_format(arena,
"could not determine file extension for '%s'", path);
59 return str_format(arena,
"could not find language for `%s` by extension `%s`", basepath, ext);
62 io_t *io = sources.get_io(index);
69 void Broker::init_support()
bool check_reports() const
check if there are any reports
Broker(loader_t *loader, const char *name)
char * parse_source(size_t index)
parse a source file
CT_BROKER_API void broker_parse(language_runtime_t *runtime, io_t *io)
CT_BROKER_API broker_t * broker_new(const frontend_t *frontend, arena_t *arena)
CT_BROKER_API logger_t * broker_get_logger(broker_t *broker)
#define CT_NEW_VERSION(major, minor, patch)
creates a new ctu_version_t from major, minor and patch
CT_MEMORY_API arena_t * get_global_arena(void)
get the global memory arena
CT_SUPPORT_API language_runtime_t * support_get_lang(support_t *support, const char *ext)
CT_SUPPORT_API void support_load_default_modules(support_t *support)
load all default modules
CT_SUPPORT_API support_t * support_new(broker_t *broker, loader_t *loader, arena_t *arena)
create a support instance from an existing loader and broker configures the broker with the modules i...
CT_NODISCARD CT_NOTIFY_API typevec_t * logger_get_events(const logger_t *logs)
get the events from the logger
CT_NODISCARD CT_STD_API char * str_filename(const char *path, arena_t *arena)
get the filename from a path
CT_NODISCARD CT_STD_API char * str_ext(const char *path, arena_t *arena)
get the last file extension from a path
CT_NODISCARD CT_PUREFN CT_STD_API size_t typevec_len(const typevec_t *vec)
get the length of a vector
STA_DECL char * str_format(arena_t *arena, const char *fmt,...)
the frontend running the mediator
module_info_t info
information about the frontend
const char * id
unique id for the module
A vector with a fixed type size.