diff --git a/examples/add_fn.slg b/examples/add_fn.slg new file mode 100644 index 0000000..1107d55 --- /dev/null +++ b/examples/add_fn.slg @@ -0,0 +1,9 @@ + + +fn main() { + add(1, 2) +} + +fn add(a: int, b: int) -> int { + + a b +} diff --git a/examples/add_int.slg b/examples/add_int.slg new file mode 100644 index 0000000..24cf8d9 --- /dev/null +++ b/examples/add_int.slg @@ -0,0 +1,5 @@ + +fn main() { + + 1 2 +} + diff --git a/examples/add_let.slg b/examples/add_let.slg new file mode 100644 index 0000000..d1a564b --- /dev/null +++ b/examples/add_let.slg @@ -0,0 +1,7 @@ + +fn main() { + let a = 5; + let b = 3; + + a b +} + diff --git a/compiler/example.slg b/examples/example_1.slg similarity index 100% rename from compiler/example.slg rename to examples/example_1.slg diff --git a/runtime/example.slg b/examples/example_2.slg similarity index 100% rename from runtime/example.slg rename to examples/example_2.slg diff --git a/examples/main.slg b/examples/main.slg new file mode 100644 index 0000000..ce1caeb --- /dev/null +++ b/examples/main.slg @@ -0,0 +1,3 @@ + +fn main() {} +