take some loop notes

This commit is contained in:
Scott Richmond 2024-12-27 00:54:31 -05:00
parent a7ee8f8e57
commit 6c803cdf5a

View File

@ -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