Moves the "register" responsibility to the options types, not 100% on the API, but it's an idea. The interfaces are now single-method which is pretty much as small as it gets. You could implement these interfaces with a single function that calls itself.
A benefit to this is most obvious with the external Lexer I think as now it is not responsible for storing a value for later use that carries state and is not concurrent-safe.
Proposed changes
Describe the use case and detail of the change. If this PR addresses an issue on GitHub, make sure to include a link to that issue using one of the supported keywords here in this description (not in the title of the PR).
Checklist
Before creating a PR, run through this checklist and mark each as complete.
Moves the "register" responsibility to the options types, not 100% on the API, but it's an idea. The interfaces are now single-method which is pretty much as small as it gets. You could implement these interfaces with a single function that calls itself.
A benefit to this is most obvious with the external Lexer I think as now it is not responsible for storing a value for later use that carries state and is not concurrent-safe.
Proposed changes
Describe the use case and detail of the change. If this PR addresses an issue on GitHub, make sure to include a link to that issue using one of the supported keywords here in this description (not in the title of the PR).
Checklist
Before creating a PR, run through this checklist and mark each as complete.
CONTRIBUTING
documentREADME.md
)