Closed JSAbrahams closed 5 years ago
Merging #69 into master will decrease coverage by
0.01%
. The diff coverage is83.33%
.
@@ Coverage Diff @@
## master #69 +/- ##
==========================================
- Coverage 80% 79.98% -0.02%
==========================================
Files 58 58
Lines 3850 3852 +2
==========================================
+ Hits 3080 3081 +1
- Misses 770 771 +1
Impacted Files | Coverage Δ | |
---|---|---|
src/core/mod.rs | 63.87% <100%> (-0.24%) |
:arrow_down: |
tests/desugar/control_flow.rs | 90.12% <100%> (ø) |
:arrow_up: |
src/desugar/node.rs | 69.47% <75%> (-0.05%) |
:arrow_down: |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update 2c92365...abd1944. Read the comment docs.
Relevant issues
...
Summary
It might be overdoing it to define a custom class for this. Instead of using the constructor of a hypothetical
ENum
class, it is good enough for now to use the built-in**
power operator of Python. Whetherexp
of an Enum is empty is now checked during the desugar stage, not in the core language.So for instance:
2.7E23
becomes(2.7 * 10 ** 23)
4E
becomes(2.7 * 10 ** 1)
8.5E-9
becomes8.5 * 10 ** -9
Added Tests
Change the
verify_while
test to reflect the behaviour that enum desugaring is now slightly more advanced, in that it checks if theexp
is empty instead of doing this in the core language.Additional Context
...