mirror of
https://github.com/Stone-Red-Code/YesNt-Interpreter.git
synced 2026-09-04 09:06:41 +02:00
Code structure improvements
This commit is contained in:
@@ -41,12 +41,14 @@ namespace YesNt.Interpreter.Statements
|
||||
|
||||
bool? result = Evaluator.EvaluateCondition(condition);
|
||||
|
||||
if (result != true)
|
||||
if (result is null)
|
||||
{
|
||||
RuntimeInfo.Exit("Invalid operation", true);
|
||||
return;
|
||||
}
|
||||
|
||||
if (result == false)
|
||||
{
|
||||
if (result is null)
|
||||
{
|
||||
RuntimeInfo.Exit("Invalid operation", true);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -112,12 +114,14 @@ namespace YesNt.Interpreter.Statements
|
||||
|
||||
bool? result = Evaluator.EvaluateCondition(condition);
|
||||
|
||||
if (result != true)
|
||||
if (result is null)
|
||||
{
|
||||
RuntimeInfo.Exit("Invalid operation", true);
|
||||
return;
|
||||
}
|
||||
|
||||
if (result == false)
|
||||
{
|
||||
if (result is null)
|
||||
{
|
||||
RuntimeInfo.Exit("Invalid operation", true);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -32,7 +32,6 @@ namespace YesNt.Interpreter.Statements
|
||||
else
|
||||
{
|
||||
RuntimeInfo.Exit("Invalid syntax", true);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -60,7 +59,6 @@ namespace YesNt.Interpreter.Statements
|
||||
else
|
||||
{
|
||||
RuntimeInfo.Exit("Invalid syntax", true);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user