Mercurial Hosting > luan
changeset 322:f8ece87df2b1
minor fixes
git-svn-id: https://luan-java.googlecode.com/svn/trunk@323 21e917c8-12df-6dd8-5cb6-c86387c605b9
author | fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9> |
---|---|
date | Sun, 08 Feb 2015 22:03:27 +0000 |
parents | 7f7708e8fdd4 |
children | cd2924a1052c |
files | core/src/luan/cmd_line.luan core/src/luan/modules/Debug.luan core/src/luan/modules/Luan.luan scripts/build-luan.sh |
diffstat | 4 files changed, 7 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
diff -r 7f7708e8fdd4 -r f8ece87df2b1 core/src/luan/cmd_line.luan --- a/core/src/luan/cmd_line.luan Sun Feb 08 07:26:20 2015 +0000 +++ b/core/src/luan/cmd_line.luan Sun Feb 08 22:03:27 2015 +0000 @@ -5,6 +5,7 @@ require "luan:String" -- for String methods local Table = require "luan:Table" local Io = require "luan:Io" +local print = Io.print local Debug = require "luan:Debug" @@ -64,7 +65,7 @@ i = i + 1 end end -if showVersion then print(_VERSION) end +if showVersion then print(Luan.VERSION) end if i <= #args then local file = args[i] local arg = {}
diff -r 7f7708e8fdd4 -r f8ece87df2b1 core/src/luan/modules/Debug.luan --- a/core/src/luan/modules/Debug.luan Sun Feb 08 07:26:20 2015 +0000 +++ b/core/src/luan/modules/Debug.luan Sun Feb 08 22:03:27 2015 +0000 @@ -1,6 +1,8 @@ -local Table = require "luan:Table" +local Luan = require "luan:Luan" +local load = Luan.load local Io = require "luan:Io" local print = Io.print +local Table = require "luan:Table" function print_if_something(...)
diff -r 7f7708e8fdd4 -r f8ece87df2b1 core/src/luan/modules/Luan.luan --- a/core/src/luan/modules/Luan.luan Sun Feb 08 07:26:20 2015 +0000 +++ b/core/src/luan/modules/Luan.luan Sun Feb 08 22:03:27 2015 +0000 @@ -29,4 +29,4 @@ type = BasicLuan.type values = BasicLuan.values -VERSION = require("classpath:luan/Version").VERSION +VERSION = do_file "classpath:luan/Version.luan"
diff -r 7f7708e8fdd4 -r f8ece87df2b1 scripts/build-luan.sh --- a/scripts/build-luan.sh Sun Feb 08 07:26:20 2015 +0000 +++ b/scripts/build-luan.sh Sun Feb 08 22:03:27 2015 +0000 @@ -18,7 +18,7 @@ mkdir $LUAN_BUILD/luan/jars cd $LUAN_HOME -echo "VERSION = 'Luan $VERSION'" >core/src/luan/Version.luan +echo "return 'Luan $VERSION'" >core/src/luan/Version.luan cd $LUAN_HOME SRC=core/src