add a few examples

This commit is contained in:
sfja 2024-12-11 00:22:13 +01:00
parent 4be4e50b7d
commit 1640915ddb
6 changed files with 24 additions and 0 deletions

9
examples/add_fn.slg Normal file
View File

@ -0,0 +1,9 @@
fn main() {
add(1, 2)
}
fn add(a: int, b: int) -> int {
+ a b
}

5
examples/add_int.slg Normal file
View File

@ -0,0 +1,5 @@
fn main() {
+ 1 2
}

7
examples/add_let.slg Normal file
View File

@ -0,0 +1,7 @@
fn main() {
let a = 5;
let b = 3;
+ a b
}

3
examples/main.slg Normal file
View File

@ -0,0 +1,3 @@
fn main() {}