diff options
| author | 2022-08-05 17:36:51 +0200 | |
|---|---|---|
| committer | 2022-08-05 17:36:51 +0200 | |
| commit | c2a13e05596c724fbdbc3e8ff1266c099b675e56 (patch) | |
| tree | 3be2194055a624d718c94c528651d487b2571273 /bootstrap/test.cff | |
| parent | d95555f87eced5fcb3458d76c765afe2de89bdcb (diff) | |
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
Diffstat (limited to 'bootstrap/test.cff')
| -rw-r--r-- | bootstrap/test.cff | 7 |
1 files changed, 4 insertions, 3 deletions
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); |