| 333 | } |
| 334 | |
| 335 | repl::repl(context_t c) : context(std::move(c)) |
| 336 | { |
| 337 | context->file_path = "<REPL_ENV>"; |
| 338 | context->compiler->fold_expr = false; |
| 339 | context->instance->storage.add_buildin_var("quit", cs::make_cni([]() { |
| 340 | int code = 0; |
| 341 | cs::current_process->on_process_exit.touch(&code); |
| 342 | })); |
| 343 | } |
| 344 | |
| 345 | void repl::interpret(const string &code, std::deque<token_base *> &line) |
| 346 | { |