Plugins/CheckerPlugins/SyntaxChecker/SyntaxCheck.py

branch
Py2 comp.
changeset 3525
66f4b8646622
parent 3515
1b8381afe38f
child 3544
431c842fd09a
--- a/Plugins/CheckerPlugins/SyntaxChecker/SyntaxCheck.py	Mon Apr 21 16:37:10 2014 +0200
+++ b/Plugins/CheckerPlugins/SyntaxChecker/SyntaxCheck.py	Mon Apr 21 19:20:27 2014 +0200
@@ -7,6 +7,7 @@
 """
 Module implementing the syntax check for Python 2/3.
 """
+import ast
 import re
 import sys
 import traceback
@@ -111,8 +112,8 @@
             template = quixote.ptl_compile.Template(codestring, file_enc)
             template.compile()
         else:
-            # ast.PyCF_ONLY_AST = 1024, speed optimisation
-            module = builtins.compile(codestring, file_enc, 'exec', 1024)
+            module = builtins.compile(
+                codestring, file_enc, 'exec', ast.PyCF_ONLY_AST)
     except SyntaxError as detail:
         index = 0
         code = ""

eric ide

mercurial