ShaderLang
ShaderLang copied to clipboard
[Syntax] Add support for match statements
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;
}
_: {}
}