diff --git a/src/parser/xhpast/__tests__/data/yyinitdepth.php.test b/src/parser/xhpast/__tests__/data/yyinitdepth.php.test new file mode 100644 index 0000000..bd8db58 --- /dev/null +++ b/src/parser/xhpast/__tests__/data/yyinitdepth.php.test @@ -0,0 +1,65 @@ + $right; +} else if ($node instanceof Node\Expr\BinaryOp\GreaterOrEqual) { + return $left >= $right; +} else if ($node instanceof Node\Expr\BinaryOp\Identical) { + return $left === $right; +} else if ($node instanceof Node\Expr\BinaryOp\LogicalAnd) { + return $left && $right; +} else if ($node instanceof Node\Expr\BinaryOp\LogicalOr) { + return $left || $right; +} else if ($node instanceof Node\Expr\BinaryOp\LogicalXor) { + return $left xor $right; +} else if ($node instanceof Node\Expr\BinaryOp\Minus) { + return $left - $right; +} else if ($node instanceof Node\Expr\BinaryOp\Mod) { + return $left % $right; +} else if ($node instanceof Node\Expr\BinaryOp\Mul) { + return $left * $right; +} else if ($node instanceof Node\Expr\BinaryOp\NotEqual) { + return $left != $right; +} else if ($node instanceof Node\Expr\BinaryOp\NotIdentical) { + return $left !== $right; +} else if ($node instanceof Node\Expr\BinaryOp\Plus) { + return $left + $right; +} else if ($node instanceof Node\Expr\BinaryOp\Pow) { + return pow($left, $right); +} else if ($node instanceof Node\Expr\BinaryOp\ShiftLeft) { + return $left << $right; +} else if ($node instanceof Node\Expr\BinaryOp\ShiftRight) { + return $left >> $right; +} else if ($node instanceof Node\Expr\BinaryOp\Smaller) { + return $left < $right; +} else if ($node instanceof Node\Expr\BinaryOp\SmallerOrEqual) { + return $left <= $right; +} else if ($node instanceof Node\Expr\BinaryOp\Spaceship) { + if ($left < $right) { + return -1; + } else if ($left == $right) { + return 0; + } else { + return 1; + } +} +~~~~~~~~~~ +pass