diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2017-09-15 04:03:42 +0000 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2017-09-15 04:03:42 +0000 |
| commit | bf0188827929051f7d0e116c2148986e7ccc2a8b (patch) | |
| tree | 8f7ebc8ef9c95d4bb9c5b9cb04669d94619ede9e /core.nom | |
| parent | 13490a34c872f5cde6b2f094d9dda045dec066d4 (diff) | |
Switched to use more flexible write instead of print.
Diffstat (limited to 'core.nom')
| -rw-r--r-- | core.nom | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -147,7 +147,7 @@ rule "%a != %b": lua expr "((vars.a ~= vars.b) or not utils.equivalent(vars.a, vars.b))" macro "say %str": - ".."|print(utils.repr(\%str as lua expr\)) + ".."|compiler:writeln(utils.repr(\%str as lua expr\)) # Control flow rule "do %action": @@ -331,7 +331,7 @@ rule "restrict %fn to within %whitelist": | if fn_info == nil then | compiler:error("Undefined function: "..tostring(fn)) | elseif not compiler:check_permission(fn) then - | print("You do not have permission to restrict function: "..tostring(fn)) + | compiler:writeln("You do not have permission to restrict function: "..tostring(fn)) | else | compiler.defs[fn].whiteset = whiteset | end @@ -351,9 +351,9 @@ rule "allow %whitelist to use %fn": | if fn_info == nil then | compiler:error("Undefined function: "..tostring(fn)) | elseif fn_info.whiteset == nil then - | print("Function is already allowed by everyone: "..tostring(fn)) + | compiler:writeln("Function is already allowed by everyone: "..tostring(fn)) | elseif not compiler:check_permission(fn) then - | print("You do not have permission to grant permissions for function: "..tostring(fn)) + | compiler:writeln("You do not have permission to grant permissions for function: "..tostring(fn)) | else | for _,w in ipairs(whitelist) do | fn_info.whiteset[w] = true @@ -375,9 +375,9 @@ rule "forbid %blacklist to use %fn": | if fn_info == nil then | compiler:error("Undefined function: "..tostring(fn)) | elseif fn_info.whiteset == nil then - | print("Cannot remove items from a whitelist when there is no whitelist on function: "..tostring(fn)) + | compiler:writeln("Cannot remove items from a whitelist when there is no whitelist on function: "..tostring(fn)) | elseif not compiler:check_permission(fn) then - | print("You do not have permission to restrict function: "..tostring(fn)) + | compiler:writeln("You do not have permission to restrict function: "..tostring(fn)) | else | for _,b in ipairs(blacklist) do fn_info.whiteset[b] = nil end | end |
