diff options
| -rw-r--r-- | ansicolors.lua | 37 | ||||
| -rw-r--r-- | nomsu.lua | 2 | ||||
| -rwxr-xr-x | nomsu.moon | 3 |
3 files changed, 3 insertions, 39 deletions
diff --git a/ansicolors.lua b/ansicolors.lua deleted file mode 100644 index 7b87c0b..0000000 --- a/ansicolors.lua +++ /dev/null @@ -1,37 +0,0 @@ -local colors = { - -- attributes - reset = 0, - clear = 0, - bright = 1, - dim = 2, - underscore = 4, - blink = 5, - reverse = 7, - hidden = 8, - - -- foreground - black = 30, - red = 31, - green = 32, - yellow = 33, - blue = 34, - magenta = 35, - cyan = 36, - white = 37, - - -- background - onblack = 40, - onred = 41, - ongreen = 42, - onyellow = 43, - onblue = 44, - onmagenta = 45, - oncyan = 46, - onwhite = 47, -} - -local _M = {} -for c, v in pairs(colors) do - _M[c] = string.char(27)..("[%dm"):format(v) -end -return _M @@ -2,7 +2,7 @@ local re = require('re') local lpeg = require('lpeg') local utils = require('utils') local repr = utils.repr -local colors = require('ansicolors') +local colors = require('consolecolors') local colored = setmetatable({ }, { __index = function(_, color) return (function(msg) @@ -15,13 +15,14 @@ re = require 're' lpeg = require 'lpeg' utils = require 'utils' repr = utils.repr -colors = require 'ansicolors' +colors = require 'consolecolors' colored = setmetatable({}, {__index:(_,color)-> ((msg)-> colors[color]..msg..colors.reset)}) {:insert, :remove, :concat} = table --pcall = (fn,...)-> true, fn(...) -- TODO: -- check robustness/functionality of compiler mode. +-- Maybe get GOTOs working at file scope. -- use actual variables instead of a vars table -- consider non-linear codegen, rather than doing thunks for things like comprehensions -- improve indentation of generated lua code |
