From 4efe44ed271aeed8e25e909344788d92a0d9f82b Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Sun, 11 Nov 2018 15:50:46 -0800 Subject: Fully upgraded to 4.10.12.7, including deprecating the old list/dict comprehension methods, in favor of the new native support. --- lib/consolecolor.nom | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) (limited to 'lib/consolecolor.nom') diff --git a/lib/consolecolor.nom b/lib/consolecolor.nom index 1016c0b..aabb740 100644 --- a/lib/consolecolor.nom +++ b/lib/consolecolor.nom @@ -1,23 +1,26 @@ -#!/usr/bin/env nomsu -V4.8.10 +#!/usr/bin/env nomsu -V4.10.12.7 # This file defines actions for ANSI console color escape codes. - + test: % = (bright "\(green)Color test passed.") + %colors = {..} - normal:0, "reset color":0, bright:1, bold:1, dim:2, italic:3, underscore:4 - "slow blink":5, "fast blink":6, reverse:7, inverse:7, inverted:7, hidden:8 - # There's some other codes, but they're not currently implemented - black:30, red:31, green:32, yellow:33, blue:34, magenta:35, cyan:36, white:37 - "on black":40, "on red":41, "on green":42, "on yellow":43, "on blue":44 - "on magenta":45, "on cyan":46, "on white":47 + normal: 0, "reset color": 0, bright: 1, bold: 1, dim: 2, italic: 3, underscore: 4 + "slow blink": 5, "fast blink": 6, reverse: 7, inverse: 7, inverted: 7 + hidden: 8, # There's some other codes, but they're not currently implemented + black: 30, red: 31, green: 32, yellow: 33, blue: 34, magenta: 35, cyan: 36 + white: 37, "on black": 40, "on red": 41, "on green": 42, "on yellow": 43 + "on blue": 44, "on magenta": 45, "on cyan": 46, "on white": 47 for %name = %colornum in %colors: %colornum = "\%colornum" + #(=lua "COMPILE_ACTIONS").%name = (..) [%nomsu, %tree] -> (Lua "'\\027[\(%colornum)m'") %compile.action.%name = (..) [%nomsu, %text] ->: if %text: return (Lua "('\\027[\(%colornum)m'..\(%text as lua expr)..'\\027[0m')") - ..else: return (Lua "'\\027[\(%colornum)m'") + ..else: + return (Lua "'\\027[\(%colornum)m'") -- cgit v1.2.3