#!/usr/bin/env nomsu -V3.8.7.6 # 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))