|
@@ -43,12 +43,11 @@ public class ScriptingEngine {
|
43
|
43
|
space = new ModuleSpace(registry, new ArrayList<>(), StorageType.getStandard());
|
44
|
44
|
|
45
|
45
|
try {
|
46
|
|
- File stdlibsFolder = new File(ScriptingEngine.class.getResource("/StdLibs").getPath());
|
47
|
|
- FolderPackage stdlibs = new FolderPackage(stdlibsFolder);
|
|
46
|
+ ZippedPackage stdlibs = new ZippedPackage(ScriptingEngine.class.getResourceAsStream("/StdLibs.zip"));
|
48
|
47
|
SemanticModule stdlibModule = stdlibs.loadModule(space, "stdlib", null, new SemanticModule[0], FunctionParameter.NONE, stdlib);
|
49
|
48
|
stdlibModule = Validator.validate(stdlibModule, error -> System.out.println(error.toString()));
|
50
|
49
|
space.addModule("stdlib", stdlibModule);
|
51
|
|
- } catch (CompileException | ParseException ex) {
|
|
50
|
+ } catch (CompileException | ParseException | IOException ex) {
|
52
|
51
|
throw new RuntimeException(ex);
|
53
|
52
|
}
|
54
|
53
|
this.logger = new EmptyLogger();
|