aboutsummaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorBruce Hill <bitbucket@bruce-hill.com>2017-09-22 11:56:46 -0700
committerBruce Hill <bitbucket@bruce-hill.com>2017-09-22 11:56:46 -0700
commite4660b169c14d24c3ec373b197e8b9469d200d50 (patch)
treeb9576e166caf1dcb994b7fe9162baa1a6a97756e /examples
parent6882862d0ff226d73bc6a010d335896c44d8cde9 (diff)
Renamed compiler -> nomsu for concision and clarity.
Diffstat (limited to 'examples')
-rw-r--r--examples/sample_game.nom16
-rw-r--r--examples/tutorial.nom2
2 files changed, 9 insertions, 9 deletions
diff --git a/examples/sample_game.nom b/examples/sample_game.nom
index 1f526e3..15d86f9 100644
--- a/examples/sample_game.nom
+++ b/examples/sample_game.nom
@@ -12,13 +12,13 @@ with secrets:
| add=function(self, key) self[key] = self:by_name(key) end}
|})
rule [find user %name] =:
- lua expr "secrets.users:by_name(vars.name) or compiler:error('Failed to find user: '..tostring(vars.name))"
+ lua expr "secrets.users:by_name(vars.name) or nomsu:error('Failed to find user: '..tostring(vars.name))"
rule [add user %name] =:
lua expr "secrets.users:add(vars.name)"
macro [@%name_block] =:
%name_str =: lua expr "vars.name_block.value.value.src"
".."
- |compiler:call("find user %", \repr %name_str\)
+ |nomsu:call("find user %", \repr %name_str\)
rule [everybody, everyone] =:
(%entry's "key") for %entry in (entries in (secret %users))
@@ -74,15 +74,15 @@ with secrets:
"inventory", "%'s inventory", "%'s stock of %", "%'s stock of % as str"
rule [you] =:
- lua expr "(compiler.you or 'Anonymous')"
+ lua expr "(nomsu.you or 'Anonymous')"
rule [make %person %action, make %person do %action] =:
lua block ".."
|do
- | local old_you = compiler.you
- | compiler.you = vars.person
- | ret = vars.action(compiler, vars)
- | compiler.you = old_you
+ | local old_you = nomsu.you
+ | nomsu.you = vars.person
+ | ret = vars.action(nomsu, vars)
+ | nomsu.you = old_you
|end
say "===================================================="
@@ -106,7 +106,7 @@ with secrets:
macro block [propose %action] =:
%source =: source code from tree %action
".."
- |compiler:call("propose source %", \repr %source\)
+ |nomsu:call("propose source %", \repr %source\)
rule [with everyone's approval do %action] =:
run %action
diff --git a/examples/tutorial.nom b/examples/tutorial.nom
index 8739348..7e9a14b 100644
--- a/examples/tutorial.nom
+++ b/examples/tutorial.nom
@@ -259,7 +259,7 @@ say the time
say ".."|Math expression result is: \lua expr "(1 + 2*3 + 3*4)^2"\
#.. In the lua environment, "vars" can be used to get local variables/function args, and
- "compiler" can be used to access the compiler, function defs, and other things
+ "nomsu" can be used to access the compiler, function defs, and other things
rule [square root of %n] =:
lua expr "math.sqrt(vars.n)"
say ".."|The square root of 2 is \square root of 2\