mirror of
https://github.com/NikitaIvanovV/ctpv.git
synced 2024-11-28 07:23:07 +01: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();
|
||||
if (token.type == TOK_EOF)
|
||||
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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user