mirror of https://git.sr.ht/~garritfra/sabre
Garrit Franke
3 years ago
5 changed files with 27 additions and 3 deletions
Binary file not shown.
@ -1,9 +1,10 @@
|
||||
/* START builtins */ |
||||
#include "stdio.h" |
||||
#include <stdbool.h> |
||||
|
||||
void _printf(char *msg) |
||||
{ |
||||
printf(msg); |
||||
} |
||||
|
||||
/* END builtins */ |
||||
/* END builtins */ |
||||
|
@ -1,3 +1,11 @@
|
||||
fn main(n: int) { |
||||
_printf("Hello World!\n") |
||||
|
||||
if n > 2 { |
||||
_printf("Larger than 2\n") |
||||
} else if n == 2 { |
||||
_printf("Is 2\n") |
||||
} else { |
||||
_printf("Less than 2\n") |
||||
} |
||||
} |
Loading…
Reference in new issue