private MemberType GetSuggestedMemberType(int index, IReverseTokenizer revTokenizer, bool onlyVerifyEmptyContext = false)
        {
            var enumerator = revTokenizer.GetReversedTokens().Where(x => x.SourceSpan.Start.Index < index).GetEnumerator();

            while (true)
            {
                if (!enumerator.MoveNext())
                {
                    return(MemberType.None);
                }

                var tokInfo = enumerator.Current;
                if (tokInfo.Equals(default(TokenInfo)) ||
                    tokInfo.Token.Kind == TokenKind.NewLine ||
                    tokInfo.Token.Kind == TokenKind.NLToken ||
                    tokInfo.Token.Kind == TokenKind.Comment)
                {
                    continue;   // linebreak
                }
                // Look for the token in the context map
                ContextEntry contextEntry;
                if (ContextCompletionMap.Instance.TryGetValue(tokInfo.Token.Kind, out contextEntry) ||
                    ContextCompletionMap.Instance.TryGetValue(tokInfo.Category, out contextEntry))
                {
                    var matchContainer = new ContextPossibilityMatchContainer(contextEntry, this);
                    IEnumerable <ContextPossibility> matchingPossibilities;
                    if (matchContainer.TryMatchContextPossibility(tokInfo.SourceSpan.Start.Index, revTokenizer, out matchingPossibilities))
                    {
                        if (onlyVerifyEmptyContext)
                        {
                            return(MemberType.None);
                        }
                        else
                        {
                            MemberType result = MemberType.None;
                            foreach (var matchedPossible in matchingPossibilities)
                            {
                                if (matchedPossible.SetProviders.Length > 0)
                                {
                                    result |= matchedPossible.SetProviders.Select(x => x.ReturningTypes).Aggregate((x, y) => x | y);
                                }
                            }
                            return(result);
                        }
                    }

                    return(MemberType.All);
                }
                else
                {
                    // we don't have the token in our context map, so return
                    return(MemberType.None);
                }
            }
        }
