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')
| 79 | self._filename_map = {} |
| 80 | |
| 81 | def ast_parse(self, source, filename='<unknown>', symbol='exec'): |
| 82 | """Parse code to an AST with the current compiler flags active. |
| 83 | |
| 84 | Arguments are exactly the same as ast.parse (in the standard library), |
| 85 | and are passed to the built-in compile function.""" |
| 86 | return compile(source, filename, symbol, self.flags | PyCF_ONLY_AST, 1) |
| 87 | |
| 88 | def reset_compiler_flags(self): |
| 89 | """Reset compiler flags to default state.""" |
no outgoing calls
no test coverage detected