diff options
| author | Bruce Hill <bitbucket@bruce-hill.com> | 2017-09-21 14:11:34 -0700 |
|---|---|---|
| committer | Bruce Hill <bitbucket@bruce-hill.com> | 2017-09-21 14:11:34 -0700 |
| commit | 4fd6b61a0074ea69f0ce3e11768e867d355307ac (patch) | |
| tree | 0a2f80fc106f0dbc334e1c338d0900906e34723e /nomsu.moon | |
| parent | 79ad6b07c1aa5f32b7d8481f2937fa02680c2937 (diff) | |
Fixed bug that caused files to get reloaded if they returned nil.
Diffstat (limited to 'nomsu.moon')
| -rwxr-xr-x | nomsu.moon | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -548,7 +548,7 @@ class NomsuCompiler file = io.open(vars.filename) if not file @error "File does not exist: #{vars.filename}" - @loaded_files[vars.filename] = @run(file\read('*a'), vars.filename) + @loaded_files[vars.filename] = (@run(file\read('*a'), vars.filename)) or true return @loaded_files[vars.filename] @def "run file %filename", (vars)=> @@ -561,6 +561,8 @@ class NomsuCompiler -- 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 and arg[1] + --ProFi = require 'ProFi' + --ProFi\start() c = NomsuCompiler() input = io.open(arg[1])\read("*a") -- If run via "./nomsu.moon file.nom -", then silence output and print generated @@ -586,6 +588,8 @@ if arg and arg[1] local c = NomsuCompiler() return load()(c, {}) ]] + --ProFi\stop() + --ProFi\writeReport( 'MyProfilingReport.txt' ) elseif arg -- REPL: |
