Browse Source

[php7] replace `Syntax.binop(.=)` with more analyzer-friendly `= Syntax.binop(.)`

Alexander Kuzmenko 8 years ago
parent
commit
1943b5bb97
2 changed files with 7 additions and 7 deletions
  1. 3 3
      std/php7/_std/StringBuf.hx
  2. 4 4
      std/php7/_std/haxe/io/BytesBuffer.hx

+ 3 - 3
std/php7/_std/StringBuf.hx

@@ -38,11 +38,11 @@ import php.Syntax;
 
 
 	public function add<T>( x : T ) : Void {
 	public function add<T>( x : T ) : Void {
 		if( x == null ) {
 		if( x == null ) {
-			Syntax.binop(b, '.=', 'null');
+			b = Syntax.binop(b, '.', 'null');
 		} else if( Global.is_bool(x) ) {
 		} else if( Global.is_bool(x) ) {
-			Syntax.binop(b, '.=', ((x:Dynamic) ? 'true' : 'false'));
+			b = Syntax.binop(b, '.', ((x:Dynamic) ? 'true' : 'false'));
 		} else if( Global.is_string(x) ) {
 		} else if( Global.is_string(x) ) {
-			Syntax.binop(b, '.=', x);
+			b = Syntax.binop(b, '.', x);
 		} else {
 		} else {
 			b += x;
 			b += x;
 		}
 		}

+ 4 - 4
std/php7/_std/haxe/io/BytesBuffer.hx

@@ -34,15 +34,15 @@ class BytesBuffer {
 	}
 	}
 
 
 	public inline function addByte( byte : Int ) {
 	public inline function addByte( byte : Int ) {
-		Syntax.binop(b, '.=', Global.chr(byte));
+		b = Syntax.binop(b, '.', Global.chr(byte));
 	}
 	}
 
 
 	public inline function add( src : Bytes ) {
 	public inline function add( src : Bytes ) {
-		Syntax.binop(b, '.=', src.getData().toNativeString());
+		b = Syntax.binop(b, '.', src.getData().toNativeString());
 	}
 	}
 
 
 	public inline function addString( v : String ) {
 	public inline function addString( v : String ) {
-		Syntax.binop(b, '.=', v);
+		b = Syntax.binop(b, '.', v);
 	}
 	}
 
 
 	public function addInt32( v : Int ) {
 	public function addInt32( v : Int ) {
@@ -69,7 +69,7 @@ class BytesBuffer {
 		if( pos < 0 || len < 0 || pos + len > src.length ) {
 		if( pos < 0 || len < 0 || pos + len > src.length ) {
 			throw Error.OutsideBounds;
 			throw Error.OutsideBounds;
 		} else {
 		} else {
-			b += src.getData().sub(pos, len).toString();
+			b = Syntax.binop(b, '.', src.getData().sub(pos, len).toString());
 		}
 		}
 	}
 	}