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

[Syntax] Add support for match statements #14

Open
SirLynix opened this issue Jun 21, 2022 · 0 comments
Open

[Syntax] Add support for match statements #14

SirLynix opened this issue Jun 21, 2022 · 0 comments
Labels
enhancement New feature or request good first issue Good for newcomers question Further information is requested

Comments

@SirLynix
Copy link
Contributor

It would be nice to support a match statement, but I'm unsure about the syntax that should be used.

let x: i32;
let result: i32;
match (x) { //< obligatory parenthesis? we already require them for if statements
   0:
   {
       // do something
       result = 42;
   }
   1..9:
   {
       result = 66;
   }
   _: {}
}
@SirLynix SirLynix added enhancement New feature or request good first issue Good for newcomers question Further information is requested labels Jun 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant