Mercurial Hosting > luan
comparison src/luan/modules/PackageLuan.java @ 1353:8d95711f6615
replace java() with require "java"
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Wed, 20 Mar 2019 17:03:29 -0600 |
parents | e0cf0d108a77 |
children | 56fb5cd8228d |
comparison
equal
deleted
inserted
replaced
1352:1604d7f36f3a | 1353:8d95711f6615 |
---|---|
36 } | 36 } |
37 return tbl; | 37 return tbl; |
38 } | 38 } |
39 | 39 |
40 public static Object require(Luan luan,String modName) throws LuanException { | 40 public static Object require(Luan luan,String modName) throws LuanException { |
41 if( "java".equals(modName) ) { | |
42 JavaLuan.java(luan); | |
43 return true; | |
44 } | |
41 Object mod = load(luan,modName); | 45 Object mod = load(luan,modName); |
42 if( mod.equals(Boolean.FALSE) ) | 46 if( mod.equals(Boolean.FALSE) ) |
43 throw new LuanException( "module '"+modName+"' not found" ); | 47 throw new LuanException( "module '"+modName+"' not found" ); |
44 return mod; | 48 return mod; |
45 } | 49 } |