| 88 | } |
| 89 | |
| 90 | bool CompileSourceFile::compile(Action action) { |
| 91 | m_action = action; |
| 92 | if (m_commandLineParser->verbose()) { |
| 93 | Location loc(m_fileId); |
| 94 | ErrorDefinition::ErrorType type = |
| 95 | ErrorDefinition::PP_PROCESSING_SOURCE_FILE; |
| 96 | switch (m_action) { |
| 97 | case Preprocess: |
| 98 | case PostPreprocess: |
| 99 | type = ErrorDefinition::PP_PROCESSING_SOURCE_FILE; |
| 100 | break; |
| 101 | case Parse: |
| 102 | type = ErrorDefinition::PA_PROCESSING_SOURCE_FILE; |
| 103 | break; |
| 104 | case PythonAPI: |
| 105 | type = ErrorDefinition::PY_PROCESSING_SOURCE_FILE; |
| 106 | break; |
| 107 | } |
| 108 | if (action != PostPreprocess) { |
| 109 | Error err(type, loc); |
| 110 | m_errors->printMessage(m_errors->addError(err, true)); |
| 111 | } |
| 112 | } |
| 113 | |
| 114 | switch (m_action) { |
| 115 | case Preprocess: |
| 116 | return preprocess_(); |
| 117 | case PostPreprocess: |
| 118 | return postPreprocess_(); |
| 119 | case Parse: |
| 120 | return parse_(); |
| 121 | case PythonAPI: { |
| 122 | return pythonAPI_(); |
| 123 | } |
| 124 | } |
| 125 | return true; |
| 126 | } |
| 127 | |
| 128 | CompileSourceFile::CompileSourceFile(const CompileSourceFile& orig) {} |
| 129 |
nothing calls this directly
no test coverage detected