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

annotation filters with cli arguments #418

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

eWert-Online
Copy link

This implements the suggestion from @tsnobip and @mjambon in #324.

  • The command line can specify multiple tags (-tag producer -tag res)
  • The atd annotations can specify multiple tags (<ocaml tag="producer" tag="foo" name="Foo">)
  • An annotation that doesn't specify a tag is assumed to carry all the tags
    (<ocaml name="Foo"> is selected by -tag bar but <ocaml tag="foo" name="Foo"> is not selected by -tag bar)

The tags are currently implemented by removing all attributes from the AST which do not match the cli argument(s).
This is the easiest way I could think of to implement that feature. If there is a better way or this leads to problems, please let me know 🙂

I am not sure, if the schema changes I made, make sense. I just allowed <... tag="foo"> fields in every attribute location (except for doc attributes).

PR checklist

  • New code has tests to catch future regressions
  • Documentation is up-to-date
  • CHANGES.md is up-to-date

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