public override void Validate(Environment env)
        {
            using var _ = env.Scopes.Use();

            Expr.Validate(env);
            Expr.AssertType(new BooleanType());

            Block.Validate(env);
        }
Exemplo n.º 2
0
        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);
        }