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

make additional prefileter metadata public #1156

Merged
merged 1 commit into from Jan 25, 2024

Conversation

pascalkuthe
Copy link
Contributor

@pascalkuthe pascalkuthe commented Jan 25, 2024

These are the changes that I mentioned a while ago in #425

I now have a fully working streaming regex implementation at https://github.com/pascalkuthe/regex-cursor. These two APIs are the last two blockers before I can make helix switch to that implementation (we don't allow git dependencies/patches).

  • makes Prefilter::is_fast public. Necessary to implement a meta engine downstream (also useful for any other downstream user that wants to write a custom meta engine)
  • add a function that returns the maximum length of a prefilter. This is necessary to determine how much buffering is needed for streaming prefilters.

Copy link
Member

@BurntSushi BurntSushi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One little nit and I think this is good to go! Thank you!

regex-automata/src/util/prefilter/mod.rs Show resolved Hide resolved
@pascalkuthe
Copy link
Contributor Author

done, thanks for the quick feedback!

@BurntSushi BurntSushi merged commit 07ef7f1 into rust-lang:master Jan 25, 2024
16 checks passed
@BurntSushi
Copy link
Member

This PR is on crates.io in regex-automata 0.4.5.

@pascalkuthe pascalkuthe deleted the prefilter branch January 25, 2024 15:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants