Hello,
I'm doing a script that validates HScript compilation.
This code reports ZeroDivisionError('float division by zero')
function Test() {
var test = 1e10;
}
This is a valid Haxe code, and I expect that script should support it.
Code of the checker
import sys.io.File;
import sys.FileSystem;
import hscript.Parser;
import hscript.Interp;
import hscript.Checker;
import StringTools;
import Sys;
class HscriptChecker {
static function main() {
var args = Sys.args();
var filePath = args[0];
try {
var code = File.getContent(filePath);
var parser = new Parser();
parser.allowTypes = true;
parser.allowMetadata = true;
parser.parseString(code);
} catch (e:Dynamic) {
var msg = Std.string(e);
var fileName = FileSystem.fullPath(filePath);
msg = StringTools.replace(msg, "hscript", filePath);
Sys.println(msg);
Sys.exit(1);
}
}
}