示例#1
0
        private async Task<TokenList> TokenizeAsync(ITextProvider text, IParsingExecutionContext context)
        {
            var stream = new TextStream(text);
            var tokens = await Lexer.TokenizeAsync(stream, context);
            LastTokenizationDuration = Lexer.LastTokenizationDuration;

            return tokens;
        }
示例#2
0
        private TokenList Tokenize(IParsingRequest request)
        {
            var stream = new TextStream(request.Text);

            return Lexer.Tokenize(stream, new ParsingRequestLexingContext(request));
        }