From 51018ab80b945523dc678b80d4dd28191b3fd50c Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Wed, 3 Aug 2016 19:01:22 +0300 Subject: [PATCH] Do not output statement separators in print_tokens --- mysql2sql/print_tokens.py | 2 -- scripts/print_subtree.py | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/mysql2sql/print_tokens.py b/mysql2sql/print_tokens.py index 2024c67..0f03d03 100644 --- a/mysql2sql/print_tokens.py +++ b/mysql2sql/print_tokens.py @@ -16,8 +16,6 @@ def print_tokens(token_list, outfile=sys.stdout, level=0): outfile.write(token.normalized) if isinstance(token, TokenList): print_tokens(token, outfile, level+1) - if level == 0: - outfile.write(';\n') def get_tokens_str(token_list): diff --git a/scripts/print_subtree.py b/scripts/print_subtree.py index 84ea88a..f1da6de 100755 --- a/scripts/print_subtree.py +++ b/scripts/print_subtree.py @@ -18,6 +18,7 @@ def test(): for parsed in parse(query): requote_names(parsed) print_tokens(parsed) + print() parsed._pprint_tree() print("----------") @@ -26,6 +27,7 @@ def main(query): parsed = parse(query)[0] requote_names(parsed) print_tokens(parsed) + print() parsed._pprint_tree() if __name__ == '__main__': -- 2.39.5