mirror of
https://github.com/NikitaIvanovV/ctpv.git
synced 2025-06-21 10:27:48 +02:00
Print values in debug mode
This commit is contained in:
parent
6b5b6bc91c
commit
8ee70e735e
13
src/config.c
13
src/config.c
@ -261,7 +261,18 @@ static int parse(void)
|
|||||||
next_token();
|
next_token();
|
||||||
if (token.type == TOK_EOF)
|
if (token.type == TOK_EOF)
|
||||||
break;
|
break;
|
||||||
printf("%s\n", lexer_token_type_str(token.type));
|
printf("%s", lexer_token_type_str(token.type));
|
||||||
|
switch (token.type) {
|
||||||
|
case TOK_INT:
|
||||||
|
printf(": %d\n", token.val.i);
|
||||||
|
break;
|
||||||
|
case TOK_STR:
|
||||||
|
printf(": %s\n", token.val.s);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
puts("");
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user