Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tokenize<TKind>.Tokenize should accept TextSpan #85

Open
sebastienros opened this issue Feb 26, 2019 · 3 comments
Open

Tokenize<TKind>.Tokenize should accept TextSpan #85

sebastienros opened this issue Feb 26, 2019 · 3 comments

Comments

@sebastienros
Copy link

I am pre-parsing some text to extract the parts I need to parse, and don't want to allocate more than necessary. For this reason it would be nice to be able to pass a TextSpan that I would extract from the original buffer instead of having to create a string out of it and pass it to the tokenizer.

@sebastienros
Copy link
Author

Mitigation right now is to copy-paste the protected implementation in my custom tokenizer.

@nblumhardt
Copy link
Member

That's interesting - thanks for the note 👍

@nblumhardt
Copy link
Member

The challenge here is going to be that Tokenize(TextSpan) already exists in Tokenizer but has a different return type and semantics :-/ ... I'd guess we'll find some way around it, I'll give it some thought.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants