7static STR token_type_strs[] = {
14 return token_type_strs[type];
23 case PS_TOKEN_LIT_STR: {
24 printf(
"\"%.*s\"", (
int)self->length, self->start);
27 case PS_TOKEN_LIT_STR_INTERP: {
28 printf(
"\"%.*s\"", (
int)self->length, self->start);
32 printf(
"%.*s", (
int)self->length, self->start);
37 ps_loc_print(&self->loc, 0);
Retrieval of associated data from custom enum (see enum.h).
#define PS_PRINT_IMPL(T,...)
STR ps_token_type_to_string(enum ps_token_type type)
Returns: the string representation of the given token type type.
ps_token_type
The type of a token.