Closed frmdstryr closed 3 months ago
Merging #546 (a537128) into main (bf0ea6f) will increase coverage by
0.05%
. The diff coverage is97.50%
.
Does this really gain us anything in practice?
I am generally against adding to the syntax unless it introduces an entirely new concept to the language.
On Sat, Mar 23, 2024 at 8:56 AM codecov[bot] @.***> wrote:
Merging #546 https://app.codecov.io/gh/nucleic/enaml/pull/546?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=nucleic (b56ea86 https://github.com/nucleic/enaml/commit/b56ea869525f704d96c0bc3426c64d66ea4056e5) into main https://app.codecov.io/gh/nucleic/enaml/commit/bf0ea6fde7b2c2ed72121fb3af8d0def6690449f?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=nucleic (bf0ea6f https://github.com/nucleic/enaml/commit/bf0ea6fde7b2c2ed72121fb3af8d0def6690449f) will increase coverage by 0.05%. The diff coverage is 97.50%.
Additional details and impacted files
@@ Coverage Diff @@## main #546 +/- ## ==========================================+ Coverage 70.74% 70.79% +0.05%
Files 287 287 Lines 25634 25673 +39 Branches 4676 4683 +7 ==========================================+ Hits 18135 18176 +41 + Misses 6386 6385 -1 + Partials 1113 1112 -1
— Reply to this email directly, view it on GitHub https://github.com/nucleic/enaml/pull/546#issuecomment-2016502179, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABBQSM52IN54EELXEKSYTLYZWCXRAVCNFSM6AAAAABFEVMADWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMJWGUYDEMJXHE . You are receiving this because you are subscribed to this thread.Message ID: @.***>
This makes the parser allow a "const" in an enamldef or child def that uses atom's
ReadOnly
member so it cannot be changed after the initial value is set. The only other difference from an attr is that the parser requires a default expression.The existing parser (pegen not the ply one) actually allows "const" in an enamldef but not in a child def but throws an error because the visitor is not implemented in the block compiler.
I copied a lot of code in the gen_const_expr, idk if that can/should be cleaned up. It's mainly an inlined gen_storage_expr and gen_operator_expr.
An example use case...
Any feedback is welcome.