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 few new laws and optimizations #58
Conversation
Codecov Report
@@ Coverage Diff @@
## main #58 +/- ##
==========================================
+ Coverage 96.10% 96.88% +0.77%
==========================================
Files 3 3
Lines 565 578 +13
Branches 54 57 +3
==========================================
+ Hits 543 560 +17
+ Misses 22 18 -4
Continue to review full report at Codecov.
|
case Impl.Fail() => Impl.Fail() | ||
case Impl.FailWith(str) => Impl.FailWith(str) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you reuse the same instances with a cast here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I could, but my heuristic is that paser build time is cheap (done once), but parser run time is where we want to optimize, so I didn't bother... but why not...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
😆, I guess we each persuaded the other. I'm happy either way.
took your suggestion @rossabaker |
A few more laws occurred to me so I added them.
At the same time, I realized we could leverage some of those properties when statically building up the parsers to make them a bit simpler.