Code structure improvements

This commit is contained in:
Stone_Red
2022-03-10 12:43:22 +01:00
parent c02104db5a
commit 83f99d4dd5
8 changed files with 26 additions and 379 deletions
@@ -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;
}