Mercurial Hosting > luan
diff core/src/luan/LuanState.java @ 398:39c4ac11a58a
add LuanState.require()
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Mon, 27 Apr 2015 12:44:53 -0600 |
parents | fed1893821bf |
children | 8f1be9704726 |
line wrap: on
line diff
--- a/core/src/luan/LuanState.java Mon Apr 27 12:25:30 2015 -0600 +++ b/core/src/luan/LuanState.java Mon Apr 27 12:44:53 2015 -0600 @@ -42,11 +42,15 @@ return registry; } + public final Object require(String modName) throws LuanException { + return PackageLuan.require(this,modName); + } + public static LuanState newStandard() { try { LuanState luan = LuanCompiler.newLuanState(); - PackageLuan.require(luan,"luan:Luan"); - PackageLuan.require(luan,"luan:Io"); + luan.require("luan:Luan"); + luan.require("luan:Io"); return luan; } catch(LuanException e) { throw new RuntimeException(e);