Skip to content

[Syntax] Add support for match statements #14

@SirLynix

Description

@SirLynix

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;
   }
   _: {}
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestgood first issueGood for newcomersquestionFurther information is requested

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions