From ad342b63b7b6f07f9c8dc44fc09f7d478b7bb1e0 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Sun, 24 Jun 2018 16:11:08 -0700 Subject: Simplifications/streamlining the Make process, and cleaning up some of how command line interaction and `use %` work. --- lib/consolecolor.nom | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'lib') 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")) -- cgit v1.2.3