15 int result = mpz_init_set_str(integer, text, base);
20 msg_notify(ctx->
reports, &kEvent_InvalidIntegerLiteral, &node,
"invalid integer literal");
CT_NODISCARD CT_PUREFN CT_SCAN_API arena_t * scan_get_arena(const scan_t *scan)
get the arena of a scanner
CT_NODISCARD CT_PUREFN CT_SCAN_API void * scan_get_context(const scan_t *scan)
get the context of a scanner
CT_EVENTS_API void evt_scan_error(logger_t *logger, const node_t *node, const char *msg)
signal that a scan error has occurred
CT_NODISCARD CT_SCAN_API node_t node_make(const scan_t *scan, where_t where)
create a new node on the stack
#define CT_UNUSED(x)
mark a variable as unused
CT_NOTIFY_API event_builder_t msg_notify(INOUT_NOTNULL logger_t *logs, const diagnostic_t *diagnostic, const node_t *node, STA_FORMAT_STRING const char *fmt,...)
notify the logger of a new message
CT_BEGIN_API CT_UTIL_API text_t util_text_escape(logger_t *reports, const node_t *node, STA_READS(length) const char *text, size_t length, arena_t *arena)
escape a string literal into a string
void query_parse_string(text_t *string, scan_t *scan, where_t where, const char *text, size_t length)
void query_parse_integer(mpz_t integer, scan_t *scan, where_t where, const char *text, int base)
void queryerror(where_t *where, void *state, scan_t *scan, const char *msg)
query_scan_t * query_scan_context(scan_t *scan)
a position in a source file
a location inside a scanner locations are inclusive and 0-based