diff options
| author | Bruce Hill <bitbucket@bruce-hill.com> | 2017-10-08 20:41:05 -0700 |
|---|---|---|
| committer | Bruce Hill <bitbucket@bruce-hill.com> | 2017-10-08 20:41:05 -0700 |
| commit | e8c820b8f566297ef2330260c2d092012c3d2622 (patch) | |
| tree | 120f84ea9c90e6a263b7bf54520bee50a5aef69b /nomsu.moon | |
| parent | 87e4777aee530fa3bd6ce6fe1d7a206819247660 (diff) | |
Moved colors to only when invoking from command line.
Diffstat (limited to 'nomsu.moon')
| -rwxr-xr-x | nomsu.moon | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -15,7 +15,7 @@ re = require 're' lpeg = require 'lpeg' utils = require 'utils' repr = utils.repr -colors = require 'consolecolors' +colors = setmetatable({}, {__index:->""}) colored = setmetatable({}, {__index:(_,color)-> ((msg)-> colors[color]..msg..colors.reset)}) {:insert, :remove, :concat} = table --pcall = (fn,...)-> true, fn(...) @@ -591,6 +591,8 @@ class NomsuCompiler if arg + export colors + colors = require 'consolecolors' parser = re.compile([[ args <- {| {:flags: flags? :} ({:input: input :} ";" ("-o;"{:output: output :} ";")?)? (";")? |} !. flags <- (({| ({flag} ";")* |}) -> set) |
