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

feat: Adds data structures #64

Merged
merged 21 commits into from
Jan 11, 2020
Merged

feat: Adds data structures #64

merged 21 commits into from
Jan 11, 2020

Conversation

Wodann
Copy link
Collaborator

@Wodann Wodann commented Nov 23, 2019

This PR adds struct declarations.

The following code should work properly (As the struct definition is still WIP, the example code might change.):

struct A;
struct B {}
struct C {
    pub a: float,
    pub b: int,
}
struct D(float, int)

fn foo(a: C) -> C {
    c.a = 2.0;
    c
}
  • Implement parsing of struct declarations.
  • Implement type inferencing and diagnostics for struct declarations
  • Implement code generation for struct declarations
  • Implement parsing of struct literals
  • Implement type inferencing and diagnostics for struct literals
  • Implement code generation for struct literals
  • Implement ABI type for struct declarations

@Wodann Wodann changed the title feat: parsing of data structures Adds data structs Nov 23, 2019
@Wodann Wodann changed the title Adds data structs Adds data structures Nov 23, 2019
@codecov
Copy link

codecov bot commented Nov 23, 2019

Codecov Report

Merging #64 into master will increase coverage by 2.61%.
The diff coverage is 78.57%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #64      +/-   ##
==========================================
+ Coverage   72.14%   74.75%   +2.61%     
==========================================
  Files         109      117       +8     
  Lines        7283     8868    +1585     
==========================================
+ Hits         5254     6629    +1375     
- Misses       2029     2239     +210
Impacted Files Coverage Δ
crates/mun_codegen/src/ir.rs 80% <ø> (+10%) ⬆️
crates/mun_syntax/src/tests/lexer.rs 100% <ø> (ø) ⬆️
crates/mun_syntax/src/parsing/grammar/types.rs 95.23% <ø> (ø) ⬆️
crates/mun_syntax/src/lib.rs 89.09% <ø> (+1.81%) ⬆️
crates/mun_syntax/src/ast.rs 81.25% <ø> (ø) ⬆️
crates/mun_codegen/src/ir/function.rs 92.3% <ø> (ø) ⬆️
crates/mun_hir/src/db.rs 100% <100%> (ø) ⬆️
...tes/mun_syntax/src/parsing/grammar/declarations.rs 88.52% <100%> (+16.52%) ⬆️
crates/mun_codegen/src/db.rs 100% <100%> (ø) ⬆️
crates/mun_runtime/src/test.rs 96.81% <100%> (+0.46%) ⬆️
... and 79 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 ef40798...a2c7ce7. Read the comment docs.

@baszalmstra
Copy link
Collaborator

Implement POD structs

@Wodann Wodann marked this pull request as ready for review January 11, 2020 12:50
@baszalmstra baszalmstra merged commit 267f3c3 into master Jan 11, 2020
@Wodann
Copy link
Collaborator Author

Wodann commented Jan 24, 2020

@Wodann Wodann deleted the feature/structs branch April 1, 2020 12:28
@Wodann Wodann added this to the Mun v0.2 milestone May 14, 2020
@Wodann Wodann changed the title Adds data structures feat: Adds data structures May 15, 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