]> git.phdru.name Git - sqlconvert.git/blobdiff - demo/demo-process.py
Make process_statement() a generator
[sqlconvert.git] / demo / demo-process.py
index 2c93338c8e454064cb3b8d4747d0c5d38ea5bce9..a81f93ef1787cf1bae3658fa1a82a1ac757e8365 100755 (executable)
@@ -15,10 +15,10 @@ def process_lines(*lines):
             print("----- -----")
             if find_error(statement):
                 print("ERRORS IN QUERY")
-            process_statement(statement)
-            print_tokens(statement, encoding='utf-8')
-            print()
-            statement._pprint_tree()
+            for statement in process_statement(statement):
+                print_tokens(statement, encoding='utf-8')
+                print()
+                statement._pprint_tree()
             print("-----/-----")
     tokens = grouper.close()
     if tokens: