aboutsummaryrefslogtreecommitdiff
path: root/examples/tutorial.nom
diff options
context:
space:
mode:
authorBruce Hill <bitbucket@bruce-hill.com>2017-09-24 20:20:27 -0700
committerBruce Hill <bitbucket@bruce-hill.com>2017-09-24 20:20:27 -0700
commitaf3274ca9237a08093009e87955e30ab5f473f12 (patch)
tree46c249d6b42ac51111c7e198a10b8dad09b17923 /examples/tutorial.nom
parente4660b169c14d24c3ec373b197e8b9469d200d50 (diff)
massive overhaul, compiler kinda works.
Diffstat (limited to 'examples/tutorial.nom')
-rw-r--r--examples/tutorial.nom20
1 files changed, 9 insertions, 11 deletions
diff --git a/examples/tutorial.nom b/examples/tutorial.nom
index 7e9a14b..3608be2 100644
--- a/examples/tutorial.nom
+++ b/examples/tutorial.nom
@@ -54,24 +54,22 @@ if (1 > 10):
# For longer conditionals, a "when" branch is the best option
when:
- ? 1 > 4:
+ * (1 > 4)
+ * (1 > 3):
say "this won't print"
- ? 1 > 3:
+ * (1 > 2):
say "this won't print"
- ? 1 > 2:
- say "this won't print"
- ?:
+ * else:
say "this will print"
# When "when" is given an argument, it works like a switch statement
-when 3:
- == 1:
- say "this won't print"
- == 2:
+when 3 == ?:
+ * 1
+ * 2:
say "this won't print"
- == 3:
+ * 3:
say "this will print"
- ==:
+ * else:
say "this won't print"
# Loops look like this: