| 19 | } |
| 20 | |
| 21 | bool ProgramImpl::simulate(Context* ctx, TextPrinter* tout) SKR_NOEXCEPT |
| 22 | { |
| 23 | auto Ctx = static_cast<ContextImpl*>(ctx); |
| 24 | auto TOut = static_cast<TextPrinterImpl*>(tout); |
| 25 | if (!program->simulate(Ctx->ctx, TOut->printer)) |
| 26 | { |
| 27 | Ctx->ctx.to_err("Failed to simulate\n"); |
| 28 | for ( auto & err : program->errors ) { |
| 29 | Ctx->ctx.to_err( |
| 30 | reportError(err.at, err.what, err.extra, err.fixme, err.cerr).c_str() |
| 31 | ); |
| 32 | } |
| 33 | return false; |
| 34 | } |
| 35 | return true; |
| 36 | } |
| 37 | |
| 38 | } // namespace das |
| 39 | } // namespace skr |