aboutsummaryrefslogtreecommitdiff
path: root/lib/training_wheels.nom
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2018-11-02 15:17:48 -0700
committerBruce Hill <bruce@bruce-hill.com>2018-11-02 15:17:49 -0700
commit0f17c5eb9ac4660f2f969bd1e67af42713e45eac (patch)
tree279ca7da2de0efe2f363684f3c84a540635f11a8 /lib/training_wheels.nom
parentacd9c2acd4688f2301b091daad910c04e402bd6a (diff)
parentdc41f30c73c9686685e3a4183c1213fb4ba55c90 (diff)
Merge branch 'master' into working
Diffstat (limited to 'lib/training_wheels.nom')
-rw-r--r--lib/training_wheels.nom46
1 files changed, 24 insertions, 22 deletions
diff --git a/lib/training_wheels.nom b/lib/training_wheels.nom
index 6155069..f16b700 100644
--- a/lib/training_wheels.nom
+++ b/lib/training_wheels.nom
@@ -1,26 +1,28 @@
-#!/usr/bin/env nomsu -V4.8.8.6
+#!/usr/bin/env nomsu -V4.8.10
#
This file contains a set of definitions that bring some familiar language features
from other languages into nomsu (e.g. "||" and "continue")
-parse [%a === %b] as ((%a 's id) is (%b 's id))
-parse [%a !== %b] as ((%a 's id) is not (%b 's id))
-parse [function %names %body, def %names %body] as (action %names %body)
-parse [switch %branch_value %body] as (if %branch_value is %body)
-parse [None, Null] as (nil)
-parse [True, true] as (yes)
-parse [False, false] as (no)
-parse [pass] as (do nothing)
-parse [%a || %b] as (%a or %b)
-parse [%a && %b] as (%a and %b)
-parse [continue] as (do next)
-parse [break] as (stop)
-parse [let %thing = %value in %action] as (with local {%thing:%value})
-parse [print %, println %] as (say %)
-parse [error!, panic!, fail!, abort!] as (barf!)
-parse [error %, panic %, fail %, abort %] as (barf %)
-parse [assert %condition] as (assume %condition)
-parse [assert %condition %message] as (assume %condition or barf %message)
-parse [%cond ? %if_true %if_false] as (%if_true if %cond else %if_false)
-parse [lambda %args %body] as (%args -> %body)
-parse [function %name %args %body] as (%name = (%args -> %body))
+(%a === %b) parses as ((%a 's id) is (%b 's id))
+(%a !== %b) parses as ((%a 's id) is not (%b 's id))
+[function %names %body, def %names %body] all parse as (..)
+ externally %names means %body
+
+(switch %branch_value %body) parses as (if %branch_value is %body)
+[None, Null] all parse as (nil)
+[True, true] all parse as (yes)
+[False, false] all parse as (no)
+(pass) parses as (do nothing)
+(%a || %b) parses as (%a or %b)
+(%a && %b) parses as (%a and %b)
+(continue) parses as (do next)
+(break) parses as (stop)
+(let %thing = %value in %action) parses as (with local {%thing:%value})
+[print %, println %] all parse as (say %)
+[error!, panic!, fail!, abort!] all parse as (barf!)
+[error %, panic %, fail %, abort %] all parse as (barf %)
+(assert %condition) parses as (assume %condition)
+(assert %condition %message) parses as (assume %condition or barf %message)
+(%cond ? %if_true %if_false) parses as (%if_true if %cond else %if_false)
+(lambda %args %body) parses as (%args -> %body)
+(function %name %args %body) parses as (%name = (%args -> %body))