Commits

Amaury Forgeot d'Arc committed f3c8ea0

Use a slightly more robust code structure

  • Participants
  • Parent commits 8abe7f2
  • Branches compile-from-stream

Comments (0)

Files changed (1)

File pypy/interpreter/pyparser/future.py

                 except KeyError:
                     pass
                 pos = elem.lineno, elem.col_offset
+            continue
         elif isinstance(elem, ast.Expr):
-            if found_docstring:
-                break
-            if isinstance(elem.value, ast.Str):
+            if not found_docstring and isinstance(elem.value, ast.Str):
                 found_docstring = True
-        else:
-            break
+                continue
+        break
     return flags, pos
 
 class FutureFlags(object):