Beispiel #2
0
            private bool AttemptOrderedSetMatch(int index, IReverseTokenizer revTokenizer, OrderedTokenSet tokenSet, bool doMatch = true)
            {
                bool isMatch    = false;
                int  tokenIndex = 1;

                // start reverse parsing
                var enumerator = revTokenizer.GetReversedTokens().Where(x => x.SourceSpan.Start.Index < index).GetEnumerator();

                while (true)
                {
                    if (!enumerator.MoveNext())
                    {
                        isMatch = false;
                        break;
                    }
                    var tokInfo = enumerator.Current;
                    if (tokInfo.Equals(default(TokenInfo)) || tokInfo.Token.Kind == TokenKind.NewLine || tokInfo.Token.Kind == TokenKind.NLToken || tokInfo.Token.Kind == TokenKind.Comment)
                    {
                        continue;   // linebreak
                    }
                    if (doMatch &&
                        (tokenSet.Set[tokenIndex] is TokenKind && (TokenKind)tokenSet.Set[tokenIndex] == tokInfo.Token.Kind) ||
                        (tokenSet.Set[tokenIndex] is TokenCategory && (TokenCategory)tokenSet.Set[tokenIndex] == tokInfo.Category))
                    {
                        tokenIndex++;
                        if (tokenSet.Set.Count == tokenIndex)
                        {
                            isMatch = true;
                            break;
                        }
                    }
                    else if (!doMatch &&
                             (tokenSet.Set[tokenIndex] is TokenKind && (TokenKind)tokenSet.Set[tokenIndex] != tokInfo.Token.Kind) ||
                             (tokenSet.Set[tokenIndex] is TokenCategory && (TokenCategory)tokenSet.Set[tokenIndex] != tokInfo.Category))
                    {
                        tokenIndex++;
                        if (tokenSet.Set.Count == tokenIndex)
                        {
                            isMatch = true;
                            break;
                        }
                    }
                    else
                    {
                        if (Genero4glAst.ValidStatementKeywords.Contains(tokInfo.Token.Kind) ||
                            tokInfo.Token.Kind == TokenKind.EndOfFile)
                        {
                            isMatch = false;
                            break;
                        }
                    }
                }

                return(isMatch);
            }
        private bool DetermineContext(int index, IReverseTokenizer revTokenizer, List <MemberResult> memberList, bool onlyVerifyEmptyContext = false)
        {
            var enumerator = revTokenizer.GetReversedTokens().Where(x => x.SourceSpan.Start.Index < index).GetEnumerator();

            while (true)
            {
                if (!enumerator.MoveNext())
                {
                    return(false);
                }

                var tokInfo = enumerator.Current;
                if (tokInfo.Equals(default(TokenInfo)) ||
                    tokInfo.Token.Kind == TokenKind.NewLine ||
                    tokInfo.Token.Kind == TokenKind.NLToken ||
                    tokInfo.Token.Kind == TokenKind.Comment)
                {
                    continue;   // linebreak
                }
                // Look for the token in the context map
                ContextEntry contextEntry;
                if (ContextCompletionMap.Instance.TryGetValue(tokInfo.Token.Kind, out contextEntry) ||
                    ContextCompletionMap.Instance.TryGetValue(tokInfo.Category, out contextEntry))
                {
                    var matchContainer = new ContextPossibilityMatchContainer(contextEntry, this);
                    IEnumerable <ContextPossibility> matchingPossibilities;
                    if (matchContainer.TryMatchContextPossibility(tokInfo.SourceSpan.Start.Index, revTokenizer, out matchingPossibilities))
                    {
                        if (onlyVerifyEmptyContext)
                        {
                            return(matchingPossibilities.All(x => x.SingleTokens.Length == 0 && x.SetProviders.Length == 0));
                        }
                        else
                        {
                            foreach (var matchedPossible in matchingPossibilities)
                            {
                                LoadPossibilitySet(index, matchedPossible, memberList);
                            }
                        }
                    }

                    return(true);
                }
                else
                {
                    // we don't have the token in our context map, so return
                    return(false);
                }
            }
        }
        public override IEnumerable <MemberResult> GetContextMembers(int index, IReverseTokenizer revTokenizer, IFunctionInformationProvider functionProvider,
                                                                     IDatabaseInformationProvider databaseProvider, IProgramFileProvider programFileProvider,
                                                                     bool isMemberAccess,
                                                                     out bool includePublicFunctions, out bool includeDatabaseTables, string contextStr,
                                                                     GetMemberOptions options = GetMemberOptions.IntersectMultipleResults)
        {
            _instance               = this;
            _functionProvider       = functionProvider;
            _databaseProvider       = databaseProvider;
            _programFileProvider    = programFileProvider;
            _includePublicFunctions = includePublicFunctions = false;    // this is a flag that the context determination logic sets if public functions should eventually be included in the set
            _includeDatabaseTables  = includeDatabaseTables = false;
            _contextString          = contextStr;

            List <MemberResult> members = new List <MemberResult>();

            // First see if we have a member completion
            if (TryMemberAccess(index, revTokenizer, out members))
            {
                _includePublicFunctions = false;
                _includeDatabaseTables  = false;
                return(members);
            }

            if (!DetermineContext(index, revTokenizer, members) && members.Count == 0)
            {
                // TODO: do we want to put in the statement keywords?
                members.AddRange(GetStatementStartKeywords(index));
            }

            includePublicFunctions  = _includePublicFunctions;
            includeDatabaseTables   = _includeDatabaseTables;
            _includePublicFunctions = false;    // reset the flag
            _includeDatabaseTables  = false;
            _contextString          = null;
            return(members);
        }
Beispiel #5
0
 public abstract IEnumerable <MemberResult> GetAllAvailableMembersByIndex(int index, IReverseTokenizer revTokenizer,
                                                                          out bool includePublicFunctions, out bool includeDatabaseTables,
                                                                          GetMemberOptions options = GetMemberOptions.IntersectMultipleResults);
Beispiel #6
0
 public abstract IEnumerable <MemberResult> GetContextMembers(int index, IReverseTokenizer revTokenizer, IFunctionInformationProvider functionProvider,
                                                              IDatabaseInformationProvider databaseProvider, IProgramFileProvider programFileProvider,
                                                              bool isMemberAccess,
                                                              out bool includePublicFunctions, out bool includeDatabaseTables, string contextStr,
                                                              GetMemberOptions options = GetMemberOptions.IntersectMultipleResults);
Beispiel #7
0
 public abstract IEnumerable <IFunctionResult> GetSignaturesByIndex(string exprText, int index, IReverseTokenizer revTokenizer, IFunctionInformationProvider functionProvider);
Beispiel #8
0
 public override IEnumerable <IFunctionResult> GetSignaturesByIndex(string exprText, int index, IReverseTokenizer revTokenizer, IFunctionInformationProvider functionProvider)
 {
     return(new IFunctionResult[0]);
 }
