From af3274ca9237a08093009e87955e30ab5f473f12 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Sun, 24 Sep 2017 20:20:27 -0700 Subject: massive overhaul, compiler kinda works. --- examples/tutorial.nom | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) (limited to 'examples/tutorial.nom') 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: -- cgit v1.2.3