Parse code to an AST with the current compiler flags active. Arguments are exactly the same as ast.parse (in the standard library), and are passed to the built-in compile function.
(self, source, filename='<unknown>', symbol='exec')
| 94 | |
| 95 | |
| 96 | def ast_parse(self, source, filename='<unknown>', symbol='exec'): |
| 97 | """Parse code to an AST with the current compiler flags active. |
| 98 | |
| 99 | Arguments are exactly the same as ast.parse (in the standard library), |
| 100 | and are passed to the built-in compile function.""" |
| 101 | return compile(source, filename, symbol, self.flags | PyCF_ONLY_AST, 1) |
| 102 | |
| 103 | def reset_compiler_flags(self): |
| 104 | """Reset compiler flags to default state.""" |
no outgoing calls
no test coverage detected