public override void Validate(Environment env) { using var _ = env.Scopes.Use(); Expr.Validate(env); Expr.AssertType(new BooleanType()); Block.Validate(env); }
public override void Validate(Environment env) { using (env.Scopes.Use()) { Expr.Validate(env); Expr.AssertType(new BooleanType()); Block.Validate(env); } foreach (var elseIfStatement in ElseIfStatements) { elseIfStatement.Validate(env); } ElseStatement?.Validate(env); }