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

Eval: add "Evaluate rule" (as opposed to document) code lens #995

Open
anderseknert opened this issue Aug 18, 2024 · 0 comments
Open

Eval: add "Evaluate rule" (as opposed to document) code lens #995

anderseknert opened this issue Aug 18, 2024 · 0 comments

Comments

@anderseknert
Copy link
Member

It would be really useful if Regal allowed evaluating both whole documents (like we currently do) and individual rule definitions. So if there are e.g. 3 allow definitions, we would present 2 code lenses for each of them:

  • Evaluate document
  • Evaluate rule

The "Evaluate document" functionality is of course already in place. I imagine the easiest way to allow eval of a single definition is simply to strip out the rest of the rules with that name from the AST before sending it for eval.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant