MCPcopy Create free account
hub / github.com/GaijinEntertainment/daScript / SimulateWithErrReport

Function SimulateWithErrReport

include/daScript/misc/das_common.h:9–19  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7
8namespace 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 = {}) {

Callers 5

aot_compileFunction · 0.85
compile_and_runFunction · 0.85
compile_scriptFunction · 0.85
run_lifecycleFunction · 0.85
init_dyn_modulesFunction · 0.85

Calls 4

get_contextFunction · 0.85
reportErrorFunction · 0.85
getContextStackSizeMethod · 0.80
simulateMethod · 0.45

Tested by

no test coverage detected