5 #include <ctu_events_api.h>
19 #define CTU_EVENT(name, ...) CT_EVENTS_API extern const diagnostic_t kEvent_##name;
#define CT_NODISCARD
mark a function as returning a value that must be used
#define IN_NOTNULL
annotate a parameter as not being null
#define CT_CONSTFN
mark a function as const, has no side effects and always returns the same value for the same argument...
#define IN_STRING
annotate a parameter as being a null terminated string
CT_EVENTS_API void evt_scan_unknown(logger_t *logger, const node_t *node, const char *msg)
signal that a scanner has encountered an unknown token
CT_NODISCARD CT_CONSTFN CT_EVENTS_API diagnostic_list_t get_common_diagnostics(void)
get all common diagnostics
CT_EVENTS_API event_builder_t evt_os_error(logger_t *logger, const diagnostic_t *diagnostic, os_error_t error, const char *msg)
signal that an os error has occurred
CT_EVENTS_API event_builder_t evt_symbol_shadowed(logger_t *logger, const char *name, const node_t *prev, const node_t *next)
signal that a declaration would shadow a previous declaration
CT_EVENTS_API void evt_scan_error(logger_t *logger, const node_t *node, const char *msg)
signal that a scan error has occurred
an event builder handles adding additional information to an event
a position in a source file