已经完成While、Continue、Break指令的调试
This commit is contained in:
@@ -29,6 +29,18 @@ ifth true 4 3 <
|
||||
else
|
||||
letp result 80
|
||||
endi
|
||||
letp var1 1
|
||||
letp var2 1
|
||||
whil false @var1 10 <
|
||||
math var1 @var1 ++
|
||||
ifth false @var2 4 !=
|
||||
math var2 @var2 ++
|
||||
cont
|
||||
var var3 xxx
|
||||
else
|
||||
brea
|
||||
endi
|
||||
endw
|
||||
";
|
||||
Todo todo = new Todo();
|
||||
todo.Init(script);
|
||||
|
||||
@@ -291,7 +291,7 @@ namespace Deedy.Testing
|
||||
string cmd = Pre_Hand(this.Script[index]);
|
||||
if (cmd == "endw")
|
||||
{
|
||||
this.Control_CurrentLine = index;
|
||||
this.Control_CurrentLine = index + 1;
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -308,7 +308,7 @@ namespace Deedy.Testing
|
||||
string cmd = Pre_Hand(this.Script[index]);
|
||||
if (cmd == "whil")
|
||||
{
|
||||
this.Control_CurrentLine = index + 1;
|
||||
this.Control_CurrentLine = index;
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -378,9 +378,12 @@ namespace Deedy.Testing
|
||||
{
|
||||
string cmdArgs = this.Script[index][cmd.Length..].Trim();
|
||||
if (this.CmdP_Cond(cmdArgs))
|
||||
{
|
||||
this.Control_CurrentLine = index + 1;
|
||||
return;
|
||||
}
|
||||
else break;
|
||||
}
|
||||
else if (cmd == "letp")
|
||||
{
|
||||
//HACK:清除方法定义中使用「LetP」声明的所有局部变量
|
||||
@@ -807,7 +810,7 @@ namespace Deedy.Testing
|
||||
if (Pre_Math(numStack, 1))
|
||||
{
|
||||
double lParam = numStack.Pop();
|
||||
numStack.Push(lParam++);
|
||||
numStack.Push(++lParam);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
@@ -818,7 +821,7 @@ namespace Deedy.Testing
|
||||
if (Pre_Math(numStack, 1))
|
||||
{
|
||||
double lParam = numStack.Pop();
|
||||
numStack.Push(lParam--);
|
||||
numStack.Push(--lParam);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user