aboutsummaryrefslogtreecommitdiff
path: root/lib/consolecolor.nom
diff options
context:
space:
mode:
authorBruce Hill <bitbucket@bruce-hill.com>2018-06-24 16:11:08 -0700
committerBruce Hill <bitbucket@bruce-hill.com>2018-06-24 16:11:40 -0700
commitad342b63b7b6f07f9c8dc44fc09f7d478b7bb1e0 (patch)
treea3a7748e24fa493250c808edb6a1bf9b1f5d4127 /lib/consolecolor.nom
parent65addb9aa6c5e44048f01d73429090f5ed9dd799 (diff)
Simplifications/streamlining the Make process, and cleaning up some of
how command line interaction and `use %` work.
Diffstat (limited to 'lib/consolecolor.nom')
-rw-r--r--lib/consolecolor.nom12
1 files changed, 5 insertions, 7 deletions
diff --git a/lib/consolecolor.nom b/lib/consolecolor.nom
index 3a53849..8184b59 100644
--- a/lib/consolecolor.nom
+++ b/lib/consolecolor.nom
@@ -10,10 +10,8 @@ use "core"
for %name = %colornum in %colors
with {%escapecode: "\27[\(%colornum)m"}
- lua> ".."
- nomsu.COMPILE_ACTIONS[\%name] = function(nomsu, tree)
- return LuaCode.Value(tree.source, repr(\%escapecode))
- end
- nomsu.COMPILE_ACTIONS[\%name.." %"] = function(nomsu, tree, text)
- return LuaCode.Value(tree.source, repr(\%escapecode), "..", nomsu:compile(text), "..'\\\\27[0m'")
- end
+ run ".."
+ compile [\%name] to: Lua value (quote \(quote %escapecode))
+ compile [\%name %text] to
+ Lua value ".."
+ (\\(quote \(quote %escapecode))..\\(%text as lua expr)..\(quote "\27[0m"))