From c2a13e05596c724fbdbc3e8ff1266c099b675e56 Mon Sep 17 00:00:00 2001 From: lemon Date: Fri, 5 Aug 2022 17:36:51 +0200 Subject: modify let and static decls to allow multiple vars this involved transforming statement and declaration parsing code to use a CPS-like style to yield many decls within one lexical decl --- bootstrap/test.cff | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'bootstrap/test.cff') diff --git a/bootstrap/test.cff b/bootstrap/test.cff index 5e74cf1..46e3b8c 100644 --- a/bootstrap/test.cff +++ b/bootstrap/test.cff @@ -17,12 +17,13 @@ enum Color { Red, Green, Blue } -static xs *void = {}; +static xs *void = {}, + ok = 6; fn isort(xs *int, n usize) void { fn icmp(lhs *const void, rhs *const void, _ *void) int { - let lhs = *as(*int)lhs; - let rhs = *as(*int)rhs; + let lhs = *as(*int)lhs, + rhs = *as(*int)rhs; return lhs - rhs; } qsort(xs, n, 4, &icmp); -- cgit v1.2.3