aboutsummaryrefslogtreecommitdiff
path: root/nomsu.moon
diff options
context:
space:
mode:
authorBruce Hill <bitbucket@bruce-hill.com>2017-09-12 23:12:45 -0700
committerBruce Hill <bitbucket@bruce-hill.com>2017-09-12 23:12:45 -0700
commit522a0397677c78a7d73b7095cead198fa162b927 (patch)
tree62184a369d77d7ee332fdaec95c5478dd7f67a2d /nomsu.moon
parent8221616cd620de69cc3ede2efed4bb60482a723f (diff)
Fixed some bugs with generated code.
Diffstat (limited to 'nomsu.moon')
-rwxr-xr-xnomsu.moon4
1 files changed, 2 insertions, 2 deletions
diff --git a/nomsu.moon b/nomsu.moon
index 243dd64..1c87a8e 100755
--- a/nomsu.moon
+++ b/nomsu.moon
@@ -532,7 +532,7 @@ class Compiler
-- Run on the command line via "./nomsu.moon input_file.nom" to execute
-- and "./nomsu.moon input_file.nom output_file.lua" to compile (use "-" to compile to stdout)
-if arg[1]
+if arg and arg[1]
c = Compiler()
input = io.open(arg[1])\read("*a")
-- Kinda hacky, if run via "./nomsu.moon file.nom -", then silence print and io.write
@@ -560,7 +560,7 @@ if arg[1]
end
local utils = require('utils')
local Compiler = require('nomsu')
- local c = Compiler(require('core'))
+ local c = Compiler()
load()(c, {})
]]