Beispiel #9
0
 public override IEnumerable <MemberResult> GetAllAvailableMembersByIndex(int index, IReverseTokenizer revTokenizer, out bool includePublicFunctions, out bool includeDatabaseTables, GetMemberOptions options = GetMemberOptions.IntersectMultipleResults)
 {
     includePublicFunctions = false;
     includeDatabaseTables  = false;
     return(new MemberResult[0]);
 }
        /// <summary>
        /// Gets the available names at the given location.  This includes built-in variables, global variables, and locals.
        /// </summary>
        /// <param name="index">The 0-based absolute index into the file where the available mebmers should be looked up.</param>
        public override IEnumerable <MemberResult> GetAllAvailableMembersByIndex(int index, IReverseTokenizer revTokenizer,
                                                                                 out bool includePublicFunctions, out bool includeDatabaseTables,
                                                                                 GetMemberOptions options = GetMemberOptions.IntersectMultipleResults)
        {
            _includePublicFunctions = includePublicFunctions = false;    // this is a flag that the context determination logic sets if public functions should eventually be included in the set
            _includeDatabaseTables  = includeDatabaseTables = false;

            List <MemberResult> members = new List <MemberResult>();

            // First see if we have a member completion
            if (TryMemberAccess(index, revTokenizer, out members))
            {
                _includePublicFunctions = false;
                _includeDatabaseTables  = false;
            }
            else
            {
                // Calling determine context here verifies that the context isn't in a position where completions should be shown at all.
                if (!DetermineContext(index, revTokenizer, members, true))
                {
                    HashSet <MemberResult> res = new HashSet <MemberResult>();
                    res.AddRange(GetKeywordMembers(options));
                    res.AddRange(GetDefinedMembers(index, AstMemberType.All));
                    includePublicFunctions  = _includePublicFunctions;
                    includeDatabaseTables   = _includeDatabaseTables;
                    _includePublicFunctions = false;    // reset the flag
                    _includeDatabaseTables  = false;
                    return(res);
                }
            }
            includePublicFunctions  = _includePublicFunctions;
            includeDatabaseTables   = _includeDatabaseTables;
            _includePublicFunctions = false;    // reset the flag
            _includeDatabaseTables  = false;
            return(members);
        }
        private bool TryMemberAccess(int index, IReverseTokenizer revTokenizer, out List <MemberResult> results)
        {
            results = new List <MemberResult>();
            bool skipGettingNext = false;
            var  enumerator      = revTokenizer.GetReversedTokens().Where(x => x.SourceSpan.Start.Index < index).GetEnumerator();

            while (true)
            {
                if (!skipGettingNext)
                {
                    if (!enumerator.MoveNext())
                    {
                        results.Clear();
                        return(false);
                    }
                }
                else
                {
                    skipGettingNext = false;
                }

                var tokInfo = enumerator.Current;
                if (tokInfo.Equals(default(TokenInfo)) || tokInfo.Token.Kind == TokenKind.NewLine || tokInfo.Token.Kind == TokenKind.NLToken || tokInfo.Token.Kind == TokenKind.Comment)
                {
                    continue;   // linebreak
                }
                if (tokInfo.Token.Kind == TokenKind.Dot || tokInfo.Token.VerbatimImage.EndsWith("."))
                {
                    if (tokInfo.Category == TokenCategory.NumericLiteral)
                    {
                        return(true);
                    }

                    // now we need to analyze the variable reference to get its members
                    int    startIndex, endIndex;
                    bool   isFunctionCallOrDefinition;
                    string var = revTokenizer.GetExpressionText(out startIndex, out endIndex, out isFunctionCallOrDefinition);
                    if (var != null)
                    {
                        int dotDiff = endIndex - tokInfo.SourceSpan.End.Index;
                        var = var.Substring(0, (var.Length - dotDiff));
                        if (var.EndsWith("."))
                        {
                            var = var.Substring(0, var.Length - 1);
                            IGeneroProject dummyProj;
                            IProjectEntry  projEntry;
                            bool           dummyDef;
                            var            analysisRes = GetValueByIndex(var, index, _functionProvider, _databaseProvider, _programFileProvider, false, out dummyDef, out dummyProj, out projEntry);
                            if (analysisRes != null)
                            {
                                // Get suggested member type based on what comes before the member we're doing access on
                                MemberType memberType = GetSuggestedMemberType(startIndex - 1, revTokenizer);
                                var        gmi        = new GetMultipleMembersInput
                                {
                                    AST                 = this,
                                    MemberType          = memberType,
                                    GetArrayTypeMembers = var[var.Length - 1].Equals(']'),
                                    IsMemberAccess      = true
                                };
                                IEnumerable <MemberResult> memberList = analysisRes.GetMembers(gmi);
                                if (memberList != null)
                                {
                                    results.AddRange(memberList);
                                }
                            }
                            return(true);
                        }
                    }
                }

                return(false);
            }

            return(false);
        }
        private bool TryFunctionDefContext(int index, IReverseTokenizer revTokenizer, out List <MemberResult> results)
        {
            results = new List <MemberResult>();
            FunctionDefStatus status = FunctionDefStatus.None;
            bool quit = false;

            foreach (var tokInfo in revTokenizer.GetReversedTokens().Where(x => x.SourceSpan.Start.Index < index))
            {
                if (tokInfo.Equals(default(TokenInfo)))
                {
                    continue;   // linebreak
                }
                switch (status)
                {
                case FunctionDefStatus.None:
                {
                    if (tokInfo.Category == TokenCategory.Identifier ||
                        (tokInfo.Category == TokenCategory.Keyword && tokInfo.Token.Kind != TokenKind.FunctionKeyword && tokInfo.Token.Kind != TokenKind.ReportKeyword))
                    {
                        status = FunctionDefStatus.IdentOrKeyword;
                    }
                    else if (tokInfo.Token.Kind == TokenKind.FunctionKeyword || tokInfo.Token.Kind == TokenKind.ReportKeyword)
                    {
                        status = FunctionDefStatus.FuncKeyword;
                        quit   = true;
                    }
                    else if (tokInfo.Token.Kind == TokenKind.Comma)
                    {
                        status = FunctionDefStatus.Comma;
                    }
                    else if (tokInfo.Token.Kind == TokenKind.LeftParenthesis)
                    {
                        status = FunctionDefStatus.LParen;
                    }
                    else
                    {
                        quit = true;
                    }
                    break;
                }

                case FunctionDefStatus.Comma:
                {
                    if (tokInfo.Category == TokenCategory.Identifier ||
                        (tokInfo.Category == TokenCategory.Keyword && tokInfo.Token.Kind != TokenKind.FunctionKeyword && tokInfo.Token.Kind != TokenKind.ReportKeyword))
                    {
                        status = FunctionDefStatus.IdentOrKeyword;
                    }
                    else
                    {
                        quit = true;
                    }
                    break;
                }

                case FunctionDefStatus.IdentOrKeyword:
                {
                    if (tokInfo.Token.Kind == TokenKind.FunctionKeyword || tokInfo.Token.Kind == TokenKind.ReportKeyword)
                    {
                        status = FunctionDefStatus.FuncKeyword;
                        quit   = true;
                    }
                    else if (tokInfo.Token.Kind == TokenKind.Comma)
                    {
                        status = FunctionDefStatus.Comma;
                    }
                    else if (tokInfo.Token.Kind == TokenKind.LeftParenthesis)
                    {
                        status = FunctionDefStatus.LParen;
                    }
                    else
                    {
                        quit = true;
                    }
                    break;
                }

                case FunctionDefStatus.LParen:
                {
                    if (tokInfo.Category == TokenCategory.Identifier ||
                        (tokInfo.Category == TokenCategory.Keyword && tokInfo.Token.Kind != TokenKind.FunctionKeyword && tokInfo.Token.Kind != TokenKind.ReportKeyword))
                    {
                        status = FunctionDefStatus.IdentOrKeyword;
                    }
                    else
                    {
                        quit = true;
                    }
                    break;
                }

                default:
                    quit = true;
                    break;
                }

                if (quit)
                {
                    break;
                }
            }

            return(status == FunctionDefStatus.FuncKeyword);
        }
