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: if statements #24

Merged
merged 10 commits into from
Oct 30, 2019
Merged

feat: if statements #24

merged 10 commits into from
Oct 30, 2019

Conversation

baszalmstra
Copy link
Collaborator

No description provided.

This commit adds the ability to parse if else statements to the parser.
There is no inferencing or code generation yet.
We introduces the never type to represent a type that is never
instantiated. This is useful for cases where a branch of an if statement
never returns for instance:

```mun
let b = if a {
  3
} else {
  return;
}
```

In the above case `b` should be assigned the type `int` because the then
branch has type `int` and the else branch has type `never`.
baszalmstra and others added 4 commits October 27, 2019 11:51
This commit adds the `MissingElseBranch` and `IncompatibleBranch`
diagnostics to inferencing.
The dlls in this repo are build artifacts and should not reside with the
source. Where applicable add them manually.
@baszalmstra baszalmstra marked this pull request as ready for review October 29, 2019 14:48
@baszalmstra baszalmstra self-assigned this Oct 29, 2019
@baszalmstra
Copy link
Collaborator Author

If statements

@baszalmstra baszalmstra changed the title [WIP] feat: if statements feat: if statements Oct 29, 2019
@baszalmstra baszalmstra merged commit 6676f1c into mun-lang:master Oct 30, 2019
@baszalmstra baszalmstra deleted the if_statements branch October 30, 2019 20:17
@Wodann Wodann added this to the Mun v0.1.0 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