feat(php): 添加左移赋值操作符支持

- 实现了 Expr_AssignOp_ShiftLeft 节点解析
- 添加了 parseAssignOpShiftLeft 方法处理左移赋值操作
pull/1/head
韩天峰 3 months ago
parent 77e0268f0a
commit 33fe40453b
  1. 7
      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, '>>=');

Loading…
Cancel
Save