Beispiel #13
0
        /// <summary>
        /// Gets information about the available signatures for the given expression.
        /// </summary>
        /// <param name="exprText">The expression to get signatures for.</param>
        /// <param name="index">The 0-based absolute index into the file.</param>
        public override IEnumerable <IFunctionResult> GetSignaturesByIndex(string exprText, int index, IReverseTokenizer revTokenizer, IFunctionInformationProvider functionProvider)
        {
            _functionProvider = functionProvider;

            // First see if we're in the process of defining a function
            List <MemberResult> dummyList;

            if (TryFunctionDefContext(index, revTokenizer, out dummyList))
            {
                return(null);
            }

            /*
             * Need to check for:
             * 1) Functions within the current module
             * 2) Functions within the current project
             * 3) Public functions
             */
            if (_body is IModuleResult)
            {
                _body.SetNamespace(null);
                // check for module vars, types, and constants (and globals defined in this module)
                IModuleResult mod = _body as IModuleResult;

                // check for module functions
                IFunctionResult funcRes;
                if (mod.Functions.TryGetValue(exprText, out funcRes))
                {
                    return(new IFunctionResult[1] {
                        funcRes
                    });
                }
            }

            if (_projEntry != null && _projEntry is IGeneroProjectEntry)
            {
                IGeneroProjectEntry genProj = _projEntry as IGeneroProjectEntry;
                if (genProj.ParentProject != null &&
                    !genProj.FilePath.ToLower().EndsWith(".inc"))
                {
                    foreach (var projEntry in genProj.ParentProject.ProjectEntries.Where(x => x.Value != genProj))
                    {
                        if (projEntry.Value.Analysis != null &&
                            projEntry.Value.Analysis.Body != null)
                        {
                            projEntry.Value.Analysis.Body.SetNamespace(null);
                            IModuleResult modRes = projEntry.Value.Analysis.Body as IModuleResult;
                            if (modRes != null)
                            {
                                // check project functions
                                IFunctionResult funcRes;
                                if (modRes.Functions.TryGetValue(exprText, out funcRes))
                                {
                                    if (funcRes.AccessModifier == AccessModifier.Public)
                                    {
                                        return new IFunctionResult[1] {
                                                   funcRes
                                        }
                                    }
                                    ;
                                }
                            }
                        }
                    }
                }
            }

            // Check for class methods
            IGeneroProject  dummyProj;
            IProjectEntry   dummyProjEntry;
            bool            dummyDef;
            IAnalysisResult member = GetValueByIndex(exprText, index, _functionProvider, _databaseProvider, _programFileProvider, true, out dummyDef, out dummyProj, out dummyProjEntry);

            if (member is IFunctionResult)
            {
                return(new IFunctionResult[1] {
                    member as IFunctionResult
                });
            }
            else if (member is VariableDef &&
                     (member as VariableDef).Type != null)
            {
                var typeRef = (member as VariableDef).Type;
                if (typeRef.ResolvedType != null && typeRef.ResolvedType is TypeDefinitionNode)
                {
                    var tdn = typeRef.ResolvedType as TypeDefinitionNode;
                    if (tdn.TypeRef != null && tdn.TypeRef is FunctionTypeReference)
                    {
                        return(new IFunctionResult[1] {
                            tdn.TypeRef as FunctionTypeReference
                        });
                    }
                }
            }

            if (_functionProvider != null)
            {
                // check for the function name in the function provider
                var func = _functionProvider.GetFunction(exprText);
                if (func != null)
                {
                    return(func);
                }
            }

            return(null);
        }
            public bool TryMatchContextPossibility(int index, IReverseTokenizer revTokenizer, out IEnumerable <ContextPossibility> matchingPossibilities)
            {
                List <ContextPossibility> retList = new List <ContextPossibility>();
                bool isMatch = false;

                if (_flatMatchingSet.Count > 0)
                {
                    // start reverse parsing
                    IEnumerator <TokenInfo> enumerator = revTokenizer.GetReversedTokens().Where(x => x.SourceSpan.Start.Index < index).GetEnumerator();
                    while (true)
                    {
                        if (!enumerator.MoveNext())
                        {
                            isMatch = false;
                            break;
                        }
                        TokenInfo tokenInfo = enumerator.Current;
                        if (tokenInfo.Equals(default(TokenInfo)) || tokenInfo.Token.Kind == TokenKind.NewLine || tokenInfo.Token.Kind == TokenKind.NLToken || tokenInfo.Token.Kind == TokenKind.Comment)
                        {
                            continue;   // linebreak
                        }
                        string info = tokenInfo.ToString();
                        // look for the token in the matching dictionary
                        List <BackwardTokenSearchItem> matchList;
                        if (_flatMatchingSet.TryGetValue(tokenInfo.Token.Kind, out matchList) ||
                            _flatMatchingSet.TryGetValue(tokenInfo.Category, out matchList))
                        {
                            // need to attempt matching the match list
                            // 1) grab the potential matches with an ordered set and attempt to completely match each set. If one of the sets completely matches, we have a winner
                            foreach (var potentialMatch in matchList.Where(x => _parentTree.LanguageVersion >= x.MinimumLanguageVersion && x.TokenSet != null))
                            {
                                if (AttemptOrderedSetMatch(tokenInfo.SourceSpan.Start.Index, revTokenizer, potentialMatch.TokenSet) &&
                                    _parentTree.LanguageVersion >= potentialMatch.ParentContext.MinimumLanguageVersion)
                                {
                                    retList.Add(potentialMatch.ParentContext);
                                    isMatch = true;
                                    break;
                                }
                            }
                            if (isMatch)
                            {
                                break;      // if we have a match from the for loop above, we're done.
                            }
                            // 2) If we have any single token matches, they win.
                            var singleMatches = matchList.Where(x =>
                                                                (x.SingleToken is TokenKind && (TokenKind)x.SingleToken != TokenKind.EndOfFile) ||
                                                                (x.SingleToken is TokenCategory && (TokenCategory)x.SingleToken != TokenCategory.None)).ToList();
                            if (singleMatches.Count > 0)
                            {
                                retList.AddRange(singleMatches.Where(x => _parentTree.LanguageVersion >= x.MinimumLanguageVersion).Select(x => x.ParentContext));
                                isMatch = true;// singleMatches.All(x => x.Match);  // TODO: the match flag isn't being used....need to figure that out.
                                break;
                            }

                            // At this point, nothing was matched correctly, so we continue
                        }
                        else if (_flatNonMatchingSet.Count > 0 &&
                                 (!_flatNonMatchingSet.Contains(tokenInfo.Token.Kind) ||
                                  !_flatNonMatchingSet.Contains(tokenInfo.Category)))
                        {
                            // need to attempt matching the match list
                            // 1) grab the potential matches with an ordered set and attempt to completely match each set. If one of the sets completely matches, we have a winner
                            foreach (var potentialMatch in _flatNonMatchingSet.SelectMany(x => _flatMatchingSet[x]).Where(x => _parentTree.LanguageVersion >= x.MinimumLanguageVersion && x.TokenSet != null))
                            {
                                if (AttemptOrderedSetMatch(tokenInfo.SourceSpan.Start.Index, revTokenizer, potentialMatch.TokenSet, false) &&
                                    _parentTree.LanguageVersion >= potentialMatch.ParentContext.MinimumLanguageVersion)
                                {
                                    retList.Add(potentialMatch.ParentContext);
                                    isMatch = true;
                                    break;
                                }
                            }
                            if (isMatch)
                            {
                                break;      // if we have a match from the for loop above, we're done.
                            }
                            // 2) If we have any single token matches, they win.
                            var singleMatches = _flatNonMatchingSet.SelectMany(x => _flatMatchingSet[x]).Where(x =>
                                                                                                               (x.SingleToken is TokenKind && (TokenKind)x.SingleToken != TokenKind.EndOfFile) ||
                                                                                                               (x.SingleToken is TokenCategory && (TokenCategory)x.SingleToken != TokenCategory.None)).ToList();
                            if (singleMatches.Count > 0)
                            {
                                retList.AddRange(singleMatches.Where(x => _parentTree.LanguageVersion >= x.MinimumLanguageVersion).Select(x => x.ParentContext));
                                isMatch = true;
                                break;
                            }

                            // At this point, nothing was matched correctly, so we continue
                        }
                        else
                        {
                            if (Genero4glAst.ValidStatementKeywords.Contains(tokenInfo.Token.Kind))
                            {
                                isMatch = false;
                                break;
                            }
                        }
                    }
                }

                if (!isMatch && _possibilitiesWithNoBackwardSearch.Count > 0)
                {
                    retList.AddRange(_possibilitiesWithNoBackwardSearch.Where(x => _parentTree.LanguageVersion >= x.MinimumLanguageVersion));
                    isMatch = true;
                }

                matchingPossibilities = retList;
                return(isMatch);
            }
Beispiel #15
0
 public override IEnumerable <MemberResult> GetContextMembers(int index, IReverseTokenizer revTokenizer, IFunctionInformationProvider functionProvider, IDatabaseInformationProvider databaseProvider, IProgramFileProvider programFileProvider, out bool includePublicFunctions, out bool includeDatabaseTables, string contextStr, GetMemberOptions options = GetMemberOptions.IntersectMultipleResults)
 {
     includePublicFunctions = false;
     includeDatabaseTables  = false;
     return(new MemberResult[0]);
 }