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.lua | |
| parent | 87e4777aee530fa3bd6ce6fe1d7a206819247660 (diff) | |
Moved colors to only when invoking from command line.
Diffstat (limited to 'nomsu.lua')
| -rw-r--r-- | nomsu.lua | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -2,7 +2,11 @@ local re = require('re') local lpeg = require('lpeg') local utils = require('utils') local repr = utils.repr -local colors = require('consolecolors') +local colors = setmetatable({ }, { + __index = function() + return "" + end +}) local colored = setmetatable({ }, { __index = function(_, color) return (function(msg) @@ -842,6 +846,7 @@ do NomsuCompiler = _class_0 end if arg then + colors = require('consolecolors') local parser = re.compile([[ args <- {| {:flags: flags? :} ({:input: input :} ";" ("-o;"{:output: output :} ";")?)? (";")? |} !. flags <- (({| ({flag} ";")* |}) -> set) flag <- "-c" / "-i" / "-p" / "-f" / "--help" / "-h" |
