Mercurial Hosting > luan
diff core/src/luan/cmd_line.luan @ 554:18504c41b0be
move debug() to Io and remove Debug module;
Io.print() now doesn't print newline if there is nothing to be printed;
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Thu, 18 Jun 2015 03:30:18 -0600 |
parents | 8dcf9e12446b |
children | e25ba7a2e816 |
line wrap: on
line diff
--- a/core/src/luan/cmd_line.luan Thu Jun 18 03:14:07 2015 -0600 +++ b/core/src/luan/cmd_line.luan Thu Jun 18 03:30:18 2015 -0600 @@ -1,17 +1,17 @@ local Luan = require "luan:Luan" -local ipairs = Luan.ipairs -local load_file = Luan.load_file -local try = Luan.try +local error = Luan.error +local ipairs = Luan.ipairs or error() +local load_file = Luan.load_file or error() +local try = Luan.try or error() local Table = require "luan:Table" local Io = require "luan:Io" -local print = Io.print -local Debug = require "luan:Debug" +local print = Io.print or error() local args = {...} if #args == 0 then print(Luan.VERSION) - Debug.debug("> ") + Io.debug("> ") else local file = args[1] Luan.arg = {} @@ -21,7 +21,7 @@ try { function() local main_file = load_file(file,true) - Debug.print_if_something( main_file( Table.unpack(Luan.arg) ) ) + print( main_file( Table.unpack(Luan.arg) ) ) end; catch = function(e) -- java(); e.java.printStackTrace(); return