Exemple #1
0
        public void forwardReferencing_ErrorDetectedCorrectly()
        {
            var parsingTask             = _parsingPipeline.Process(new ParsingTask(TestDataResolver.LoadTestFile("forwardReferencing.ql")));
            var ReferenceErrorExtractor = new ReferenceCheckingVisitor();

            parsingTask.Ast.Accept(ReferenceErrorExtractor);

            Assert.AreEqual(1, ReferenceErrorExtractor.ReferencingErrors.Count);
        }
Exemple #2
0
        public ParsingTask Process(ParsingTask input)
        {
            var referenceErrorExtractor = new ReferenceCheckingVisitor();

            input.Ast.Accept(referenceErrorExtractor);
            referenceErrorExtractor.ReferencingErrors.ForEach(x => input.Errors.Add(x.ToString()));

            return(input);
        }