fix hscript.Bytes with -D hscriptPos (close #64)

This commit is contained in:
Andy Li
2018-05-11 17:58:04 +08:00
parent c17366b2b1
commit 0ff49845a7
2 changed files with 5 additions and 0 deletions
+1
View File
@@ -64,6 +64,7 @@ script:
haxe build.hxml &&
popd
- haxe bin/build-interp.hxml
- haxe bin/build-interp.hxml -D hscriptPos
- haxe bin/build-neko.hxml && neko bin/Test.n
- haxe bin/build-js.hxml && node bin/Test.js
- haxe bin/build-java.hxml && java -jar bin/Test.jar
+4
View File
@@ -251,6 +251,10 @@ class Bytes {
function doDecode() : Expr {
#if hscriptPos
if (bin.get(pin) == 255) {
pin++;
return null;
}
var origin = doDecodeString();
var line = doDecodeInt();
return { e : _doDecode(), pmin : 0, pmax : 0, origin : origin, line : line };