From 33fe40453b593e8e09ffd0c332cef1d83b02bff9 Mon Sep 17 00:00:00 2001 From: tianfenghan Date: Fri, 22 May 2026 20:44:38 +0800 Subject: [PATCH] =?UTF-8?q?feat(php):=20=E6=B7=BB=E5=8A=A0=E5=B7=A6?= =?UTF-8?q?=E7=A7=BB=E8=B5=8B=E5=80=BC=E6=93=8D=E4=BD=9C=E7=AC=A6=E6=94=AF?= =?UTF-8?q?=E6=8C=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 实现了 Expr_AssignOp_ShiftLeft 节点解析 - 添加了 parseAssignOpShiftLeft 方法处理左移赋值操作 --- src/Php/CompilerBase.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/Php/CompilerBase.php b/src/Php/CompilerBase.php index fad1a54b..05726f23 100644 --- a/src/Php/CompilerBase.php +++ b/src/Php/CompilerBase.php @@ -573,6 +573,8 @@ class CompilerBase extends \PhpAot\Core\Translator return $this->parseAssignOpMod($expr); case 'Expr_AssignOp_Concat': return $this->parseAssignOpConcat($expr); + case 'Expr_AssignOp_ShiftLeft': + return $this->parseAssignOpShiftLeft($expr); case 'Expr_AssignOp_ShiftRight': return $this->parseAssignOpShiftRight($expr); case 'Expr_AssignOp_BitwiseAnd': @@ -4158,6 +4160,11 @@ class CompilerBase extends \PhpAot\Core\Translator return $getProperty; } + protected function parseAssignOpShiftLeft(Expr\AssignOp\ShiftLeft $node): string + { + return $this->parseAssignOp($node, '<<='); + } + protected function parseAssignOpShiftRight(Expr\AssignOp\ShiftRight $node): string { return $this->parseAssignOp($node, '>>=');