public override void Interpret() { var condition = Conditional.Interpret(); while (((BoolValue)condition).Value) { foreach (var statementNode in StatementList) { statementNode.Interpret(); } } }
public override void Interpret() { var condition = (BoolValue)Conditional.Interpret(); if (condition.Value) { foreach (var statementNode in StatementListTrue) { statementNode.Interpret(); } } else { if (StatementListFalse != null) { foreach (var statementNode in StatementListFalse) { statementNode.Interpret(); } } } }