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

Parser: document or update BitSet usage. #605

Open
evacchi opened this issue Oct 24, 2024 · 0 comments
Open

Parser: document or update BitSet usage. #605

evacchi opened this issue Oct 24, 2024 · 0 comments

Comments

@evacchi
Copy link
Collaborator

evacchi commented Oct 24, 2024

Parser allows to pass in a BitSet instance in its constructor to select the sections that should be parsed.

However, there is no documentation on what the BitSet represents, and how it should be built. Either document how to build a proper BitSet, or wrap it in an explicit builder.

Besides, there does not seem to be usages in the codebase, so it might be a candidate for removal (or at least, to make it package-private)

e.g.

class ParserOptions {
    BitSet includedSections;
    ParserOptions withImportSection() {
         includedSections.set(SectionId.IMPORT);
         return this;
   }
   // ... etc
}
class Parser {
    public Parser(ParserOptions opts) {
@evacchi evacchi changed the title Parser: pocument or update BitSet usage. Parser: document or update BitSet usage. Oct 24, 2024
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

No branches or pull requests

1 participant