Closed JSAbrahams closed 5 years ago
Merging #74 into master will increase coverage by
0.31%
. The diff coverage is87.12%
.
@@ Coverage Diff @@
## master #74 +/- ##
==========================================
+ Coverage 80.2% 80.52% +0.31%
==========================================
Files 60 60
Lines 3925 3974 +49
==========================================
+ Hits 3148 3200 +52
+ Misses 777 774 -3
Impacted Files | Coverage Δ | |
---|---|---|
tests/output/syntax.rs | 46.66% <ø> (+2.91%) |
:arrow_up: |
src/parser/ast.rs | 23.94% <100%> (-0.71%) |
:arrow_down: |
tests/parser/valid/definition.rs | 90.35% <100%> (+0.8%) |
:arrow_up: |
src/parser/definition.rs | 82.43% <100%> (ø) |
:arrow_up: |
tests/desugar/definition.rs | 86.89% <82.92%> (-2.11%) |
:arrow_down: |
src/desugar/definition.rs | 85% <86.36%> (+0.9%) |
:arrow_up: |
src/core/construct.rs | 32.98% <0%> (+12.37%) |
:arrow_up: |
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 4766388...d51c77e. Read the comment docs.
Relevant issues
...
Summary
We have the
forward
keyword, similar to Perl. This allows us to easily forward methods of the contained object (remember, we use composition, not inheritance). This is only a partial implementation however, we still have no way of checking what arguments the method of the contained object requires. Once we have a way of building a context which contains information about each identifier's type and the accompanying methods we can look up which arguments are required for a forward.In short, the following:
Is essentially desugared to the following:
Although currently, due to not knowing any information about methods
a
andb
, it is for now (incorrectly) desugared to:Added Tests
Test to check that desugaring of a
foward
produces a block with:Additional Context
...