Example #1
0
        protected override IReadOnlyTextRangeCollection <RdToken> GetTokens(int start, int length)
        {
            RdTokenizer   tokenizer = new RdTokenizer();
            ITextProvider tp        = new TextProvider(TextBuffer.CurrentSnapshot);

            return(tokenizer.Tokenize(tp, 0, tp.Length));
        }
Example #2
0
        /// <summary>
        /// Given RD data and function name parses the data and creates structured
        /// information about the function. Method returns multiple functions since
        /// RD data often provides information on several functions so in order
        /// to avoid processing same data multiple times parser extracts information
        /// on all related functions.
        /// </summary>
        public static IReadOnlyList <IFunctionInfo> GetFunctionInfos(string packageName, string rdHelpData)
        {
            var tokenizer    = new RdTokenizer(false);
            var textProvider = new TextStream(rdHelpData);
            var tokens       = tokenizer.Tokenize(textProvider, 0, textProvider.Length);
            var context      = new RdParseContext(packageName, tokens, textProvider);

            return(ParseFunctions(context));
        }
Example #3
0
        /// <summary>
        /// Given RD data and function name parses the data and creates structured
        /// information about the function. Method returns multiple functions since
        /// RD data often provides information on several functions so in order
        /// to avoid processing same data multiple times parser extracts information
        /// on all related functions.
        /// </summary>
        public static IReadOnlyList<IFunctionInfo> GetFunctionInfos(string rdHelpData) {
            var tokenizer = new RdTokenizer(tokenizeRContent: false);

            ITextProvider textProvider = new TextStream(rdHelpData);
            IReadOnlyTextRangeCollection<RdToken> tokens = tokenizer.Tokenize(textProvider, 0, textProvider.Length);
            RdParseContext context = new RdParseContext(tokens, textProvider);

            return ParseFunctions(context);
        }
Example #4
0
        /// <summary>
        /// Given RD data and function name parses the data and creates structured
        /// information about the function. Method returns multiple functions since
        /// RD data often provides information on several functions so in order
        /// to avoid processing same data multiple times parser extracts information
        /// on all related functions.
        /// </summary>
        public static IReadOnlyList <IFunctionInfo> GetFunctionInfos(string rdHelpData)
        {
            var tokenizer = new RdTokenizer(tokenizeRContent: false);

            ITextProvider textProvider = new TextStream(rdHelpData);
            IReadOnlyTextRangeCollection <RdToken> tokens = tokenizer.Tokenize(textProvider, 0, textProvider.Length);
            RdParseContext context = new RdParseContext(tokens, textProvider);

            return(ParseFunctions(context));
        }