invalid for loops completion should work now

This commit is contained in:
David Halter committed 2012-10-01 09:51:57 +02:00
1 parent eda2430ad7
commit 74fe520597
3 files changed
+12 -1

No files matched your search

+2 -1
View File
@@ -1691,7 +1691,8 @@ class PyFuzzyParser(object):
if tok == 'in':
statement, tok = self._parse_statement()
if tok == ':':
f = ForFlow([statement], first_pos, set_stmt)
s = [] if statement is None else [statement]
f = ForFlow(s, first_pos, set_stmt)
self.scope = self.scope.add_statement(f)
elif tok in ['if', 'while', 'try', 'with'] + extended_flow: