fixes for -D hscriptPos
This commit is contained in:
@@ -130,6 +130,9 @@ class Bytes {
|
||||
}
|
||||
|
||||
function doEncode( e : Expr ) {
|
||||
#if hscriptPos
|
||||
var e = e.e;
|
||||
#end
|
||||
bout.addByte(Type.enumIndex(e));
|
||||
switch( e ) {
|
||||
case EConst(c):
|
||||
@@ -234,6 +237,11 @@ class Bytes {
|
||||
}
|
||||
|
||||
function doDecode() : Expr {
|
||||
#if hscriptPos
|
||||
return { e : _doDecode(), pmin : 0, pmax : 0 };
|
||||
}
|
||||
function _doDecode() : ExprDef {
|
||||
#end
|
||||
return switch( bin.get(pin++) ) {
|
||||
case 0:
|
||||
EConst( doDecodeConst() );
|
||||
|
||||
@@ -738,7 +738,11 @@ class Parser {
|
||||
case TOp(op):
|
||||
if( op == ">" ) break;
|
||||
if( op.charCodeAt(0) == ">".code ) {
|
||||
#if hscriptPos
|
||||
tokens.add({ t : TOp(op.substr(1)), min : tokenMax - op.length - 1, max : tokenMax });
|
||||
#else
|
||||
tokens.add(TOp(op.substr(1)));
|
||||
#end
|
||||
break;
|
||||
}
|
||||
default:
|
||||
|
||||
Reference in New Issue
Block a user