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

One vector for regexes and matchers #133

Draft
wants to merge 11 commits into
base: master
Choose a base branch
from

Conversation

IhateTrains
Copy link
Member

  • Removed unneeded escaping backslashes in regexes
  • Fixed parsing being broken by registerRegex and registerMatcher using separate vectors. They now use one registeredRegexesAndMatchers vector
  • StreamOnly versions of registerRegex and registerMatcher
  • Purge of "unused" in ParserHelpers

@IhateTrains IhateTrains changed the title Parser test2 One vector for regexes and matchers Feb 15, 2021
@Idhrendur
Copy link
Member

I like where you're gong with this, but I think the modern idiom is to use std::variant and std::visit instead of inheritance: https://www.bfilipek.com/2020/04/variant-virtual-polymorphism.html

Can you put together another PR on a different branch using that method and see how feasible it is?

And maybe split out the cleanup efforts to a new PR so we can just get things merged.

@Idhrendur Idhrendur reopened this Feb 18, 2021
@Idhrendur
Copy link
Member

I'm not sure we should give up on this. I'd like more time to compare to how the std::variant version came out.

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.

2 participants