forked from OctaForge/libcubescript
formatting
parent
9f34c72b21
commit
3d39cf73e0
|
@ -198,7 +198,7 @@ static bool do_call(CsState &cs, ostd::ConstCharRange line, bool file = false) {
|
||||||
signal(SIGINT, do_sigint);
|
signal(SIGINT, do_sigint);
|
||||||
ostd::String err;
|
ostd::String err;
|
||||||
cscript::CsStackState st;
|
cscript::CsStackState st;
|
||||||
if (!cs.pcall([&]() {
|
auto tocall = [&]() {
|
||||||
if (file) {
|
if (file) {
|
||||||
if (!cs.run_file(line, ret)) {
|
if (!cs.run_file(line, ret)) {
|
||||||
ostd::err.writeln("cannot read file: ", line);
|
ostd::err.writeln("cannot read file: ", line);
|
||||||
|
@ -206,7 +206,8 @@ static bool do_call(CsState &cs, ostd::ConstCharRange line, bool file = false) {
|
||||||
} else {
|
} else {
|
||||||
cs.run(line, ret);
|
cs.run(line, ret);
|
||||||
}
|
}
|
||||||
}, &err, &st)) {
|
};
|
||||||
|
if (!cs.pcall(tocall, &err, &st)) {
|
||||||
signal(SIGINT, SIG_DFL);
|
signal(SIGINT, SIG_DFL);
|
||||||
ostd::ConstCharRange terr = err;
|
ostd::ConstCharRange terr = err;
|
||||||
auto col = ostd::find(terr, ':');
|
auto col = ostd::find(terr, ':');
|
||||||
|
|
Loading…
Reference in New Issue