Exemplo n.º 1
0
        public override object Visit(IfStatement ifStatement)
        {
            ifStatement.If.Accept(this);

            var thenVisitor = new QuestionDeclarationChecker(_declaredQuestions, Report);

            foreach (var statement in ifStatement.Then)
            {
                statement.Accept(thenVisitor);
            }

            var elseVisitor = new QuestionDeclarationChecker(_declaredQuestions, Report);

            foreach (var statement in ifStatement.Else)
            {
                statement.Accept(elseVisitor);
            }

            return(null);
        }
        public override object Visit(IfStatement ifStatement)
        {
            ifStatement.If.Accept(this);

            var thenVisitor = new QuestionDeclarationChecker(_declaredQuestions, Report);

            foreach (var statement in ifStatement.Then)
            {
                statement.Accept(thenVisitor);
            }

            var elseVisitor = new QuestionDeclarationChecker(_declaredQuestions, Report);

            foreach (var statement in ifStatement.Else)
            {
                statement.Accept(elseVisitor);
            }

            return null;
        }