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

Add a compilation pass #65

Open
erikrose opened this issue Jun 20, 2017 · 0 comments
Open

Add a compilation pass #65

erikrose opened this issue Jun 20, 2017 · 0 comments

Comments

@erikrose
Copy link
Contributor

Add a compilation pass for rulesets. This will bring several improvements:

  • Catch errors early: for example, dom() rules that don't assign a type.
  • Compute rule prereqs only once.
  • Support and() rules with more complex operands. (Compiling down to simpler rules is much easier than coding it all into AndLhs.)

I see us inserting a CompiledRuleset class chronologically between Ruleset and BoundRuleset. Callers can compile a ruleset manually if they wish, or they can just call Ruleset.against() as now, and the compile will happen implicitly (and then get thrown away).

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