Skip to content

Commit c00f8e9

Browse files
committedDec 4, 2015
exporting classes fully qualified - 2nd attempt
1 parent aa093db commit c00f8e9

File tree

1 file changed

+15
-8
lines changed

1 file changed

+15
-8
lines changed
 

‎script/RunScript.hx

+15-8
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ class RunScript {
2424
Sys.setCwd(workingDirectory);
2525
} catch (e:Dynamic) {
2626
error("Failed to set current working directory to [" + workingDirectory + "]");
27-
Sys.exit(1);
2827
}
2928

3029
if (args.length == 0) {
@@ -71,13 +70,21 @@ class RunScript {
7170
interp.variables.set("StringTools", StringTools);
7271
interp.variables.set("Sys", Sys);
7372
interp.variables.set("Xml", Xml);
74-
interp.variables.set("sys.FileSystem", sys.FileSystem);
75-
interp.variables.set("sys.io.File", sys.io.File);
76-
interp.variables.set("sys.net.Host", sys.net.Host);
77-
interp.variables.set("haxe.Json", haxe.Json);
78-
interp.variables.set("haxe.Http", haxe.Http);
79-
interp.variables.set("haxe.Serializer", haxe.Serializer);
80-
interp.variables.set("haxe.Unserializer", haxe.Unserializer);
73+
interp.variables.set("sys", {
74+
"FileSystem": sys.FileSystem,
75+
"io": {
76+
"File": sys.io.File
77+
},
78+
"net": {
79+
"Host": sys.net.Host
80+
}
81+
});
82+
interp.variables.set("haxe", {
83+
"Json": haxe.Json,
84+
"Http": haxe.Http,
85+
"Serializer": haxe.Serializer,
86+
"Unserializer": haxe.Unserializer
87+
});
8188

8289
info(interp.execute(program));
8390
}

0 commit comments

Comments
 (0)
Please sign in to comment.