aboutsummaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2023-07-30 20:08:11 +0100
committerMichael Williamson <mike@zwobble.org>2023-07-30 20:08:11 +0100
commit517f94350bd4dabe0b681b5da2febdbf76e37585 (patch)
treef983ad47d57eeacc476b87b2ca8da10c23cfafa3 /examples
parent829ff6db80143208fd6f1a09f831aa1da72fd2d7 (diff)
Add var example
Diffstat (limited to 'examples')
-rw-r--r--examples/var/shed.toml9
-rw-r--r--examples/var/src/HelloWorld.shed5
2 files changed, 14 insertions, 0 deletions
diff --git a/examples/var/shed.toml b/examples/var/shed.toml
new file mode 100644
index 00000000..156fa7c6
--- /dev/null
+++ b/examples/var/shed.toml
@@ -0,0 +1,9 @@
+[shed]
+main = "HelloWorld"
+
+[[shed.bins]]
+name = "hello-world"
+
+[[shed.examples]]
+bin = "hello-world"
+expected-output = "hello, world"
diff --git a/examples/var/src/HelloWorld.shed b/examples/var/src/HelloWorld.shed
new file mode 100644
index 00000000..ff8c1041
--- /dev/null
+++ b/examples/var/src/HelloWorld.shed
@@ -0,0 +1,5 @@
+fun main() ! Io -> Unit {
+ var message = "hello, ";
+ assign message := message + "world\n";
+ print!(message);
+}