feat: switch/case statement
- Add syntax - Desugars to if-else chain in HIR lowering (both compilers) - No new HIR/C backend nodes needed — reuses hIf/hBinary/hBlock - Supports integer, char, and enum tag dispatch - Case body can be single statement (no braces required)
This commit is contained in:
@@ -158,6 +158,7 @@ const skBreak: int = 9;
|
||||
const skContinue: int = 10;
|
||||
const skDecl: int = 11;
|
||||
const skDefer: int = 12;
|
||||
const skSwitch: int = 13;
|
||||
|
||||
struct ElseIf {
|
||||
line: uint32;
|
||||
|
||||
Reference in New Issue
Block a user