Mercurial Hosting > luan
comparison core/src/luan/LuanState.java @ 173:58c6ca5d4524
fix build.sh
git-svn-id: https://luan-java.googlecode.com/svn/trunk@174 21e917c8-12df-6dd8-5cb6-c86387c605b9
author | fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9> |
---|---|
date | Sun, 22 Jun 2014 07:46:49 +0000 |
parents | 4edbf3204ca6 |
children | cf939124461a |
comparison
equal
deleted
inserted
replaced
172:4edbf3204ca6 | 173:58c6ca5d4524 |
---|---|
120 t = (LuanTable)obj; | 120 t = (LuanTable)obj; |
121 } | 121 } |
122 return t.put(a[a.length-1],value); | 122 return t.put(a[a.length-1],value); |
123 } | 123 } |
124 | 124 |
125 public final void globalImport(String modName) throws LuanException { | 125 public final void globalImport(String modName) { |
126 Object mod = PackageLuan.require(this,modName); | 126 try { |
127 global.put(modName,mod); | 127 Object mod = PackageLuan.require(this,modName); |
128 global.put(modName,mod); | |
129 } catch(LuanException e) { | |
130 throw new RuntimeException(e); | |
131 } | |
128 } | 132 } |
129 | 133 |
130 public static LuanState newStandard() { | 134 public static LuanState newStandard() { |
131 try { | 135 try { |
132 LuanState luan = LuanCompiler.newLuanState(); | 136 LuanState luan = LuanCompiler.newLuanState(); |