diff --git a/src/compiler.rs b/src/compiler.rs index 66cdb7e..cf3d745 100644 --- a/src/compiler.rs +++ b/src/compiler.rs @@ -627,6 +627,16 @@ impl Compiler { let (Ast::TuplePattern(members), _) = pattern.as_ref() else { unreachable!() }; + // TODO: finish compiling match clauses + // I just added "match depth" to the VM + // this will set match depth to artiy + // and decrement it each pattern + // the compiler will need to know about match depth for binding to work + // we should match against ALL args first + // rather than jump_no_matching after every arg check + // compile the body + // and then jump_no_match to the next clause + // at the end, panic_no_match } //match against the values on the stack //we know the (fixed) arity, so we should know where to look