Testing building json objects in C

This commit is contained in:
2023-06-25 23:52:45 +01:00
parent c4caa1bb84
commit 3ded1d2708
3 changed files with 62 additions and 14 deletions

View File

@@ -35,17 +35,14 @@ int main(int argc, char *argv[]) {
return EXIT_FAILURE;
}
token_t token = get_next_token(lexer, json);
while (token.type != TK_NO_TOKEN) {
print_token(token);
token_t token = get_next_token(lexer, json);
while (token.type != TK_NO_TOKEN) {
print_token(token);
token = get_next_token(lexer, NULL);
}
token = get_next_token(lexer, NULL);
}
lexer_free(&lexer);
// printf("\n%35s: %s\n", filename, validate_json(json) ? "VALID" :
// "INVALID");
return EXIT_SUCCESS;
}