示例#1
0
 public UnreachableCaseInspection(
     IDeclarationFinderProvider declarationFinderProvider,
     IUnreachableCaseInspector inspector,
     IParseTreeValueVisitor parseTreeValueVisitor)
     : base(declarationFinderProvider)
 {
     _inspector             = inspector;
     _parseTreeValueVisitor = parseTreeValueVisitor;
     _listener = new UnreachableCaseInspectionListener();
 }
示例#2
0
        public static RubberduckParserState CreateAndParse(IVBE vbe, IInspectionListener listener)
        {
            var parser = Create(vbe);

            parser.Parse(new CancellationTokenSource());
            if (parser.State.Status >= ParserState.Error)
            {
                Assert.Inconclusive("Parser Error");
            }

            return(parser.State);
        }
示例#3
0
        public static RubberduckParserState CreateAndParse(IVBE vbe, IInspectionListener listener, IEnumerable <string> testLibraries = null)
        {
            var parser = CreateWithLibraries(vbe, testLibraries: testLibraries);

            parser.Parse(new CancellationTokenSource());
            if (parser.State.Status >= ParserState.Error)
            {
                Assert.Inconclusive("Parser Error");
            }

            return(parser.State);
        }