From 3d39cf73e0e496ecb2b3b680db0d8570543fdcb4 Mon Sep 17 00:00:00 2001 From: q66 Date: Sat, 10 Sep 2016 20:45:51 +0200 Subject: [PATCH] formatting --- tools/repl.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tools/repl.cc b/tools/repl.cc index d196c14b..35b1fe90 100644 --- a/tools/repl.cc +++ b/tools/repl.cc @@ -198,7 +198,7 @@ static bool do_call(CsState &cs, ostd::ConstCharRange line, bool file = false) { signal(SIGINT, do_sigint); ostd::String err; cscript::CsStackState st; - if (!cs.pcall([&]() { + auto tocall = [&]() { if (file) { if (!cs.run_file(line, ret)) { ostd::err.writeln("cannot read file: ", line); @@ -206,7 +206,8 @@ static bool do_call(CsState &cs, ostd::ConstCharRange line, bool file = false) { } else { cs.run(line, ret); } - }, &err, &st)) { + }; + if (!cs.pcall(tocall, &err, &st)) { signal(SIGINT, SIG_DFL); ostd::ConstCharRange terr = err; auto col = ostd::find(terr, ':');