MCPcopy Create free account
hub / github.com/F-Stack/f-stack / token_error

Function token_error

app/redis-6.2.6/deps/jemalloc/test/unit/stats_print.c:53–73  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

51}
52
53static void
54token_error(token_t *token) {
55 if (!token->parser->verbose) {
56 return;
57 }
58 switch (token->token_type) {
59 case TOKEN_TYPE_NONE:
60 not_reached();
61 case TOKEN_TYPE_ERROR:
62 malloc_printf("%zu:%zu: Unexpected character in token: ",
63 token->line, token->col);
64 break;
65 default:
66 malloc_printf("%zu:%zu: Unexpected token: ", token->line,
67 token->col);
68 break;
69 }
70 UNUSED ssize_t err = malloc_write_fd(STDERR_FILENO,
71 &token->parser->buf[token->pos], token->len);
72 malloc_printf("\n");
73}
74
75static void
76parser_init(parser_t *parser, bool verbose) {

Callers 1

parser_parseFunction · 0.85

Calls 2

malloc_printfFunction · 0.85
malloc_write_fdFunction · 0.85

Tested by

no test coverage detected