aboutsummaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorlemon <lsof@mailbox.org>2022-08-22 17:47:02 +0200
committerlemon <lsof@mailbox.org>2022-08-22 17:47:02 +0200
commitd74ed7fb65bf7ac245d2548ac13f3f3fdabadd16 (patch)
tree7d98ba2472073d5414d51651742911993b5fbf81 /examples
parente0686f7953bbc74ff03a7a6b22c0b82995ab494e (diff)
llvm hello worlding
Diffstat (limited to 'examples')
-rw-r--r--examples/hello-world.cff36
1 files changed, 1 insertions, 35 deletions
diff --git a/examples/hello-world.cff b/examples/hello-world.cff
index a867cd9..fca5817 100644
--- a/examples/hello-world.cff
+++ b/examples/hello-world.cff
@@ -1,40 +1,6 @@
import "libc.hff";
-fn zero() int {
- return 1 + 2;
-}
-
-#{
-struct Vec2f { x f32, y f32 }
-
-fn x(v *Vec2f) f32 {
- return (*v).y;
-}
-
-fn len(x [#]int) int {
- return x.#len;
-}
-
-fn ptr(x [#]int) int {
- return *x.#ptr;
-}
-}
-
-fn add(a int, b int) int {
- let x *void = {};
- return a + b;
-}
-
extern fn main(argc int, argv **u8) int {
- let it int = 0;
- argv[42] - 3;
- while argc > 0 {
- argc = argc - 1;
- }
-
- printf("hello %d", argc + 42,
- argc < 1 ? argv : #null,
- *argv
- );
+ printf("hello %d", argc + 42);
}