py/parse: Pass in an mp_print_t to mp_parse_node_print.

So the output can be redirected if needed.

Signed-off-by: Damien George <damien@micropython.org>
This commit is contained in:
Damien George
2020-09-11 23:00:03 +10:00
parent 85f2b239d8
commit acdb0608b7
3 changed files with 20 additions and 20 deletions

View File

@@ -133,7 +133,7 @@ STATIC int execute_from_lexer(int source_kind, const void *source, mp_parse_inpu
// allow to print the parse tree in the coverage build
if (mp_verbose_flag >= 3) {
printf("----------------\n");
mp_parse_node_print(parse_tree.root, 0);
mp_parse_node_print(&mp_plat_print, parse_tree.root, 0);
printf("----------------\n");
}
#endif