X-Git-Url: https://git.phdru.name/?a=blobdiff_plain;f=mysql2sql%2Fprocess_tokens.py;h=9e1e760a3e4e65461511457f1994275b0339c4e7;hb=191f720863f5eb59af3162447de9a5a6f66ea59f;hp=7e323543f81f9baa5f65444e7edc8327e16d7eb7;hpb=890d2e6aff8c2cfe3ceaaa6f5c563a07d3bb0fb6;p=sqlconvert.git diff --git a/mysql2sql/process_tokens.py b/mysql2sql/process_tokens.py index 7e32354..9e1e760 100644 --- a/mysql2sql/process_tokens.py +++ b/mysql2sql/process_tokens.py @@ -42,7 +42,7 @@ class StatementGrouper(object): self.process_lines() def process_lines(self): - statements = parse('\n'.join(self.lines)) + statements = parse(''.join(self.lines)) last_stmt = statements[-1] for i in xrange(len(last_stmt.tokens) - 1, 0, -1): token = last_stmt.tokens[i] @@ -64,7 +64,7 @@ class StatementGrouper(object): def close(self): if not self.lines: return - tokens = parse('\n'.join(self.lines)) + tokens = parse(''.join(self.lines)) for token in tokens: if (token.ttype not in (Comment.Single, Comment.Multiline, Newline, Whitespace)):