diff options
| author | s-ol <s-ol@users.noreply.github.com> | 2020-02-03 10:59:10 +0000 |
|---|---|---|
| committer | s-ol <s-ol@users.noreply.github.com> | 2020-02-03 11:00:32 +0000 |
| commit | 1b6da2babfc65c4b8f6f7ac8644c0498e094bab7 (patch) | |
| tree | 61ef0fc20c511cd8936e6af2d889a2ffddab9211 /init.moon | |
| parent | fix error handling again (diff) | |
| download | alive-1b6da2babfc65c4b8f6f7ac8644c0498e094bab7.tar.gz alive-1b6da2babfc65c4b8f6f7ac8644c0498e094bab7.zip | |
Forward references
Diffstat (limited to 'init.moon')
| -rw-r--r-- | init.moon | 15 |
1 files changed, 13 insertions, 2 deletions
@@ -4,7 +4,18 @@ import Logger from require 'logger' import Registry from require 'registry' import Copilot from require 'copilot' -Logger.init! +arguments, key = {} +for a in *arg + if match = a\match '^%-%-(.*)' + key = match + arguments[key] = true + elseif key + arguments[key] = a + key = nil + else + table.insert arguments, a + +Logger.init arguments.log delta = do gettime = -> @@ -18,7 +29,7 @@ delta = do last = time env = Registry! -copilot = Copilot arg[1], env +copilot = Copilot arguments[1], env while true copilot\poll! |
