From fa8aaba64d206330959470e1ffbf0ad0c974456a Mon Sep 17 00:00:00 2001 From: lemon Date: Sat, 20 Aug 2022 16:38:41 +0200 Subject: more IR (is it correct even. its so confusing) --- examples/hello-world.cff | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'examples') diff --git a/examples/hello-world.cff b/examples/hello-world.cff index c4a99ea..0ffca9f 100644 --- a/examples/hello-world.cff +++ b/examples/hello-world.cff @@ -1,6 +1,14 @@ import "libc.hff"; -extern fn main(argc int, argv *const *const u8) int { - printf("hello %d", argc + 42); +extern fn main(argc int, argv **u8) int { + *argv = "hi"; + while argc > 0 { + argc = argc - 1; + } + + printf("hello %d", argc + 42, + argc < 1 ? argv : #null, + *argv + ); } -- cgit v1.2.3