| 153 | } |
| 154 | |
| 155 | void instance_type::interpret() |
| 156 | { |
| 157 | // Run the instruction |
| 158 | for (auto &ptr : statements) { |
| 159 | try { |
| 160 | ptr->run(); |
| 161 | } |
| 162 | catch (const lang_error &le) { |
| 163 | throw fatal_error(std::string("Uncaught exception: ") + le.what()); |
| 164 | } |
| 165 | catch (const cs::exception &e) { |
| 166 | throw e; |
| 167 | } |
| 168 | catch (const std::exception &e) { |
| 169 | throw exception(ptr->get_line_num(), ptr->get_file_path(), ptr->get_raw_code(), e.what()); |
| 170 | } |
| 171 | } |
| 172 | } |
| 173 | |
| 174 | void instance_type::dump_ast(std::ostream &stream) |
| 175 | { |
no test coverage detected