From e4660b169c14d24c3ec373b197e8b9469d200d50 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Fri, 22 Sep 2017 11:56:46 -0700 Subject: Renamed compiler -> nomsu for concision and clarity. --- examples/sample_game.nom | 16 ++++++++-------- examples/tutorial.nom | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) (limited to 'examples') 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\ -- cgit v1.2.3