| 169 | } |
| 170 | |
| 171 | bool CompileSourceFile::pythonAPI_() { |
| 172 | #ifdef SURELOG_WITH_PYTHON |
| 173 | if (getCommandLineParser()->pythonListener()) { |
| 174 | m_pythonListener = new PythonListen(m_parser, this); |
| 175 | if (!m_pythonListener->listen()) { |
| 176 | return false; |
| 177 | } |
| 178 | bool fatalErrors = m_errors->hasFatalErrors(); |
| 179 | if (fatalErrors) { |
| 180 | return false; |
| 181 | } |
| 182 | } |
| 183 | |
| 184 | if (getCommandLineParser()->pythonEvalScriptPerFile()) { |
| 185 | PythonAPI::evalScriptPerFile( |
| 186 | FileSystem::getInstance()->toPath( |
| 187 | getCommandLineParser()->pythonEvalScriptPerFileId()), |
| 188 | m_errors, m_parser->getFileContent(), m_interpState); |
| 189 | } |
| 190 | return true; |
| 191 | #else |
| 192 | return false; |
| 193 | #endif |
| 194 | } |
| 195 | |
| 196 | bool CompileSourceFile::initParser() { |
| 197 | if (m_parser == nullptr) |
nothing calls this directly
no test coverage detected