ダイレクトモードを実装
This commit is contained in:
1 parent
76aea0c4e6
commit
5f0078a8f9
4 files changed
+73
-6
No files matched your search
@@ -1185,8 +1185,43 @@ class PetitComputer
|
||||
}
|
||||
auto prg = input("", true);
|
||||
parser = new Parser(prg);
|
||||
auto cc = parser.compiler;
|
||||
cc.compileDirectMode(vm);
|
||||
try
|
||||
{
|
||||
auto cc = parser.compiler;
|
||||
cc.compileDirectMode(vm);
|
||||
}
|
||||
catch(SmileBasicError sbe)
|
||||
{
|
||||
try
|
||||
{
|
||||
printConsole(sbe.getErrorMessage, "\n");
|
||||
printConsole(sbe.getErrorMessage2, "\n");
|
||||
//printConsole(sbe.to!string);
|
||||
writeln(sbe.to!string);
|
||||
writeln(sbe.getErrorMessage2);
|
||||
auto loc = vm.currentLocation;
|
||||
printConsole(loc.line, ":", loc.pos, ":", parser.getLine(loc));
|
||||
}
|
||||
catch(Throwable t)
|
||||
{
|
||||
writeln(t);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
catch(Throwable t)
|
||||
{
|
||||
try
|
||||
{
|
||||
printConsole(t.to!string);
|
||||
writeln(t);
|
||||
printConsole(parser.getLine(vm.currentLocation));
|
||||
}
|
||||
catch(Throwable t)
|
||||
{
|
||||
writeln(t);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
vm.dump();
|
||||
running = true;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user