| 7 | |
| 8 | namespace das { |
| 9 | inline ContextPtr SimulateWithErrReport(ProgramPtr program, TextWriter &tw) { |
| 10 | ContextPtr pctx ( get_context(program->getContextStackSize()) ); |
| 11 | if ( !program->simulate(*pctx, tw) ) { |
| 12 | tw << "failed to simulate\n"; |
| 13 | for ( auto & err : program->errors ) { |
| 14 | tw << reportError(err.at, err.what, err.extra, err.fixme, err.cerr); |
| 15 | } |
| 16 | return nullptr; |
| 17 | } |
| 18 | return pctx; |
| 19 | } |
| 20 | |
| 21 | template <typename K, typename V, typename Compare = std::less<K>> |
| 22 | vector<pair<K, V>> ordered(const das_hash_map<K, V> &unsorted_map, Compare cmp = {}) { |
no test coverage detected