diff options
| author | Bruce Hill <bitbucket@bruce-hill.com> | 2018-07-20 20:27:15 -0700 |
|---|---|---|
| committer | Bruce Hill <bitbucket@bruce-hill.com> | 2018-07-20 20:27:27 -0700 |
| commit | 6728587dfc6a5f4090f2673113ffedb2be924daf (patch) | |
| tree | 77591abacd8760bedaa30110570613ef263220fe /lib/training_wheels.nom | |
| parent | c9df1bc3e881b2ebcf5808a0db7bea29cd07c849 (diff) | |
Auto-formatted and auto-upgraded everything!
Diffstat (limited to 'lib/training_wheels.nom')
| -rw-r--r-- | lib/training_wheels.nom | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/training_wheels.nom b/lib/training_wheels.nom index 2845768..100927c 100644 --- a/lib/training_wheels.nom +++ b/lib/training_wheels.nom @@ -1,9 +1,10 @@ -#!/usr/bin/env nomsu -V2.4.4.3 +#!/usr/bin/env nomsu -V2.5.4.3 # This file contains a set of definitions that bring some familiar language features from other languages into nomsu (e.g. "==" and "continue") use "core" + parse [%a == %b] as (%a = %b) parse [%a == %b] as (%a is %b) parse [%a ~= %b, %a != %b, %a <> %b] as (%a is not %b) @@ -35,11 +36,13 @@ compile [function %args %body, lambda %args %body] to: to %lua write ")\n " %body = (%body as lua) lua> "\%body:convert_to_statements('return ');" - for % in %args.value: lua> "\%body:remove_free_vars(\%);" + for % in %args.value: + lua> "\%body:remove_free_vars(\%);" + to %lua write %body to %lua write "\nend)" return %lua parse [function %name %args %body] as (%name = (function %args %body)) compile [call %fn %args] to (..) - Lua value "\(%fn as lua expr)(unpack(\(%args as lua expr)))"
\ No newline at end of file + Lua value "\(%fn as lua expr)(unpack(\(%args as lua expr)))" |
