From: Oleg Broytman Date: Wed, 3 Aug 2016 16:01:22 +0000 (+0300) Subject: Do not output statement separators in print_tokens X-Git-Tag: 0.0.1~44 X-Git-Url: https://git.phdru.name/?a=commitdiff_plain;h=51018ab80b945523dc678b80d4dd28191b3fd50c;p=sqlconvert.git Do not output statement separators in print_tokens --- 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__':