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

Adds loop expression #60

Merged
merged 3 commits into from
Nov 23, 2019
Merged

Adds loop expression #60

merged 3 commits into from
Nov 23, 2019

Conversation

baszalmstra
Copy link
Collaborator

Enabling a much faster fibonacci:

fn fibonacci(n:int):int {
    let a = 0;
    let b = 1;
    let i = 1;
    loop {
        if i > n {
            return a
        }
        let sum = a + b;
        a = b;
        b = sum;
        i += 1;
    }
}

Depends on #49

@codecov
Copy link

codecov bot commented Nov 21, 2019

Codecov Report

Merging #60 into master will decrease coverage by 70.85%.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master    #60       +/-   ##
=========================================
- Coverage   70.85%     0%   -70.86%     
=========================================
  Files         106     74       -32     
  Lines        6838   4869     -1969     
=========================================
- Hits         4845      0     -4845     
- Misses       1993   4869     +2876
Impacted Files Coverage Δ
crates/mun_syntax/src/tests/lexer.rs 0% <ø> (-100%) ⬇️
crates/mun_hir/src/ty/infer.rs 0% <0%> (-74.66%) ⬇️
...ates/mun_syntax/src/parsing/grammar/expressions.rs 0% <0%> (-94.48%) ⬇️
crates/mun_syntax/src/ast/generated.rs 0% <0%> (-55.75%) ⬇️
crates/mun_syntax/src/ast/traits.rs 0% <0%> (-46.16%) ⬇️
crates/mun_syntax/src/syntax_kind/generated.rs 0% <0%> (-78.89%) ⬇️
crates/mun_syntax/src/tests/parser.rs 0% <0%> (-97.92%) ⬇️
crates/mun_hir/src/expr.rs 0% <0%> (-75.43%) ⬇️
crates/mun_hir/src/ty/tests.rs 0% <0%> (-95.66%) ⬇️
crates/mun_hir/src/db.rs 0% <0%> (-100%) ⬇️
... and 95 more

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 dec7d73...b6ac62c. Read the comment docs.

@Wodann Wodann self-requested a review November 21, 2019 14:58
@baszalmstra
Copy link
Collaborator Author

Loop statements

@baszalmstra baszalmstra mentioned this pull request Nov 23, 2019
5 tasks
@baszalmstra baszalmstra merged commit 867948c into mun-lang:master Nov 23, 2019
@baszalmstra baszalmstra deleted the loop branch November 23, 2019 15:57
@Wodann Wodann added this to the Mun v0.2 milestone May 14, 2020
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

Successfully merging this pull request may close these issues.

2 participants