Пример #1
0
 public SelectCaseStmtContextWrapper(VBAParser.SelectCaseStmtContext selectCaseContext, IParseTreeVisitorResults inspValues, IUnreachableCaseInspectionFactoryProvider factoryFactory)
     : base(selectCaseContext, inspValues, factoryFactory)
 {
     _selectCaseContext      = selectCaseContext;
     _unreachableResults     = new List <ParserRuleContext>();
     _mismatchResults        = new List <ParserRuleContext>();
     _caseElseResults        = new List <ParserRuleContext>();
     _inspectionRangeFactory = factoryFactory.CreateIRangeClauseContextWrapperFactory();
     SetEvaluationTypeName(Context, ParseTreeValueResults, FilterFactory);
 }
Пример #2
0
        public RangeClauseContextWrapper(VBAParser.RangeClauseContext context, string evalTypeName, IParseTreeVisitorResults inspValues, IUnreachableCaseInspectionFactoryProvider factoryFactory)
            : base(context, inspValues, factoryFactory)
        {
            _isValueRange   = !(context.TO() is null);
            _isLTorGT       = !(context.IS() is null);
            _isRelationalOp = Context.children.Any(ch => ch is ParserRuleContext && ParseTreeValueVisitor.IsLogicalContext(ch));

            _isSingleValue = !(_isValueRange || _isLTorGT || _isRelationalOp);
            IsUnreachable  = false;
            AsFilter       = FilterFactory.Create(evalTypeName, ValueFactory);
            _evalTypeName  = evalTypeName;
            AsFilter       = AddFilterContent();
        }
Пример #3
0
 public ContextWrapperBase(ParserRuleContext context, IParseTreeVisitorResults inspValues, IUnreachableCaseInspectionFactoryProvider factoryFactory)
 {
     _context            = context;
     _rangeFilterFactory = factoryFactory.CreateIRangeClauseFilterFactory();
     _valueFactory       = factoryFactory.CreateIParseTreeValueFactory();
     _inspValues         = inspValues;
 }