Rename Scalar\LNumber to Scalar\Int_

This commit is contained in:
Nikita Popov 2022-09-03 11:58:59 +02:00
parent 66b20bd6bc
commit 23835d20ef
73 changed files with 476 additions and 459 deletions

View File

@ -75,6 +75,7 @@ used.
A number of AST nodes have been renamed or moved in the AST hierarchy: A number of AST nodes have been renamed or moved in the AST hierarchy:
* `Node\Scalar\LNumber` is now `Node\Scalar\Int_`.
* `Node\Scalar\DNumber` is now `Node\Scalar\Float_`. * `Node\Scalar\DNumber` is now `Node\Scalar\Float_`.
* `Node\Expr\ClosureUse` is now `Node\ClosureUse` and no longer extends `Node\Expr`. * `Node\Expr\ClosureUse` is now `Node\ClosureUse` and no longer extends `Node\Expr`.
* `Node\Expr\ArrayItem` is now `Node\ArrayItem` and no longer extends `Node\Expr`. * `Node\Expr\ArrayItem` is now `Node\ArrayItem` and no longer extends `Node\Expr`.

View File

@ -45,7 +45,7 @@ use PhpParser\Node\{Expr, Scalar};
$evaluator = new ConstExprEvaluator(); $evaluator = new ConstExprEvaluator();
// 10 / 0 // 10 / 0
$expr = new Expr\BinaryOp\Div(new Scalar\LNumber(10), new Scalar\LNumber(0)); $expr = new Expr\BinaryOp\Div(new Scalar\Int_(10), new Scalar\Int_(0));
var_dump($evaluator->evaluateDirectly($expr)); // float(INF) var_dump($evaluator->evaluateDirectly($expr)); // float(INF)
// Warning: Division by zero // Warning: Division by zero
@ -112,4 +112,4 @@ class Test {
const A = self::B; const A = self::B;
const B = self::A; const B = self::A;
} }
``` ```

View File

@ -11,7 +11,7 @@ use PhpParser\{Node, NodeTraverser, NodeVisitorAbstract};
$traverser = new NodeTraverser; $traverser = new NodeTraverser;
$traverser->addVisitor(new class extends NodeVisitorAbstract { $traverser->addVisitor(new class extends NodeVisitorAbstract {
public function leaveNode(Node $node) { public function leaveNode(Node $node) {
if ($node instanceof Node\Scalar\LNumber) { if ($node instanceof Node\Scalar\Int_) {
return new Node\Scalar\String_((string) $node->value); return new Node\Scalar\String_((string) $node->value);
} }
} }

View File

@ -236,7 +236,7 @@ final class BuilderHelpers {
} }
if (is_int($value)) { if (is_int($value)) {
return new Scalar\LNumber($value); return new Scalar\Int_($value);
} }
if (is_float($value)) { if (is_float($value)) {

View File

@ -102,7 +102,7 @@ class ConstExprEvaluator {
} }
private function evaluate(Expr $expr) { private function evaluate(Expr $expr) {
if ($expr instanceof Scalar\LNumber if ($expr instanceof Scalar\Int_
|| $expr instanceof Scalar\Float_ || $expr instanceof Scalar\Float_
|| $expr instanceof Scalar\String_ || $expr instanceof Scalar\String_
) { ) {

View File

@ -0,0 +1,82 @@
<?php declare(strict_types=1);
namespace PhpParser\Node\Scalar;
use PhpParser\Error;
use PhpParser\Node\Scalar;
class Int_ extends Scalar {
/* For use in "kind" attribute */
public const KIND_BIN = 2;
public const KIND_OCT = 8;
public const KIND_DEC = 10;
public const KIND_HEX = 16;
/** @var int Number value */
public $value;
/**
* Constructs an integer number scalar node.
*
* @param int $value Value of the number
* @param array $attributes Additional attributes
*/
public function __construct(int $value, array $attributes = []) {
$this->attributes = $attributes;
$this->value = $value;
}
public function getSubNodeNames(): array {
return ['value'];
}
/**
* Constructs an Int node from a string number literal.
*
* @param string $str String number literal (decimal, octal, hex or binary)
* @param array $attributes Additional attributes
* @param bool $allowInvalidOctal Whether to allow invalid octal numbers (PHP 5)
*
* @return Int_ The constructed LNumber, including kind attribute
*/
public static function fromString(string $str, array $attributes = [], bool $allowInvalidOctal = false): Int_ {
$attributes['rawValue'] = $str;
$str = str_replace('_', '', $str);
if ('0' !== $str[0] || '0' === $str) {
$attributes['kind'] = Int_::KIND_DEC;
return new Int_((int) $str, $attributes);
}
if ('x' === $str[1] || 'X' === $str[1]) {
$attributes['kind'] = Int_::KIND_HEX;
return new Int_(hexdec($str), $attributes);
}
if ('b' === $str[1] || 'B' === $str[1]) {
$attributes['kind'] = Int_::KIND_BIN;
return new Int_(bindec($str), $attributes);
}
if (!$allowInvalidOctal && strpbrk($str, '89')) {
throw new Error('Invalid numeric literal', $attributes);
}
// Strip optional explicit octal prefix.
if ('o' === $str[1] || 'O' === $str[1]) {
$str = substr($str, 2);
}
// use intval instead of octdec to get proper cutting behavior with malformed numbers
$attributes['kind'] = Int_::KIND_OCT;
return new Int_(intval($str, 8), $attributes);
}
public function getType(): string {
return 'Scalar_Int';
}
}
// @deprecated compatibility alias
class_alias(Int_::class, LNumber::class);

View File

@ -1,79 +1,3 @@
<?php declare(strict_types=1); <?php declare(strict_types=1);
namespace PhpParser\Node\Scalar; require __DIR__ . '/Int_.php';
use PhpParser\Error;
use PhpParser\Node\Scalar;
class LNumber extends Scalar {
/* For use in "kind" attribute */
public const KIND_BIN = 2;
public const KIND_OCT = 8;
public const KIND_DEC = 10;
public const KIND_HEX = 16;
/** @var int Number value */
public $value;
/**
* Constructs an integer number scalar node.
*
* @param int $value Value of the number
* @param array $attributes Additional attributes
*/
public function __construct(int $value, array $attributes = []) {
$this->attributes = $attributes;
$this->value = $value;
}
public function getSubNodeNames(): array {
return ['value'];
}
/**
* Constructs an LNumber node from a string number literal.
*
* @param string $str String number literal (decimal, octal, hex or binary)
* @param array $attributes Additional attributes
* @param bool $allowInvalidOctal Whether to allow invalid octal numbers (PHP 5)
*
* @return LNumber The constructed LNumber, including kind attribute
*/
public static function fromString(string $str, array $attributes = [], bool $allowInvalidOctal = false): LNumber {
$attributes['rawValue'] = $str;
$str = str_replace('_', '', $str);
if ('0' !== $str[0] || '0' === $str) {
$attributes['kind'] = LNumber::KIND_DEC;
return new LNumber((int) $str, $attributes);
}
if ('x' === $str[1] || 'X' === $str[1]) {
$attributes['kind'] = LNumber::KIND_HEX;
return new LNumber(hexdec($str), $attributes);
}
if ('b' === $str[1] || 'B' === $str[1]) {
$attributes['kind'] = LNumber::KIND_BIN;
return new LNumber(bindec($str), $attributes);
}
if (!$allowInvalidOctal && strpbrk($str, '89')) {
throw new Error('Invalid numeric literal', $attributes);
}
// Strip optional explicit octal prefix.
if ('o' === $str[1] || 'O' === $str[1]) {
$str = substr($str, 2);
}
// use intval instead of octdec to get proper cutting behavior with malformed numbers
$attributes['kind'] = LNumber::KIND_OCT;
return new LNumber(intval($str, 8), $attributes);
}
public function getType(): string {
return 'Scalar_LNumber';
}
}

View File

@ -14,7 +14,7 @@ use PhpParser\Node\Expr\Cast\Double;
use PhpParser\Node\Name; use PhpParser\Node\Name;
use PhpParser\Node\Param; use PhpParser\Node\Param;
use PhpParser\Node\Scalar\Encapsed; use PhpParser\Node\Scalar\Encapsed;
use PhpParser\Node\Scalar\LNumber; use PhpParser\Node\Scalar\Int_;
use PhpParser\Node\Scalar\String_; use PhpParser\Node\Scalar\String_;
use PhpParser\Node\Stmt\Class_; use PhpParser\Node\Stmt\Class_;
use PhpParser\Node\Stmt\ClassConst; use PhpParser\Node\Stmt\ClassConst;
@ -664,11 +664,11 @@ abstract class ParserAbstract implements Parser {
protected function parseLNumber($str, $attributes, $allowInvalidOctal = false) { protected function parseLNumber($str, $attributes, $allowInvalidOctal = false) {
try { try {
return LNumber::fromString($str, $attributes, $allowInvalidOctal); return Int_::fromString($str, $attributes, $allowInvalidOctal);
} catch (Error $error) { } catch (Error $error) {
$this->emitError($error); $this->emitError($error);
// Use dummy value // Use dummy value
return new LNumber(0, $attributes); return new Int_(0, $attributes);
} }
} }
@ -678,7 +678,7 @@ abstract class ParserAbstract implements Parser {
* @param string $str Number string * @param string $str Number string
* @param array $attributes Attributes * @param array $attributes Attributes
* *
* @return LNumber|String_ Integer or string node. * @return Int_|String_ Integer or string node.
*/ */
protected function parseNumString(string $str, array $attributes) { protected function parseNumString(string $str, array $attributes) {
if (!preg_match('/^(?:0|-?[1-9][0-9]*)$/', $str)) { if (!preg_match('/^(?:0|-?[1-9][0-9]*)$/', $str)) {
@ -690,7 +690,7 @@ abstract class ParserAbstract implements Parser {
return new String_($str, $attributes); return new String_($str, $attributes);
} }
return new LNumber($num, $attributes); return new Int_($num, $attributes);
} }
protected function stripIndentation( protected function stripIndentation(

View File

@ -181,15 +181,15 @@ class Standard extends PrettyPrinterAbstract {
return '"' . $this->pEncapsList($node->parts, '"') . '"'; return '"' . $this->pEncapsList($node->parts, '"') . '"';
} }
protected function pScalar_LNumber(Scalar\LNumber $node) { protected function pScalar_Int(Scalar\Int_ $node) {
if ($node->value === -\PHP_INT_MAX-1) { if ($node->value === -\PHP_INT_MAX-1) {
// PHP_INT_MIN cannot be represented as a literal, // PHP_INT_MIN cannot be represented as a literal,
// because the sign is not part of the literal // because the sign is not part of the literal
return '(-' . \PHP_INT_MAX . '-1)'; return '(-' . \PHP_INT_MAX . '-1)';
} }
$kind = $node->getAttribute('kind', Scalar\LNumber::KIND_DEC); $kind = $node->getAttribute('kind', Scalar\Int_::KIND_DEC);
if (Scalar\LNumber::KIND_DEC === $kind) { if (Scalar\Int_::KIND_DEC === $kind) {
return (string) $node->value; return (string) $node->value;
} }
@ -201,11 +201,11 @@ class Standard extends PrettyPrinterAbstract {
$str = (string) $node->value; $str = (string) $node->value;
} }
switch ($kind) { switch ($kind) {
case Scalar\LNumber::KIND_BIN: case Scalar\Int_::KIND_BIN:
return $sign . '0b' . base_convert($str, 10, 2); return $sign . '0b' . base_convert($str, 10, 2);
case Scalar\LNumber::KIND_OCT: case Scalar\Int_::KIND_OCT:
return $sign . '0' . base_convert($str, 10, 8); return $sign . '0' . base_convert($str, 10, 8);
case Scalar\LNumber::KIND_HEX: case Scalar\Int_::KIND_HEX:
return $sign . '0x' . base_convert($str, 10, 16); return $sign . '0x' . base_convert($str, 10, 16);
} }
throw new \Exception('Invalid number kind'); throw new \Exception('Invalid number kind');

View File

@ -12,7 +12,7 @@ use PhpParser\Node\Expr;
use PhpParser\Node\Identifier; use PhpParser\Node\Identifier;
use PhpParser\Node\Name; use PhpParser\Node\Name;
use PhpParser\Node\Scalar; use PhpParser\Node\Scalar;
use PhpParser\Node\Scalar\LNumber; use PhpParser\Node\Scalar\Int_;
use PhpParser\Node\Stmt; use PhpParser\Node\Stmt;
class ClassConstTest extends \PHPUnit\Framework\TestCase { class ClassConstTest extends \PHPUnit\Framework\TestCase {
@ -29,7 +29,7 @@ class ClassConstTest extends \PHPUnit\Framework\TestCase {
$this->assertEquals( $this->assertEquals(
new Stmt\ClassConst( new Stmt\ClassConst(
[ [
new Const_("TEST", new LNumber(1)) new Const_("TEST", new Int_(1))
], ],
Modifiers::PRIVATE Modifiers::PRIVATE
), ),
@ -44,7 +44,7 @@ class ClassConstTest extends \PHPUnit\Framework\TestCase {
$this->assertEquals( $this->assertEquals(
new Stmt\ClassConst( new Stmt\ClassConst(
[ [
new Const_("TEST", new LNumber(1)) new Const_("TEST", new Int_(1))
], ],
Modifiers::PROTECTED Modifiers::PROTECTED
), ),
@ -59,7 +59,7 @@ class ClassConstTest extends \PHPUnit\Framework\TestCase {
$this->assertEquals( $this->assertEquals(
new Stmt\ClassConst( new Stmt\ClassConst(
[ [
new Const_("TEST", new LNumber(1)) new Const_("TEST", new Int_(1))
], ],
Modifiers::PUBLIC Modifiers::PUBLIC
), ),
@ -74,7 +74,7 @@ class ClassConstTest extends \PHPUnit\Framework\TestCase {
$this->assertEquals( $this->assertEquals(
new Stmt\ClassConst( new Stmt\ClassConst(
[ [
new Const_("TEST", new LNumber(1)) new Const_("TEST", new Int_(1))
], ],
Modifiers::FINAL Modifiers::FINAL
), ),
@ -91,7 +91,7 @@ class ClassConstTest extends \PHPUnit\Framework\TestCase {
$this->assertEquals( $this->assertEquals(
new Stmt\ClassConst( new Stmt\ClassConst(
[ [
new Const_("TEST", new LNumber(1)) new Const_("TEST", new Int_(1))
], ],
Modifiers::PUBLIC, Modifiers::PUBLIC,
[ [
@ -110,8 +110,8 @@ class ClassConstTest extends \PHPUnit\Framework\TestCase {
$this->assertEquals( $this->assertEquals(
new Stmt\ClassConst( new Stmt\ClassConst(
[ [
new Const_("FIRST_TEST", new LNumber(1)), new Const_("FIRST_TEST", new Int_(1)),
new Const_("SECOND_TEST", new LNumber(2)) new Const_("SECOND_TEST", new Int_(2))
] ]
), ),
$node $node
@ -121,7 +121,7 @@ class ClassConstTest extends \PHPUnit\Framework\TestCase {
public function testAddAttribute() { public function testAddAttribute() {
$attribute = new Attribute( $attribute = new Attribute(
new Name('Attr'), new Name('Attr'),
[new Arg(new LNumber(1), false, false, [], new Identifier('name'))] [new Arg(new Int_(1), false, false, [], new Identifier('name'))]
); );
$attributeGroup = new AttributeGroup([$attribute]); $attributeGroup = new AttributeGroup([$attribute]);
@ -132,7 +132,7 @@ class ClassConstTest extends \PHPUnit\Framework\TestCase {
$this->assertEquals( $this->assertEquals(
new Stmt\ClassConst( new Stmt\ClassConst(
[ [
new Const_("ATTR_GROUP", new LNumber(1)) new Const_("ATTR_GROUP", new Int_(1))
], ],
0, 0,
[], [],
@ -169,7 +169,7 @@ class ClassConstTest extends \PHPUnit\Framework\TestCase {
], ],
[ [
31415, 31415,
new Scalar\LNumber(31415) new Scalar\Int_(31415)
], ],
[ [
3.1415, 3.1415,
@ -182,9 +182,9 @@ class ClassConstTest extends \PHPUnit\Framework\TestCase {
[ [
[1, 2, 3], [1, 2, 3],
new Expr\Array_([ new Expr\Array_([
new \PhpParser\Node\ArrayItem(new Scalar\LNumber(1)), new \PhpParser\Node\ArrayItem(new Scalar\Int_(1)),
new \PhpParser\Node\ArrayItem(new Scalar\LNumber(2)), new \PhpParser\Node\ArrayItem(new Scalar\Int_(2)),
new \PhpParser\Node\ArrayItem(new Scalar\LNumber(3)), new \PhpParser\Node\ArrayItem(new Scalar\Int_(3)),
]) ])
], ],
[ [

View File

@ -10,7 +10,7 @@ use PhpParser\Node\Attribute;
use PhpParser\Node\AttributeGroup; use PhpParser\Node\AttributeGroup;
use PhpParser\Node\Identifier; use PhpParser\Node\Identifier;
use PhpParser\Node\Name; use PhpParser\Node\Name;
use PhpParser\Node\Scalar\LNumber; use PhpParser\Node\Scalar\Int_;
use PhpParser\Node\Stmt; use PhpParser\Node\Stmt;
class ClassTest extends \PHPUnit\Framework\TestCase { class ClassTest extends \PHPUnit\Framework\TestCase {
@ -144,7 +144,7 @@ DOC;
public function testAddAttribute() { public function testAddAttribute() {
$attribute = new Attribute( $attribute = new Attribute(
new Name('Attr'), new Name('Attr'),
[new Arg(new LNumber(1), false, false, [], new Identifier('name'))] [new Arg(new Int_(1), false, false, [], new Identifier('name'))]
); );
$attributeGroup = new AttributeGroup([$attribute]); $attributeGroup = new AttributeGroup([$attribute]);

View File

@ -9,7 +9,7 @@ use PhpParser\Node\AttributeGroup;
use PhpParser\Node\Identifier; use PhpParser\Node\Identifier;
use PhpParser\Node\Name; use PhpParser\Node\Name;
use PhpParser\Node\Scalar; use PhpParser\Node\Scalar;
use PhpParser\Node\Scalar\LNumber; use PhpParser\Node\Scalar\Int_;
use PhpParser\Node\Stmt; use PhpParser\Node\Stmt;
class EnumCaseTest extends \PHPUnit\Framework\TestCase { class EnumCaseTest extends \PHPUnit\Framework\TestCase {
@ -37,7 +37,7 @@ class EnumCaseTest extends \PHPUnit\Framework\TestCase {
public function testAddAttribute() { public function testAddAttribute() {
$attribute = new Attribute( $attribute = new Attribute(
new Name('Attr'), new Name('Attr'),
[new Arg(new LNumber(1), false, false, [], new Identifier('name'))] [new Arg(new Int_(1), false, false, [], new Identifier('name'))]
); );
$attributeGroup = new AttributeGroup([$attribute]); $attributeGroup = new AttributeGroup([$attribute]);
@ -72,7 +72,7 @@ class EnumCaseTest extends \PHPUnit\Framework\TestCase {
return [ return [
[ [
31415, 31415,
new Scalar\LNumber(31415) new Scalar\Int_(31415)
], ],
[ [
'Hallo World', 'Hallo World',

View File

@ -9,7 +9,7 @@ use PhpParser\Node\Attribute;
use PhpParser\Node\AttributeGroup; use PhpParser\Node\AttributeGroup;
use PhpParser\Node\Identifier; use PhpParser\Node\Identifier;
use PhpParser\Node\Name; use PhpParser\Node\Name;
use PhpParser\Node\Scalar\LNumber; use PhpParser\Node\Scalar\Int_;
use PhpParser\Node\Stmt; use PhpParser\Node\Stmt;
class EnumTest extends \PHPUnit\Framework\TestCase { class EnumTest extends \PHPUnit\Framework\TestCase {
@ -109,7 +109,7 @@ DOC;
public function testAddAttribute() { public function testAddAttribute() {
$attribute = new Attribute( $attribute = new Attribute(
new Name('Attr'), new Name('Attr'),
[new Arg(new LNumber(1), false, false, [], new Identifier('name'))] [new Arg(new Int_(1), false, false, [], new Identifier('name'))]
); );
$attributeGroup = new AttributeGroup([$attribute]); $attributeGroup = new AttributeGroup([$attribute]);

View File

@ -11,7 +11,7 @@ use PhpParser\Node\Expr\Print_;
use PhpParser\Node\Expr\Variable; use PhpParser\Node\Expr\Variable;
use PhpParser\Node\Identifier; use PhpParser\Node\Identifier;
use PhpParser\Node\Name; use PhpParser\Node\Name;
use PhpParser\Node\Scalar\LNumber; use PhpParser\Node\Scalar\Int_;
use PhpParser\Node\Scalar\String_; use PhpParser\Node\Scalar\String_;
use PhpParser\Node\Stmt; use PhpParser\Node\Stmt;
@ -89,7 +89,7 @@ class FunctionTest extends \PHPUnit\Framework\TestCase {
public function testAddAttribute() { public function testAddAttribute() {
$attribute = new Attribute( $attribute = new Attribute(
new Name('Attr'), new Name('Attr'),
[new Arg(new LNumber(1), false, false, [], new Identifier('name'))] [new Arg(new Int_(1), false, false, [], new Identifier('name'))]
); );
$attributeGroup = new AttributeGroup([$attribute]); $attributeGroup = new AttributeGroup([$attribute]);

View File

@ -10,7 +10,7 @@ use PhpParser\Node\AttributeGroup;
use PhpParser\Node\Identifier; use PhpParser\Node\Identifier;
use PhpParser\Node\Name; use PhpParser\Node\Name;
use PhpParser\Node\Scalar\Float_; use PhpParser\Node\Scalar\Float_;
use PhpParser\Node\Scalar\LNumber; use PhpParser\Node\Scalar\Int_;
use PhpParser\Node\Stmt; use PhpParser\Node\Stmt;
class InterfaceTest extends \PHPUnit\Framework\TestCase { class InterfaceTest extends \PHPUnit\Framework\TestCase {
@ -84,7 +84,7 @@ class InterfaceTest extends \PHPUnit\Framework\TestCase {
public function testAddAttribute() { public function testAddAttribute() {
$attribute = new Attribute( $attribute = new Attribute(
new Name('Attr'), new Name('Attr'),
[new Arg(new LNumber(1), false, false, [], new Identifier('name'))] [new Arg(new Int_(1), false, false, [], new Identifier('name'))]
); );
$attributeGroup = new AttributeGroup([$attribute]); $attributeGroup = new AttributeGroup([$attribute]);

View File

@ -12,7 +12,7 @@ use PhpParser\Node\Expr\Print_;
use PhpParser\Node\Expr\Variable; use PhpParser\Node\Expr\Variable;
use PhpParser\Node\Identifier; use PhpParser\Node\Identifier;
use PhpParser\Node\Name; use PhpParser\Node\Name;
use PhpParser\Node\Scalar\LNumber; use PhpParser\Node\Scalar\Int_;
use PhpParser\Node\Scalar\String_; use PhpParser\Node\Scalar\String_;
use PhpParser\Node\Stmt; use PhpParser\Node\Stmt;
@ -131,7 +131,7 @@ class MethodTest extends \PHPUnit\Framework\TestCase {
public function testAddAttribute() { public function testAddAttribute() {
$attribute = new Attribute( $attribute = new Attribute(
new Name('Attr'), new Name('Attr'),
[new Arg(new LNumber(1), false, false, [], new Identifier('name'))] [new Arg(new Int_(1), false, false, [], new Identifier('name'))]
); );
$attributeGroup = new AttributeGroup([$attribute]); $attributeGroup = new AttributeGroup([$attribute]);

View File

@ -10,7 +10,7 @@ use PhpParser\Node\Expr;
use PhpParser\Node\Identifier; use PhpParser\Node\Identifier;
use PhpParser\Node\Name; use PhpParser\Node\Name;
use PhpParser\Node\Scalar; use PhpParser\Node\Scalar;
use PhpParser\Node\Scalar\LNumber; use PhpParser\Node\Scalar\Int_;
class ParamTest extends \PHPUnit\Framework\TestCase { class ParamTest extends \PHPUnit\Framework\TestCase {
public function createParamBuilder($name) { public function createParamBuilder($name) {
@ -45,7 +45,7 @@ class ParamTest extends \PHPUnit\Framework\TestCase {
], ],
[ [
31415, 31415,
new Scalar\LNumber(31415) new Scalar\Int_(31415)
], ],
[ [
3.1415, 3.1415,
@ -58,9 +58,9 @@ class ParamTest extends \PHPUnit\Framework\TestCase {
[ [
[1, 2, 3], [1, 2, 3],
new Expr\Array_([ new Expr\Array_([
new Node\ArrayItem(new Scalar\LNumber(1)), new Node\ArrayItem(new Scalar\Int_(1)),
new Node\ArrayItem(new Scalar\LNumber(2)), new Node\ArrayItem(new Scalar\Int_(2)),
new Node\ArrayItem(new Scalar\LNumber(3)), new Node\ArrayItem(new Scalar\Int_(3)),
]) ])
], ],
[ [
@ -207,7 +207,7 @@ class ParamTest extends \PHPUnit\Framework\TestCase {
public function testAddAttribute() { public function testAddAttribute() {
$attribute = new Attribute( $attribute = new Attribute(
new Name('Attr'), new Name('Attr'),
[new Arg(new LNumber(1), false, false, [], new Identifier('name'))] [new Arg(new Int_(1), false, false, [], new Identifier('name'))]
); );
$attributeGroup = new AttributeGroup([$attribute]); $attributeGroup = new AttributeGroup([$attribute]);

View File

@ -11,7 +11,7 @@ use PhpParser\Node\Expr;
use PhpParser\Node\Identifier; use PhpParser\Node\Identifier;
use PhpParser\Node\Name; use PhpParser\Node\Name;
use PhpParser\Node\Scalar; use PhpParser\Node\Scalar;
use PhpParser\Node\Scalar\LNumber; use PhpParser\Node\Scalar\Int_;
use PhpParser\Node\Stmt; use PhpParser\Node\Stmt;
class PropertyTest extends \PHPUnit\Framework\TestCase { class PropertyTest extends \PHPUnit\Framework\TestCase {
@ -113,7 +113,7 @@ class PropertyTest extends \PHPUnit\Framework\TestCase {
public function testAddAttribute() { public function testAddAttribute() {
$attribute = new Attribute( $attribute = new Attribute(
new Name('Attr'), new Name('Attr'),
[new Arg(new LNumber(1), false, false, [], new Identifier('name'))] [new Arg(new Int_(1), false, false, [], new Identifier('name'))]
); );
$attributeGroup = new AttributeGroup([$attribute]); $attributeGroup = new AttributeGroup([$attribute]);
@ -152,7 +152,7 @@ class PropertyTest extends \PHPUnit\Framework\TestCase {
], ],
[ [
31415, 31415,
new Scalar\LNumber(31415) new Scalar\Int_(31415)
], ],
[ [
3.1415, 3.1415,
@ -165,9 +165,9 @@ class PropertyTest extends \PHPUnit\Framework\TestCase {
[ [
[1, 2, 3], [1, 2, 3],
new Expr\Array_([ new Expr\Array_([
new \PhpParser\Node\ArrayItem(new Scalar\LNumber(1)), new \PhpParser\Node\ArrayItem(new Scalar\Int_(1)),
new \PhpParser\Node\ArrayItem(new Scalar\LNumber(2)), new \PhpParser\Node\ArrayItem(new Scalar\Int_(2)),
new \PhpParser\Node\ArrayItem(new Scalar\LNumber(3)), new \PhpParser\Node\ArrayItem(new Scalar\Int_(3)),
]) ])
], ],
[ [

View File

@ -9,7 +9,7 @@ use PhpParser\Node\Attribute;
use PhpParser\Node\AttributeGroup; use PhpParser\Node\AttributeGroup;
use PhpParser\Node\Identifier; use PhpParser\Node\Identifier;
use PhpParser\Node\Name; use PhpParser\Node\Name;
use PhpParser\Node\Scalar\LNumber; use PhpParser\Node\Scalar\Int_;
use PhpParser\Node\Stmt; use PhpParser\Node\Stmt;
use PhpParser\Node\Stmt\Class_; use PhpParser\Node\Stmt\Class_;
use PhpParser\Node\Stmt\ClassConst; use PhpParser\Node\Stmt\ClassConst;
@ -96,7 +96,7 @@ class TraitTest extends \PHPUnit\Framework\TestCase {
public function testAddAttribute() { public function testAddAttribute() {
$attribute = new Attribute( $attribute = new Attribute(
new Name('Attr'), new Name('Attr'),
[new Arg(new LNumber(1), false, false, [], new Identifier('name'))] [new Arg(new Int_(1), false, false, [], new Identifier('name'))]
); );
$attributeGroup = new AttributeGroup([$attribute]); $attributeGroup = new AttributeGroup([$attribute]);

View File

@ -8,7 +8,7 @@ use PhpParser\Node\Expr;
use PhpParser\Node\Expr\BinaryOp\Concat; use PhpParser\Node\Expr\BinaryOp\Concat;
use PhpParser\Node\Identifier; use PhpParser\Node\Identifier;
use PhpParser\Node\Name; use PhpParser\Node\Name;
use PhpParser\Node\Scalar\LNumber; use PhpParser\Node\Scalar\Int_;
use PhpParser\Node\Scalar\String_; use PhpParser\Node\Scalar\String_;
class BuilderFactoryTest extends \PHPUnit\Framework\TestCase { class BuilderFactoryTest extends \PHPUnit\Framework\TestCase {
@ -141,7 +141,7 @@ class BuilderFactoryTest extends \PHPUnit\Framework\TestCase {
new Expr\MethodCall( new Expr\MethodCall(
new Expr\Variable('obj'), new Expr\Variable('obj'),
new Identifier('method'), new Identifier('method'),
[new Arg(new LNumber(42))] [new Arg(new Int_(42))]
), ),
$factory->methodCall(new Expr\Variable('obj'), 'method', [42]) $factory->methodCall(new Expr\Variable('obj'), 'method', [42])
); );

View File

@ -174,19 +174,19 @@ class BuilderHelpersTest extends \PHPUnit\Framework\TestCase {
} }
public function testNormalizeValue() { public function testNormalizeValue() {
$expression = new Scalar\LNumber(1); $expression = new Scalar\Int_(1);
$this->assertSame($expression, BuilderHelpers::normalizeValue($expression)); $this->assertSame($expression, BuilderHelpers::normalizeValue($expression));
$this->assertEquals(new Expr\ConstFetch(new Node\Name('null')), BuilderHelpers::normalizeValue(null)); $this->assertEquals(new Expr\ConstFetch(new Node\Name('null')), BuilderHelpers::normalizeValue(null));
$this->assertEquals(new Expr\ConstFetch(new Node\Name('true')), BuilderHelpers::normalizeValue(true)); $this->assertEquals(new Expr\ConstFetch(new Node\Name('true')), BuilderHelpers::normalizeValue(true));
$this->assertEquals(new Expr\ConstFetch(new Node\Name('false')), BuilderHelpers::normalizeValue(false)); $this->assertEquals(new Expr\ConstFetch(new Node\Name('false')), BuilderHelpers::normalizeValue(false));
$this->assertEquals(new Scalar\LNumber(2), BuilderHelpers::normalizeValue(2)); $this->assertEquals(new Scalar\Int_(2), BuilderHelpers::normalizeValue(2));
$this->assertEquals(new Scalar\Float_(2.5), BuilderHelpers::normalizeValue(2.5)); $this->assertEquals(new Scalar\Float_(2.5), BuilderHelpers::normalizeValue(2.5));
$this->assertEquals(new Scalar\String_('text'), BuilderHelpers::normalizeValue('text')); $this->assertEquals(new Scalar\String_('text'), BuilderHelpers::normalizeValue('text'));
$this->assertEquals( $this->assertEquals(
new Expr\Array_([ new Expr\Array_([
new Node\ArrayItem(new Scalar\LNumber(0)), new Node\ArrayItem(new Scalar\Int_(0)),
new Node\ArrayItem(new Scalar\LNumber(1), new Scalar\String_('test')), new Node\ArrayItem(new Scalar\Int_(1), new Scalar\String_('test')),
]), ]),
BuilderHelpers::normalizeValue([ BuilderHelpers::normalizeValue([
0, 0,

View File

@ -7,7 +7,10 @@ use PhpParser\Node\Scalar;
use PhpParser\Node\Stmt; use PhpParser\Node\Stmt;
class CompatibilityTest extends \PHPUnit\Framework\TestCase { class CompatibilityTest extends \PHPUnit\Framework\TestCase {
/** @runInSeparateProcess */ /**
* @runInSeparateProcess
* @preserveGlobalState disabled
*/
public function testAliases1() { public function testAliases1() {
$var = new Expr\Variable('x'); $var = new Expr\Variable('x');
$node = new Node\ClosureUse($var); $node = new Node\ClosureUse($var);
@ -18,9 +21,14 @@ class CompatibilityTest extends \PHPUnit\Framework\TestCase {
$this->assertTrue($node instanceof Stmt\StaticVar); $this->assertTrue($node instanceof Stmt\StaticVar);
$node = new Scalar\Float_(1.0); $node = new Scalar\Float_(1.0);
$this->assertTrue($node instanceof Scalar\DNumber); $this->assertTrue($node instanceof Scalar\DNumber);
$node = new Scalar\Int_(1);
$this->assertTrue($node instanceof Scalar\LNumber);
} }
/** @runInSeparateProcess */ /**
* @runInSeparateProcess
* @preserveGlobalState disabled
*/
public function testAliases2() { public function testAliases2() {
$var = new Expr\Variable('x'); $var = new Expr\Variable('x');
$node = new Node\Expr\ClosureUse($var); $node = new Node\Expr\ClosureUse($var);
@ -31,5 +39,7 @@ class CompatibilityTest extends \PHPUnit\Framework\TestCase {
$this->assertTrue($node instanceof Node\StaticVar); $this->assertTrue($node instanceof Node\StaticVar);
$node = new Node\Scalar\DNumber(1.0); $node = new Node\Scalar\DNumber(1.0);
$this->assertTrue($node instanceof Scalar\Float_); $this->assertTrue($node instanceof Scalar\Float_);
$node = new Node\Scalar\LNumber(1);
$this->assertTrue($node instanceof Scalar\Int_);
} }
} }

View File

@ -89,7 +89,7 @@ class ConstExprEvaluatorTest extends \PHPUnit\Framework\TestCase {
throw new ConstExprEvaluationException(); throw new ConstExprEvaluationException();
}); });
$expr = new Expr\BinaryOp\Plus( $expr = new Expr\BinaryOp\Plus(
new Scalar\LNumber(8), new Scalar\Int_(8),
new Scalar\MagicConst\Line() new Scalar\MagicConst\Line()
); );
$this->assertSame(50, $evaluator->evaluateDirectly($expr)); $this->assertSame(50, $evaluator->evaluateDirectly($expr));
@ -118,12 +118,12 @@ class ConstExprEvaluatorTest extends \PHPUnit\Framework\TestCase {
public function provideTestEvaluateSilently() { public function provideTestEvaluateSilently() {
return [ return [
[ [
new Expr\BinaryOp\Mod(new Scalar\LNumber(42), new Scalar\LNumber(0)), new Expr\BinaryOp\Mod(new Scalar\Int_(42), new Scalar\Int_(0)),
\Error::class, \Error::class,
'Modulo by zero' 'Modulo by zero'
], ],
[ [
new Expr\BinaryOp\Plus(new Scalar\LNumber(42), new Scalar\String_("1foo")), new Expr\BinaryOp\Plus(new Scalar\Int_(42), new Scalar\String_("1foo")),
\ErrorException::class, \ErrorException::class,
\PHP_VERSION_ID >= 80000 \PHP_VERSION_ID >= 80000
? 'A non-numeric value encountered' ? 'A non-numeric value encountered'

View File

@ -4,7 +4,7 @@ namespace PhpParser\Node\Expr;
use PhpParser\Node\Arg; use PhpParser\Node\Arg;
use PhpParser\Node\Name; use PhpParser\Node\Name;
use PhpParser\Node\Scalar\LNumber; use PhpParser\Node\Scalar\Int_;
use PhpParser\Node\VariadicPlaceholder; use PhpParser\Node\VariadicPlaceholder;
class CallableLikeTest extends \PHPUnit\Framework\TestCase { class CallableLikeTest extends \PHPUnit\Framework\TestCase {
@ -19,7 +19,7 @@ class CallableLikeTest extends \PHPUnit\Framework\TestCase {
} }
public function provideTestIsFirstClassCallable() { public function provideTestIsFirstClassCallable() {
$normalArgs = [new Arg(new LNumber(1))]; $normalArgs = [new Arg(new Int_(1))];
$callableArgs = [new VariadicPlaceholder()]; $callableArgs = [new VariadicPlaceholder()];
return [ return [
[new FuncCall(new Name('test'), $normalArgs), false], [new FuncCall(new Name('test'), $normalArgs), false],

View File

@ -15,9 +15,9 @@ class NumberTest extends \PHPUnit\Framework\TestCase {
/** @var Echo_ $echo */ /** @var Echo_ $echo */
$lLumber = $echo->exprs[0]; $lLumber = $echo->exprs[0];
$this->assertInstanceOf(LNumber::class, $lLumber); $this->assertInstanceOf(Int_::class, $lLumber);
/** @var LNumber $lnumber */ /** @var Int_ $lnumber */
$this->assertSame(1234, $lLumber->value); $this->assertSame(1234, $lLumber->value);
$this->assertSame('1_234', $lLumber->getAttribute('rawValue')); $this->assertSame('1_234', $lLumber->getAttribute('rawValue'));
} }

View File

@ -238,7 +238,7 @@ PHP;
} }
}, },
"default": { "default": {
"nodeType": "Scalar_LNumber", "nodeType": "Scalar_Int",
"value": 0, "value": 0,
"attributes": { "attributes": {
"startLine": 4, "startLine": 4,
@ -395,7 +395,7 @@ JSON;
"name": "a" "name": "a"
}, },
"default": { "default": {
"nodeType": "Scalar_LNumber", "nodeType": "Scalar_Int",
"attributes": { "attributes": {
"startLine": 4, "startLine": 4,
"endLine": 4, "endLine": 4,

View File

@ -75,7 +75,7 @@ array(
var: Expr_Variable[2:1 - 2:2]( var: Expr_Variable[2:1 - 2:2](
name: a name: a
) )
expr: Scalar_LNumber[2:6 - 2:6]( expr: Scalar_Int[2:6 - 2:6](
value: 1 value: 1
) )
) )

View File

@ -315,7 +315,7 @@ class NodeTraverserTest extends \PHPUnit\Framework\TestCase {
} }
public function provideTestInvalidReturn() { public function provideTestInvalidReturn() {
$num = new Node\Scalar\LNumber(42); $num = new Node\Scalar\Int_(42);
$expr = new Node\Stmt\Expression($num); $expr = new Node\Stmt\Expression($num);
$stmts = [$expr]; $stmts = [$expr];
@ -338,7 +338,7 @@ class NodeTraverserTest extends \PHPUnit\Framework\TestCase {
['leaveNode', $expr, false], ['leaveNode', $expr, false],
]); ]);
$visitor7 = new NodeVisitorForTesting([ $visitor7 = new NodeVisitorForTesting([
['enterNode', $expr, new Node\Scalar\LNumber(42)], ['enterNode', $expr, new Node\Scalar\Int_(42)],
]); ]);
$visitor8 = new NodeVisitorForTesting([ $visitor8 = new NodeVisitorForTesting([
['enterNode', $num, new Node\Stmt\Return_()], ['enterNode', $num, new Node\Stmt\Return_()],
@ -351,8 +351,8 @@ class NodeTraverserTest extends \PHPUnit\Framework\TestCase {
[$stmts, $visitor4, 'leaveNode() returned invalid value of type string'], [$stmts, $visitor4, 'leaveNode() returned invalid value of type string'],
[$stmts, $visitor5, 'leaveNode() may only return an array if the parent structure is an array'], [$stmts, $visitor5, 'leaveNode() may only return an array if the parent structure is an array'],
[$stmts, $visitor6, 'bool(false) return from leaveNode() no longer supported. Return NodeTraverser::REMOVE_NODE instead'], [$stmts, $visitor6, 'bool(false) return from leaveNode() no longer supported. Return NodeTraverser::REMOVE_NODE instead'],
[$stmts, $visitor7, 'Trying to replace statement (Stmt_Expression) with expression (Scalar_LNumber). Are you missing a Stmt_Expression wrapper?'], [$stmts, $visitor7, 'Trying to replace statement (Stmt_Expression) with expression (Scalar_Int). Are you missing a Stmt_Expression wrapper?'],
[$stmts, $visitor8, 'Trying to replace expression (Scalar_LNumber) with statement (Stmt_Return)'], [$stmts, $visitor8, 'Trying to replace expression (Scalar_Int) with statement (Stmt_Return)'],
]; ];
} }
} }

View File

@ -336,7 +336,7 @@ EOC;
new Stmt\Interface_('B'), new Stmt\Interface_('B'),
new Stmt\Function_('C'), new Stmt\Function_('C'),
new Stmt\Const_([ new Stmt\Const_([
new Node\Const_('D', new Node\Scalar\LNumber(42)) new Node\Const_('D', new Node\Scalar\Int_(42))
]), ]),
new Stmt\Trait_('E'), new Stmt\Trait_('E'),
new Expr\New_(new Stmt\Class_(null)), new Expr\New_(new Stmt\Class_(null)),

View File

@ -127,15 +127,15 @@ EOC;
public function provideTestExtraAttributes() { public function provideTestExtraAttributes() {
return [ return [
['0', ['kind' => Scalar\LNumber::KIND_DEC]], ['0', ['kind' => Scalar\Int_::KIND_DEC]],
['9', ['kind' => Scalar\LNumber::KIND_DEC]], ['9', ['kind' => Scalar\Int_::KIND_DEC]],
['07', ['kind' => Scalar\LNumber::KIND_OCT]], ['07', ['kind' => Scalar\Int_::KIND_OCT]],
['0xf', ['kind' => Scalar\LNumber::KIND_HEX]], ['0xf', ['kind' => Scalar\Int_::KIND_HEX]],
['0XF', ['kind' => Scalar\LNumber::KIND_HEX]], ['0XF', ['kind' => Scalar\Int_::KIND_HEX]],
['0b1', ['kind' => Scalar\LNumber::KIND_BIN]], ['0b1', ['kind' => Scalar\Int_::KIND_BIN]],
['0B1', ['kind' => Scalar\LNumber::KIND_BIN]], ['0B1', ['kind' => Scalar\Int_::KIND_BIN]],
['0o7', ['kind' => Scalar\LNumber::KIND_OCT]], ['0o7', ['kind' => Scalar\Int_::KIND_OCT]],
['0O7', ['kind' => Scalar\LNumber::KIND_OCT]], ['0O7', ['kind' => Scalar\Int_::KIND_OCT]],
['[]', ['kind' => Expr\Array_::KIND_SHORT]], ['[]', ['kind' => Expr\Array_::KIND_SHORT]],
['array()', ['kind' => Expr\Array_::KIND_LONG]], ['array()', ['kind' => Expr\Array_::KIND_LONG]],
["'foo'", ['kind' => String_::KIND_SINGLE_QUOTED]], ["'foo'", ['kind' => String_::KIND_SINGLE_QUOTED]],

View File

@ -7,7 +7,7 @@ use PhpParser\Node\Name;
use PhpParser\Node\Scalar\Float_; use PhpParser\Node\Scalar\Float_;
use PhpParser\Node\Scalar\Encapsed; use PhpParser\Node\Scalar\Encapsed;
use PhpParser\Node\Scalar\EncapsedStringPart; use PhpParser\Node\Scalar\EncapsedStringPart;
use PhpParser\Node\Scalar\LNumber; use PhpParser\Node\Scalar\Int_;
use PhpParser\Node\Scalar\String_; use PhpParser\Node\Scalar\String_;
use PhpParser\Node\Stmt; use PhpParser\Node\Stmt;
use PhpParser\Parser\Php7; use PhpParser\Parser\Php7;
@ -138,11 +138,11 @@ class PrettyPrinterTest extends CodeTestAbstract {
public function provideTestUnnaturalLiterals() { public function provideTestUnnaturalLiterals() {
return [ return [
[new LNumber(-1), '-1'], [new Int_(-1), '-1'],
[new LNumber(-PHP_INT_MAX - 1), '(-' . PHP_INT_MAX . '-1)'], [new Int_(-PHP_INT_MAX - 1), '(-' . PHP_INT_MAX . '-1)'],
[new LNumber(-1, ['kind' => LNumber::KIND_BIN]), '-0b1'], [new Int_(-1, ['kind' => Int_::KIND_BIN]), '-0b1'],
[new LNumber(-1, ['kind' => LNumber::KIND_OCT]), '-01'], [new Int_(-1, ['kind' => Int_::KIND_OCT]), '-01'],
[new LNumber(-1, ['kind' => LNumber::KIND_HEX]), '-0x1'], [new Int_(-1, ['kind' => Int_::KIND_HEX]), '-0x1'],
[new Float_(\INF), '\INF'], [new Float_(\INF), '\INF'],
[new Float_(-\INF), '-\INF'], [new Float_(-\INF), '-\INF'],
[new Float_(-\NAN), '\NAN'], [new Float_(-\NAN), '\NAN'],

View File

@ -93,7 +93,7 @@ if (42) {}
----- -----
array( array(
0: Stmt_If( 0: Stmt_If(
cond: Scalar_LNumber( cond: Scalar_Int(
value: 42 value: 42
) )
stmts: array( stmts: array(

View File

@ -13,7 +13,7 @@ array(
var: Expr_Variable( var: Expr_Variable(
name: a name: a
) )
expr: Scalar_LNumber( expr: Scalar_Int(
value: 42 value: 42
) )
) )
@ -40,7 +40,7 @@ array(
var: Expr_Variable[3:1 - 3:2]( var: Expr_Variable[3:1 - 3:2](
name: a name: a
) )
expr: Scalar_LNumber[3:6 - 3:7]( expr: Scalar_Int[3:6 - 3:7](
value: 42 value: 42
) )
) )
@ -50,7 +50,7 @@ array(
var: Expr_Variable[5:1 - 5:2]( var: Expr_Variable[5:1 - 5:2](
name: b name: b
) )
expr: Scalar_LNumber[5:6 - 5:7]( expr: Scalar_Int[5:6 - 5:7](
value: 24 value: 24
) )
) )
@ -71,7 +71,7 @@ array(
var: Expr_Variable[3:1 - 3:2]( var: Expr_Variable[3:1 - 3:2](
name: a name: a
) )
expr: Scalar_LNumber[3:6 - 3:7]( expr: Scalar_Int[3:6 - 3:7](
value: 42 value: 42
) )
) )
@ -81,7 +81,7 @@ array(
var: Expr_Variable[5:1 - 5:2]( var: Expr_Variable[5:1 - 5:2](
name: b name: b
) )
expr: Scalar_LNumber[5:6 - 5:7]( expr: Scalar_Int[5:6 - 5:7](
value: 24 value: 24
) )
) )
@ -105,7 +105,7 @@ array(
var: Expr_Variable[3:1 - 3:2]( var: Expr_Variable[3:1 - 3:2](
name: a name: a
) )
expr: Scalar_LNumber[3:6 - 3:6]( expr: Scalar_Int[3:6 - 3:6](
value: 1 value: 1
) )
) )
@ -115,7 +115,7 @@ array(
var: Expr_Variable[5:1 - 5:2]( var: Expr_Variable[5:1 - 5:2](
name: b name: b
) )
expr: Scalar_LNumber[5:6 - 5:6]( expr: Scalar_Int[5:6 - 5:6](
value: 2 value: 2
) )
) )
@ -125,7 +125,7 @@ array(
var: Expr_Variable[7:1 - 7:2]( var: Expr_Variable[7:1 - 7:2](
name: c name: c
) )
expr: Scalar_LNumber[7:6 - 7:6]( expr: Scalar_Int[7:6 - 7:6](
value: 3 value: 3
) )
) )
@ -140,4 +140,4 @@ if ($b) {
} }
----- -----
Unterminated comment from 5:5 to 6:2 Unterminated comment from 5:5 to 6:2
Syntax error, unexpected EOF from 6:2 to 6:2 Syntax error, unexpected EOF from 6:2 to 6:2

View File

@ -147,7 +147,7 @@ array(
) )
) )
1: Stmt_Expression( 1: Stmt_Expression(
expr: Scalar_LNumber( expr: Scalar_Int(
value: 1 value: 1
) )
) )
@ -172,7 +172,7 @@ array(
returnType: null returnType: null
stmts: array( stmts: array(
0: Stmt_Expression( 0: Stmt_Expression(
expr: Scalar_LNumber( expr: Scalar_Int(
value: 1 value: 1
) )
) )
@ -195,7 +195,7 @@ array(
var: Expr_Variable( var: Expr_Variable(
name: i name: i
) )
expr: Scalar_LNumber( expr: Scalar_Int(
value: 0 value: 0
) )
) )
@ -205,7 +205,7 @@ array(
var: Expr_Variable( var: Expr_Variable(
name: j name: j
) )
expr: Scalar_LNumber( expr: Scalar_Int(
value: 1 value: 1
) )
) )
@ -215,7 +215,7 @@ array(
var: Expr_Variable( var: Expr_Variable(
name: k name: k
) )
expr: Scalar_LNumber( expr: Scalar_Int(
value: 2 value: 2
) )
) )
@ -238,7 +238,7 @@ array(
var: Expr_Variable( var: Expr_Variable(
name: i name: i
) )
expr: Scalar_LNumber( expr: Scalar_Int(
value: 0 value: 0
) )
) )
@ -248,7 +248,7 @@ array(
var: Expr_Variable( var: Expr_Variable(
name: j name: j
) )
expr: Scalar_LNumber( expr: Scalar_Int(
value: 1 value: 1
) )
) )
@ -258,7 +258,7 @@ array(
var: Expr_Variable( var: Expr_Variable(
name: k name: k
) )
expr: Scalar_LNumber( expr: Scalar_Int(
value: 2 value: 2
) )
) )
@ -513,7 +513,7 @@ array(
name: Identifier( name: Identifier(
name: A name: A
) )
value: Scalar_LNumber( value: Scalar_Int(
value: 1 value: 1
) )
) )
@ -523,7 +523,7 @@ array(
num: null num: null
) )
5: Stmt_Break( 5: Stmt_Break(
num: Scalar_LNumber( num: Scalar_Int(
value: 2 value: 2
) )
) )
@ -531,7 +531,7 @@ array(
num: null num: null
) )
7: Stmt_Continue( 7: Stmt_Continue(
num: Scalar_LNumber( num: Scalar_Int(
value: 2 value: 2
) )
) )
@ -539,7 +539,7 @@ array(
expr: null expr: null
) )
9: Stmt_Return( 9: Stmt_Return(
expr: Scalar_LNumber( expr: Scalar_Int(
value: 2 value: 2
) )
) )
@ -674,7 +674,7 @@ array(
name: Identifier( name: Identifier(
name: A name: A
) )
value: Scalar_LNumber( value: Scalar_Int(
value: 42 value: 42
) )
) )
@ -744,7 +744,7 @@ array(
name: Identifier( name: Identifier(
name: A name: A
) )
value: Scalar_LNumber( value: Scalar_Int(
value: 42 value: 42
) )
) )
@ -804,7 +804,7 @@ array(
key: Identifier( key: Identifier(
name: a name: a
) )
value: Scalar_LNumber( value: Scalar_Int(
value: 42 value: 42
) )
) )
@ -1500,7 +1500,7 @@ array(
name: Identifier( name: Identifier(
name: X name: X
) )
value: Scalar_LNumber( value: Scalar_Int(
value: 1 value: 1
) )
) )

View File

@ -129,7 +129,7 @@ array(
items: array( items: array(
0: ArrayItem( 0: ArrayItem(
key: null key: null
value: Scalar_LNumber( value: Scalar_Int(
value: 1 value: 1
) )
byRef: false byRef: false
@ -137,7 +137,7 @@ array(
) )
1: ArrayItem( 1: ArrayItem(
key: null key: null
value: Scalar_LNumber( value: Scalar_Int(
value: 2 value: 2
) )
byRef: false byRef: false
@ -145,7 +145,7 @@ array(
) )
2: ArrayItem( 2: ArrayItem(
key: null key: null
value: Scalar_LNumber( value: Scalar_Int(
value: 3 value: 3
) )
byRef: false byRef: false

View File

@ -14,7 +14,7 @@ array(
items: array( items: array(
0: ArrayItem[3:2 - 3:2]( 0: ArrayItem[3:2 - 3:2](
key: null key: null
value: Scalar_LNumber[3:2 - 3:2]( value: Scalar_Int[3:2 - 3:2](
value: 1 value: 1
) )
byRef: false byRef: false
@ -29,7 +29,7 @@ array(
) )
2: ArrayItem[3:7 - 3:7]( 2: ArrayItem[3:7 - 3:7](
key: null key: null
value: Scalar_LNumber[3:7 - 3:7]( value: Scalar_Int[3:7 - 3:7](
value: 2 value: 2
) )
byRef: false byRef: false
@ -43,7 +43,7 @@ array(
items: array( items: array(
0: ArrayItem[4:7 - 4:7]( 0: ArrayItem[4:7 - 4:7](
key: null key: null
value: Scalar_LNumber[4:7 - 4:7]( value: Scalar_Int[4:7 - 4:7](
value: 1 value: 1
) )
byRef: false byRef: false
@ -58,7 +58,7 @@ array(
) )
2: ArrayItem[4:12 - 4:12]( 2: ArrayItem[4:12 - 4:12](
key: null key: null
value: Scalar_LNumber[4:12 - 4:12]( value: Scalar_Int[4:12 - 4:12](
value: 2 value: 2
) )
byRef: false byRef: false

View File

@ -32,7 +32,7 @@ array(
items: array( items: array(
0: ArrayItem( 0: ArrayItem(
key: null key: null
value: Scalar_LNumber( value: Scalar_Int(
value: 1 value: 1
) )
byRef: false byRef: false
@ -40,7 +40,7 @@ array(
) )
1: ArrayItem( 1: ArrayItem(
key: null key: null
value: Scalar_LNumber( value: Scalar_Int(
value: 2 value: 2
) )
byRef: false byRef: false
@ -48,7 +48,7 @@ array(
) )
2: ArrayItem( 2: ArrayItem(
key: null key: null
value: Scalar_LNumber( value: Scalar_Int(
value: 3 value: 3
) )
byRef: false byRef: false
@ -74,7 +74,7 @@ array(
items: array( items: array(
0: ArrayItem( 0: ArrayItem(
key: null key: null
value: Scalar_LNumber( value: Scalar_Int(
value: 4 value: 4
) )
byRef: false byRef: false
@ -82,7 +82,7 @@ array(
) )
1: ArrayItem( 1: ArrayItem(
key: null key: null
value: Scalar_LNumber( value: Scalar_Int(
value: 5 value: 5
) )
byRef: false byRef: false
@ -110,7 +110,7 @@ array(
var: Expr_Variable( var: Expr_Variable(
name: i name: i
) )
expr: Scalar_LNumber( expr: Scalar_Int(
value: 11 value: 11
) )
) )
@ -120,7 +120,7 @@ array(
left: Expr_Variable( left: Expr_Variable(
name: i name: i
) )
right: Scalar_LNumber( right: Scalar_Int(
value: 15 value: 15
) )
) )
@ -169,7 +169,7 @@ array(
items: array( items: array(
0: ArrayItem( 0: ArrayItem(
key: null key: null
value: Scalar_LNumber( value: Scalar_Int(
value: 1 value: 1
) )
byRef: false byRef: false
@ -177,7 +177,7 @@ array(
) )
1: ArrayItem( 1: ArrayItem(
key: null key: null
value: Scalar_LNumber( value: Scalar_Int(
value: 2 value: 2
) )
byRef: false byRef: false
@ -185,7 +185,7 @@ array(
) )
2: ArrayItem( 2: ArrayItem(
key: null key: null
value: Scalar_LNumber( value: Scalar_Int(
value: 3 value: 3
) )
byRef: false byRef: false
@ -311,7 +311,7 @@ array(
items: array( items: array(
0: ArrayItem( 0: ArrayItem(
key: null key: null
value: Scalar_LNumber( value: Scalar_Int(
value: 0 value: 0
) )
byRef: false byRef: false
@ -341,7 +341,7 @@ array(
) )
3: ArrayItem( 3: ArrayItem(
key: null key: null
value: Scalar_LNumber( value: Scalar_Int(
value: 6 value: 6
) )
byRef: false byRef: false
@ -349,7 +349,7 @@ array(
) )
4: ArrayItem( 4: ArrayItem(
key: null key: null
value: Scalar_LNumber( value: Scalar_Int(
value: 7 value: 7
) )
byRef: false byRef: false
@ -357,7 +357,7 @@ array(
) )
5: ArrayItem( 5: ArrayItem(
key: null key: null
value: Scalar_LNumber( value: Scalar_Int(
value: 8 value: 8
) )
byRef: false byRef: false
@ -365,7 +365,7 @@ array(
) )
6: ArrayItem( 6: ArrayItem(
key: null key: null
value: Scalar_LNumber( value: Scalar_Int(
value: 9 value: 9
) )
byRef: false byRef: false
@ -373,7 +373,7 @@ array(
) )
7: ArrayItem( 7: ArrayItem(
key: null key: null
value: Scalar_LNumber( value: Scalar_Int(
value: 10 value: 10
) )
byRef: false byRef: false
@ -401,7 +401,7 @@ array(
items: array( items: array(
0: ArrayItem( 0: ArrayItem(
key: null key: null
value: Scalar_LNumber( value: Scalar_Int(
value: 0 value: 0
) )
byRef: false byRef: false

View File

@ -57,7 +57,7 @@ array(
var: Expr_Variable( var: Expr_Variable(
name: x name: x
) )
default: Scalar_LNumber( default: Scalar_Int(
value: 42 value: 42
) )
) )

View File

@ -9,18 +9,18 @@ array(
0: Stmt_Expression( 0: Stmt_Expression(
expr: Expr_BinaryOp_Concat( expr: Expr_BinaryOp_Concat(
left: Expr_BinaryOp_Plus( left: Expr_BinaryOp_Plus(
left: Scalar_LNumber( left: Scalar_Int(
value: 1 value: 1
) )
right: Scalar_LNumber( right: Scalar_Int(
value: 2 value: 2
) )
) )
right: Expr_BinaryOp_Plus( right: Expr_BinaryOp_Plus(
left: Scalar_LNumber( left: Scalar_Int(
value: 3 value: 3
) )
right: Scalar_LNumber( right: Scalar_Int(
value: 4 value: 4
) )
) )
@ -29,18 +29,18 @@ array(
1: Stmt_Expression( 1: Stmt_Expression(
expr: Expr_BinaryOp_Concat( expr: Expr_BinaryOp_Concat(
left: Expr_BinaryOp_ShiftLeft( left: Expr_BinaryOp_ShiftLeft(
left: Scalar_LNumber( left: Scalar_Int(
value: 1 value: 1
) )
right: Scalar_LNumber( right: Scalar_Int(
value: 2 value: 2
) )
) )
right: Expr_BinaryOp_ShiftLeft( right: Expr_BinaryOp_ShiftLeft(
left: Scalar_LNumber( left: Scalar_Int(
value: 3 value: 3
) )
right: Scalar_LNumber( right: Scalar_Int(
value: 4 value: 4
) )
) )
@ -58,18 +58,18 @@ array(
expr: Expr_BinaryOp_Plus( expr: Expr_BinaryOp_Plus(
left: Expr_BinaryOp_Concat( left: Expr_BinaryOp_Concat(
left: Expr_BinaryOp_Plus( left: Expr_BinaryOp_Plus(
left: Scalar_LNumber( left: Scalar_Int(
value: 1 value: 1
) )
right: Scalar_LNumber( right: Scalar_Int(
value: 2 value: 2
) )
) )
right: Scalar_LNumber( right: Scalar_Int(
value: 3 value: 3
) )
) )
right: Scalar_LNumber( right: Scalar_Int(
value: 4 value: 4
) )
) )
@ -77,19 +77,19 @@ array(
1: Stmt_Expression( 1: Stmt_Expression(
expr: Expr_BinaryOp_ShiftLeft( expr: Expr_BinaryOp_ShiftLeft(
left: Expr_BinaryOp_ShiftLeft( left: Expr_BinaryOp_ShiftLeft(
left: Scalar_LNumber( left: Scalar_Int(
value: 1 value: 1
) )
right: Expr_BinaryOp_Concat( right: Expr_BinaryOp_Concat(
left: Scalar_LNumber( left: Scalar_Int(
value: 2 value: 2
) )
right: Scalar_LNumber( right: Scalar_Int(
value: 3 value: 3
) )
) )
) )
right: Scalar_LNumber( right: Scalar_Int(
value: 4 value: 4
) )
) )

View File

@ -48,10 +48,10 @@ array(
name: T_1 name: T_1
) )
value: Expr_BinaryOp_ShiftLeft( value: Expr_BinaryOp_ShiftLeft(
left: Scalar_LNumber( left: Scalar_Int(
value: 1 value: 1
) )
right: Scalar_LNumber( right: Scalar_Int(
value: 1 value: 1
) )
) )
@ -65,10 +65,10 @@ array(
name: T_2 name: T_2
) )
value: Expr_BinaryOp_Div( value: Expr_BinaryOp_Div(
left: Scalar_LNumber( left: Scalar_Int(
value: 1 value: 1
) )
right: Scalar_LNumber( right: Scalar_Int(
value: 2 value: 2
) )
) )
@ -124,7 +124,7 @@ array(
value: 1.5 value: 1.5
) )
) )
right: Scalar_LNumber( right: Scalar_Int(
value: 2 value: 2
) )
) )
@ -143,11 +143,11 @@ array(
left: Scalar_String( left: Scalar_String(
value: foo value: foo
) )
right: Scalar_LNumber( right: Scalar_Int(
value: 2 value: 2
) )
) )
right: Scalar_LNumber( right: Scalar_Int(
value: 3 value: 3
) )
) )
@ -189,7 +189,7 @@ array(
) )
value: Expr_BitwiseNot( value: Expr_BitwiseNot(
expr: Expr_UnaryMinus( expr: Expr_UnaryMinus(
expr: Scalar_LNumber( expr: Scalar_Int(
value: 1 value: 1
) )
) )
@ -206,23 +206,23 @@ array(
value: Expr_BinaryOp_Plus( value: Expr_BinaryOp_Plus(
left: Expr_Ternary( left: Expr_Ternary(
cond: Expr_UnaryMinus( cond: Expr_UnaryMinus(
expr: Scalar_LNumber( expr: Scalar_Int(
value: 1 value: 1
) )
) )
if: null if: null
else: Scalar_LNumber( else: Scalar_Int(
value: 1 value: 1
) )
) )
right: Expr_Ternary( right: Expr_Ternary(
cond: Scalar_LNumber( cond: Scalar_Int(
value: 0 value: 0
) )
if: Scalar_LNumber( if: Scalar_Int(
value: 2 value: 2
) )
else: Scalar_LNumber( else: Scalar_Int(
value: 3 value: 3
) )
) )
@ -237,10 +237,10 @@ array(
name: T_11 name: T_11
) )
value: Expr_BinaryOp_BooleanAnd( value: Expr_BinaryOp_BooleanAnd(
left: Scalar_LNumber( left: Scalar_Int(
value: 1 value: 1
) )
right: Scalar_LNumber( right: Scalar_Int(
value: 0 value: 0
) )
) )
@ -254,10 +254,10 @@ array(
name: T_12 name: T_12
) )
value: Expr_BinaryOp_LogicalAnd( value: Expr_BinaryOp_LogicalAnd(
left: Scalar_LNumber( left: Scalar_Int(
value: 1 value: 1
) )
right: Scalar_LNumber( right: Scalar_Int(
value: 1 value: 1
) )
) )
@ -271,10 +271,10 @@ array(
name: T_13 name: T_13
) )
value: Expr_BinaryOp_BooleanOr( value: Expr_BinaryOp_BooleanOr(
left: Scalar_LNumber( left: Scalar_Int(
value: 0 value: 0
) )
right: Scalar_LNumber( right: Scalar_Int(
value: 0 value: 0
) )
) )
@ -288,10 +288,10 @@ array(
name: T_14 name: T_14
) )
value: Expr_BinaryOp_LogicalOr( value: Expr_BinaryOp_LogicalOr(
left: Scalar_LNumber( left: Scalar_Int(
value: 1 value: 1
) )
right: Scalar_LNumber( right: Scalar_Int(
value: 0 value: 0
) )
) )
@ -305,10 +305,10 @@ array(
name: T_15 name: T_15
) )
value: Expr_BinaryOp_LogicalXor( value: Expr_BinaryOp_LogicalXor(
left: Scalar_LNumber( left: Scalar_Int(
value: 1 value: 1
) )
right: Scalar_LNumber( right: Scalar_Int(
value: 1 value: 1
) )
) )
@ -322,10 +322,10 @@ array(
name: T_16 name: T_16
) )
value: Expr_BinaryOp_LogicalXor( value: Expr_BinaryOp_LogicalXor(
left: Scalar_LNumber( left: Scalar_Int(
value: 1 value: 1
) )
right: Scalar_LNumber( right: Scalar_Int(
value: 0 value: 0
) )
) )
@ -339,10 +339,10 @@ array(
name: T_17 name: T_17
) )
value: Expr_BinaryOp_Smaller( value: Expr_BinaryOp_Smaller(
left: Scalar_LNumber( left: Scalar_Int(
value: 1 value: 1
) )
right: Scalar_LNumber( right: Scalar_Int(
value: 0 value: 0
) )
) )
@ -356,10 +356,10 @@ array(
name: T_18 name: T_18
) )
value: Expr_BinaryOp_SmallerOrEqual( value: Expr_BinaryOp_SmallerOrEqual(
left: Scalar_LNumber( left: Scalar_Int(
value: 0 value: 0
) )
right: Scalar_LNumber( right: Scalar_Int(
value: 0 value: 0
) )
) )
@ -373,10 +373,10 @@ array(
name: T_19 name: T_19
) )
value: Expr_BinaryOp_Greater( value: Expr_BinaryOp_Greater(
left: Scalar_LNumber( left: Scalar_Int(
value: 1 value: 1
) )
right: Scalar_LNumber( right: Scalar_Int(
value: 0 value: 0
) )
) )
@ -390,10 +390,10 @@ array(
name: T_20 name: T_20
) )
value: Expr_BinaryOp_GreaterOrEqual( value: Expr_BinaryOp_GreaterOrEqual(
left: Scalar_LNumber( left: Scalar_Int(
value: 1 value: 1
) )
right: Scalar_LNumber( right: Scalar_Int(
value: 0 value: 0
) )
) )
@ -407,10 +407,10 @@ array(
name: T_21 name: T_21
) )
value: Expr_BinaryOp_Identical( value: Expr_BinaryOp_Identical(
left: Scalar_LNumber( left: Scalar_Int(
value: 1 value: 1
) )
right: Scalar_LNumber( right: Scalar_Int(
value: 1 value: 1
) )
) )
@ -424,10 +424,10 @@ array(
name: T_22 name: T_22
) )
value: Expr_BinaryOp_NotIdentical( value: Expr_BinaryOp_NotIdentical(
left: Scalar_LNumber( left: Scalar_Int(
value: 1 value: 1
) )
right: Scalar_LNumber( right: Scalar_Int(
value: 1 value: 1
) )
) )
@ -441,7 +441,7 @@ array(
name: T_23 name: T_23
) )
value: Expr_BinaryOp_NotEqual( value: Expr_BinaryOp_NotEqual(
left: Scalar_LNumber( left: Scalar_Int(
value: 0 value: 0
) )
right: Scalar_String( right: Scalar_String(
@ -458,7 +458,7 @@ array(
name: T_24 name: T_24
) )
value: Expr_BinaryOp_Equal( value: Expr_BinaryOp_Equal(
left: Scalar_LNumber( left: Scalar_Int(
value: 1 value: 1
) )
right: Scalar_String( right: Scalar_String(
@ -475,14 +475,14 @@ array(
name: T_25 name: T_25
) )
value: Expr_BinaryOp_Plus( value: Expr_BinaryOp_Plus(
left: Scalar_LNumber( left: Scalar_Int(
value: 1 value: 1
) )
right: Expr_BinaryOp_Mul( right: Expr_BinaryOp_Mul(
left: Scalar_LNumber( left: Scalar_Int(
value: 2 value: 2
) )
right: Scalar_LNumber( right: Scalar_Int(
value: 3 value: 3
) )
) )
@ -501,7 +501,7 @@ array(
left: Scalar_String( left: Scalar_String(
value: 1 value: 1
) )
right: Scalar_LNumber( right: Scalar_Int(
value: 2 value: 2
) )
) )
@ -519,10 +519,10 @@ array(
name: T_27 name: T_27
) )
value: Expr_BinaryOp_Pow( value: Expr_BinaryOp_Pow(
left: Scalar_LNumber( left: Scalar_Int(
value: 2 value: 2
) )
right: Scalar_LNumber( right: Scalar_Int(
value: 3 value: 3
) )
) )
@ -540,7 +540,7 @@ array(
items: array( items: array(
0: ArrayItem( 0: ArrayItem(
key: null key: null
value: Scalar_LNumber( value: Scalar_Int(
value: 1 value: 1
) )
byRef: false byRef: false
@ -548,7 +548,7 @@ array(
) )
1: ArrayItem( 1: ArrayItem(
key: null key: null
value: Scalar_LNumber( value: Scalar_Int(
value: 2 value: 2
) )
byRef: false byRef: false
@ -556,7 +556,7 @@ array(
) )
2: ArrayItem( 2: ArrayItem(
key: null key: null
value: Scalar_LNumber( value: Scalar_Int(
value: 3 value: 3
) )
byRef: false byRef: false
@ -564,7 +564,7 @@ array(
) )
) )
) )
dim: Scalar_LNumber( dim: Scalar_Int(
value: 1 value: 1
) )
) )
@ -578,10 +578,10 @@ array(
name: T_29 name: T_29
) )
value: Expr_BinaryOp_Minus( value: Expr_BinaryOp_Minus(
left: Scalar_LNumber( left: Scalar_Int(
value: 12 value: 12
) )
right: Scalar_LNumber( right: Scalar_Int(
value: 13 value: 13
) )
) )
@ -595,10 +595,10 @@ array(
name: T_30 name: T_30
) )
value: Expr_BinaryOp_BitwiseXor( value: Expr_BinaryOp_BitwiseXor(
left: Scalar_LNumber( left: Scalar_Int(
value: 12 value: 12
) )
right: Scalar_LNumber( right: Scalar_Int(
value: 13 value: 13
) )
) )
@ -612,10 +612,10 @@ array(
name: T_31 name: T_31
) )
value: Expr_BinaryOp_BitwiseAnd( value: Expr_BinaryOp_BitwiseAnd(
left: Scalar_LNumber( left: Scalar_Int(
value: 12 value: 12
) )
right: Scalar_LNumber( right: Scalar_Int(
value: 13 value: 13
) )
) )
@ -629,10 +629,10 @@ array(
name: T_32 name: T_32
) )
value: Expr_BinaryOp_BitwiseOr( value: Expr_BinaryOp_BitwiseOr(
left: Scalar_LNumber( left: Scalar_Int(
value: 12 value: 12
) )
right: Scalar_LNumber( right: Scalar_Int(
value: 13 value: 13
) )
) )
@ -646,10 +646,10 @@ array(
name: T_33 name: T_33
) )
value: Expr_BinaryOp_Mod( value: Expr_BinaryOp_Mod(
left: Scalar_LNumber( left: Scalar_Int(
value: 12 value: 12
) )
right: Scalar_LNumber( right: Scalar_Int(
value: 3 value: 3
) )
) )
@ -663,10 +663,10 @@ array(
name: T_34 name: T_34
) )
value: Expr_BinaryOp_ShiftRight( value: Expr_BinaryOp_ShiftRight(
left: Scalar_LNumber( left: Scalar_Int(
value: 100 value: 100
) )
right: Scalar_LNumber( right: Scalar_Int(
value: 4 value: 4
) )
) )

View File

@ -29,10 +29,10 @@ array(
expr: Expr_Isset( expr: Expr_Isset(
vars: array( vars: array(
0: Expr_BinaryOp_Plus( 0: Expr_BinaryOp_Plus(
left: Scalar_LNumber( left: Scalar_Int(
value: 1 value: 1
) )
right: Scalar_LNumber( right: Scalar_Int(
value: 1 value: 1
) )
) )

View File

@ -51,10 +51,10 @@ array(
0: ArrayItem( 0: ArrayItem(
key: null key: null
value: Expr_BinaryOp_Plus( value: Expr_BinaryOp_Plus(
left: Scalar_LNumber( left: Scalar_Int(
value: 1 value: 1
) )
right: Scalar_LNumber( right: Scalar_Int(
value: 1 value: 1
) )
) )

View File

@ -21,7 +21,7 @@ array(
var: Scalar_String( var: Scalar_String(
value: abc value: abc
) )
dim: Scalar_LNumber( dim: Scalar_Int(
value: 2 value: 2
) )
) )
@ -33,15 +33,15 @@ array(
var: Scalar_String( var: Scalar_String(
value: abc value: abc
) )
dim: Scalar_LNumber( dim: Scalar_Int(
value: 2 value: 2
) )
) )
dim: Scalar_LNumber( dim: Scalar_Int(
value: 0 value: 0
) )
) )
dim: Scalar_LNumber( dim: Scalar_Int(
value: 0 value: 0
) )
) )
@ -52,7 +52,7 @@ array(
items: array( items: array(
0: ArrayItem( 0: ArrayItem(
key: null key: null
value: Scalar_LNumber( value: Scalar_Int(
value: 1 value: 1
) )
byRef: false byRef: false
@ -60,7 +60,7 @@ array(
) )
1: ArrayItem( 1: ArrayItem(
key: null key: null
value: Scalar_LNumber( value: Scalar_Int(
value: 2 value: 2
) )
byRef: false byRef: false
@ -68,7 +68,7 @@ array(
) )
2: ArrayItem( 2: ArrayItem(
key: null key: null
value: Scalar_LNumber( value: Scalar_Int(
value: 3 value: 3
) )
byRef: false byRef: false
@ -76,7 +76,7 @@ array(
) )
) )
) )
dim: Scalar_LNumber( dim: Scalar_Int(
value: 2 value: 2
) )
) )
@ -89,7 +89,7 @@ array(
items: array( items: array(
0: ArrayItem( 0: ArrayItem(
key: null key: null
value: Scalar_LNumber( value: Scalar_Int(
value: 1 value: 1
) )
byRef: false byRef: false
@ -97,7 +97,7 @@ array(
) )
1: ArrayItem( 1: ArrayItem(
key: null key: null
value: Scalar_LNumber( value: Scalar_Int(
value: 2 value: 2
) )
byRef: false byRef: false
@ -105,7 +105,7 @@ array(
) )
2: ArrayItem( 2: ArrayItem(
key: null key: null
value: Scalar_LNumber( value: Scalar_Int(
value: 3 value: 3
) )
byRef: false byRef: false
@ -113,15 +113,15 @@ array(
) )
) )
) )
dim: Scalar_LNumber( dim: Scalar_Int(
value: 2 value: 2
) )
) )
dim: Scalar_LNumber( dim: Scalar_Int(
value: 0 value: 0
) )
) )
dim: Scalar_LNumber( dim: Scalar_Int(
value: 0 value: 0
) )
) )
@ -132,7 +132,7 @@ array(
items: array( items: array(
0: ArrayItem( 0: ArrayItem(
key: null key: null
value: Scalar_LNumber( value: Scalar_Int(
value: 1 value: 1
) )
byRef: false byRef: false
@ -140,7 +140,7 @@ array(
) )
1: ArrayItem( 1: ArrayItem(
key: null key: null
value: Scalar_LNumber( value: Scalar_Int(
value: 2 value: 2
) )
byRef: false byRef: false
@ -148,7 +148,7 @@ array(
) )
2: ArrayItem( 2: ArrayItem(
key: null key: null
value: Scalar_LNumber( value: Scalar_Int(
value: 3 value: 3
) )
byRef: false byRef: false
@ -156,7 +156,7 @@ array(
) )
) )
) )
dim: Scalar_LNumber( dim: Scalar_Int(
value: 2 value: 2
) )
) )
@ -169,7 +169,7 @@ array(
items: array( items: array(
0: ArrayItem( 0: ArrayItem(
key: null key: null
value: Scalar_LNumber( value: Scalar_Int(
value: 1 value: 1
) )
byRef: false byRef: false
@ -177,7 +177,7 @@ array(
) )
1: ArrayItem( 1: ArrayItem(
key: null key: null
value: Scalar_LNumber( value: Scalar_Int(
value: 2 value: 2
) )
byRef: false byRef: false
@ -185,7 +185,7 @@ array(
) )
2: ArrayItem( 2: ArrayItem(
key: null key: null
value: Scalar_LNumber( value: Scalar_Int(
value: 3 value: 3
) )
byRef: false byRef: false
@ -193,15 +193,15 @@ array(
) )
) )
) )
dim: Scalar_LNumber( dim: Scalar_Int(
value: 2 value: 2
) )
) )
dim: Scalar_LNumber( dim: Scalar_Int(
value: 0 value: 0
) )
) )
dim: Scalar_LNumber( dim: Scalar_Int(
value: 0 value: 0
) )
) )
@ -215,7 +215,7 @@ array(
) )
) )
) )
dim: Scalar_LNumber( dim: Scalar_Int(
value: 0 value: 0
) )
) )
@ -232,7 +232,7 @@ array(
name: BAR name: BAR
) )
) )
dim: Scalar_LNumber( dim: Scalar_Int(
value: 1 value: 1
) )
) )
@ -249,15 +249,15 @@ array(
name: BAR name: BAR
) )
) )
dim: Scalar_LNumber( dim: Scalar_Int(
value: 2 value: 2
) )
) )
dim: Scalar_LNumber( dim: Scalar_Int(
value: 1 value: 1
) )
) )
dim: Scalar_LNumber( dim: Scalar_Int(
value: 0 value: 0
) )
) )

View File

@ -48,7 +48,7 @@ array(
name: Identifier( name: Identifier(
name: class name: class
) )
value: Scalar_LNumber( value: Scalar_Int(
value: 0 value: 0
) )
byRef: false byRef: false

View File

@ -59,7 +59,7 @@ array(
items: array( items: array(
0: ArrayItem( 0: ArrayItem(
key: null key: null
value: Scalar_LNumber( value: Scalar_Int(
value: 1 value: 1
) )
byRef: false byRef: false
@ -67,7 +67,7 @@ array(
) )
1: ArrayItem( 1: ArrayItem(
key: null key: null
value: Scalar_LNumber( value: Scalar_Int(
value: 2 value: 2
) )
byRef: false byRef: false
@ -75,7 +75,7 @@ array(
) )
2: ArrayItem( 2: ArrayItem(
key: null key: null
value: Scalar_LNumber( value: Scalar_Int(
value: 3 value: 3
) )
byRef: false byRef: false

View File

@ -11,13 +11,13 @@ array(
0: Stmt_Echo( 0: Stmt_Echo(
exprs: array( exprs: array(
0: Expr_Match( 0: Expr_Match(
cond: Scalar_LNumber( cond: Scalar_Int(
value: 1 value: 1
) )
arms: array( arms: array(
0: MatchArm( 0: MatchArm(
conds: array( conds: array(
0: Scalar_LNumber( 0: Scalar_Int(
value: 0 value: 0
) )
) )
@ -27,7 +27,7 @@ array(
) )
1: MatchArm( 1: MatchArm(
conds: array( conds: array(
0: Scalar_LNumber( 0: Scalar_Int(
value: 1 value: 1
) )
) )
@ -55,19 +55,19 @@ array(
name: value name: value
) )
expr: Expr_Match( expr: Expr_Match(
cond: Scalar_LNumber( cond: Scalar_Int(
value: 1 value: 1
) )
arms: array( arms: array(
0: MatchArm( 0: MatchArm(
conds: array( conds: array(
0: Scalar_LNumber( 0: Scalar_Int(
value: 0 value: 0
comments: array( comments: array(
0: // list of conditions 0: // list of conditions
) )
) )
1: Scalar_LNumber( 1: Scalar_Int(
value: 1 value: 1
) )
) )
@ -149,7 +149,7 @@ array(
arms: array( arms: array(
0: MatchArm( 0: MatchArm(
conds: array( conds: array(
0: Scalar_LNumber( 0: Scalar_Int(
value: 1 value: 1
) )
) )
@ -183,16 +183,16 @@ array(
name: value name: value
) )
expr: Expr_Match( expr: Expr_Match(
cond: Scalar_LNumber( cond: Scalar_Int(
value: 1 value: 1
) )
arms: array( arms: array(
0: MatchArm( 0: MatchArm(
conds: array( conds: array(
0: Scalar_LNumber( 0: Scalar_Int(
value: 0 value: 0
) )
1: Scalar_LNumber( 1: Scalar_Int(
value: 1 value: 1
) )
) )

View File

@ -61,7 +61,7 @@ array(
) )
) )
) )
dim: Scalar_LNumber( dim: Scalar_Int(
value: 0 value: 0
) )
) )
@ -77,15 +77,15 @@ array(
) )
) )
) )
dim: Scalar_LNumber( dim: Scalar_Int(
value: 0 value: 0
) )
) )
dim: Scalar_LNumber( dim: Scalar_Int(
value: 1 value: 1
) )
) )
dim: Scalar_LNumber( dim: Scalar_Int(
value: 2 value: 2
) )
) )
@ -99,7 +99,7 @@ array(
) )
) )
) )
dim: Scalar_LNumber( dim: Scalar_Int(
value: 0 value: 0
) )
) )
@ -116,7 +116,7 @@ array(
name: B name: B
) )
) )
dim: Scalar_LNumber( dim: Scalar_Int(
value: 0 value: 0
) )
) )
@ -135,15 +135,15 @@ array(
name: B name: B
) )
) )
dim: Scalar_LNumber( dim: Scalar_Int(
value: 0 value: 0
) )
) )
dim: Scalar_LNumber( dim: Scalar_Int(
value: 1 value: 1
) )
) )
dim: Scalar_LNumber( dim: Scalar_Int(
value: 2 value: 2
) )
) )
@ -160,7 +160,7 @@ array(
name: B name: B
) )
) )
dim: Scalar_LNumber( dim: Scalar_Int(
value: 0 value: 0
) )
) )
@ -258,7 +258,7 @@ array(
expr: Expr_ArrayDimFetch( expr: Expr_ArrayDimFetch(
var: Scalar_MagicConst_Function( var: Scalar_MagicConst_Function(
) )
dim: Scalar_LNumber( dim: Scalar_Int(
value: 0 value: 0
) )
) )

View File

@ -38,7 +38,7 @@ array(
args: array( args: array(
0: Arg( 0: Arg(
name: null name: null
value: Scalar_LNumber( value: Scalar_Int(
value: 1 value: 1
) )
byRef: false byRef: false
@ -81,7 +81,7 @@ array(
args: array( args: array(
0: Arg( 0: Arg(
name: null name: null
value: Scalar_LNumber( value: Scalar_Int(
value: 2 value: 2
) )
byRef: false byRef: false
@ -120,7 +120,7 @@ array(
args: array( args: array(
0: Arg( 0: Arg(
name: null name: null
value: Scalar_LNumber( value: Scalar_Int(
value: 4 value: 4
) )
byRef: false byRef: false
@ -168,7 +168,7 @@ array(
) )
) )
) )
dim: Scalar_LNumber( dim: Scalar_Int(
value: 1 value: 1
) )
) )
@ -189,7 +189,7 @@ array(
args: array( args: array(
0: Arg( 0: Arg(
name: null name: null
value: Scalar_LNumber( value: Scalar_Int(
value: 5 value: 5
) )
byRef: false byRef: false
@ -257,7 +257,7 @@ array(
args: array( args: array(
0: Arg( 0: Arg(
name: null name: null
value: Scalar_LNumber( value: Scalar_Int(
value: 8 value: 8
) )
byRef: false byRef: false
@ -348,7 +348,7 @@ array(
args: array( args: array(
0: Arg( 0: Arg(
name: null name: null
value: Scalar_LNumber( value: Scalar_Int(
value: 9 value: 9
) )
byRef: false byRef: false
@ -422,7 +422,7 @@ array(
args: array( args: array(
0: Arg( 0: Arg(
name: null name: null
value: Scalar_LNumber( value: Scalar_Int(
value: 10 value: 10
) )
byRef: false byRef: false
@ -467,7 +467,7 @@ array(
args: array( args: array(
0: Arg( 0: Arg(
name: null name: null
value: Scalar_LNumber( value: Scalar_Int(
value: 12 value: 12
) )
byRef: false byRef: false
@ -505,7 +505,7 @@ array(
args: array( args: array(
0: Arg( 0: Arg(
name: null name: null
value: Scalar_LNumber( value: Scalar_Int(
value: 13 value: 13
) )
byRef: false byRef: false
@ -534,7 +534,7 @@ array(
args: array( args: array(
0: Arg( 0: Arg(
name: null name: null
value: Scalar_LNumber( value: Scalar_Int(
value: 14 value: 14
) )
byRef: false byRef: false

View File

@ -16,7 +16,7 @@ array(
items: array( items: array(
0: ArrayItem( 0: ArrayItem(
key: null key: null
value: Scalar_LNumber( value: Scalar_Int(
value: 0 value: 0
) )
byRef: false byRef: false
@ -24,7 +24,7 @@ array(
) )
1: ArrayItem( 1: ArrayItem(
key: null key: null
value: Scalar_LNumber( value: Scalar_Int(
value: 1 value: 1
) )
byRef: false byRef: false
@ -37,7 +37,7 @@ array(
) )
) )
) )
dim: Scalar_LNumber( dim: Scalar_Int(
value: 0 value: 0
) )
) )

View File

@ -33,7 +33,7 @@ array(
) )
) )
) )
dim: Scalar_LNumber( dim: Scalar_Int(
value: 0 value: 0
) )
) )
@ -70,14 +70,14 @@ array(
name: b name: b
) )
) )
dim: Scalar_LNumber( dim: Scalar_Int(
value: 0 value: 0
) )
) )
args: array( args: array(
0: Arg( 0: Arg(
name: null name: null
value: Scalar_LNumber( value: Scalar_Int(
value: 1 value: 1
) )
byRef: false byRef: false
@ -93,7 +93,7 @@ array(
items: array( items: array(
0: ArrayItem( 0: ArrayItem(
key: null key: null
value: Scalar_LNumber( value: Scalar_Int(
value: 0 value: 0
) )
byRef: false byRef: false
@ -101,7 +101,7 @@ array(
) )
1: ArrayItem( 1: ArrayItem(
key: null key: null
value: Scalar_LNumber( value: Scalar_Int(
value: 1 value: 1
) )
byRef: false byRef: false
@ -109,11 +109,11 @@ array(
) )
) )
) )
dim: Scalar_LNumber( dim: Scalar_Int(
value: 0 value: 0
) )
) )
expr: Scalar_LNumber( expr: Scalar_Int(
value: 1 value: 1
) )
) )

View File

@ -99,7 +99,7 @@ array(
var: Expr_Variable( var: Expr_Variable(
name: weird name: weird
) )
dim: Scalar_LNumber( dim: Scalar_Int(
value: 0 value: 0
) )
) )

View File

@ -64,7 +64,7 @@ array(
var: Scalar_String( var: Scalar_String(
value: A value: A
) )
dim: Scalar_LNumber( dim: Scalar_Int(
value: 0 value: 0
) )
) )
@ -97,7 +97,7 @@ array(
name: c name: c
) )
) )
dim: Scalar_LNumber( dim: Scalar_Int(
value: 1 value: 1
) )
) )

View File

@ -29,7 +29,7 @@ array(
var: Expr_Variable( var: Expr_Variable(
name: a name: a
) )
dim: Scalar_LNumber( dim: Scalar_Int(
value: -1 value: -1
) )
) )
@ -71,11 +71,11 @@ array(
var: Expr_Variable( var: Expr_Variable(
name: a name: a
) )
dim: Scalar_LNumber( dim: Scalar_Int(
value: @@{ -PHP_INT_MAX - 1 }@@ value: @@{ -PHP_INT_MAX - 1 }@@
) )
) )
) )
) )
) )
) )

View File

@ -72,7 +72,7 @@ array(
var: Expr_Variable( var: Expr_Variable(
name: A name: A
) )
dim: Scalar_LNumber( dim: Scalar_Int(
value: 0 value: 0
) )
) )
@ -86,7 +86,7 @@ array(
var: Expr_Variable( var: Expr_Variable(
name: A name: A
) )
dim: Scalar_LNumber( dim: Scalar_Int(
value: 1234 value: 1234
) )
) )

View File

@ -8,17 +8,17 @@ Explicit octal syntax
----- -----
array( array(
0: Stmt_Expression( 0: Stmt_Expression(
expr: Scalar_LNumber( expr: Scalar_Int(
value: 83 value: 83
) )
) )
1: Stmt_Expression( 1: Stmt_Expression(
expr: Scalar_LNumber( expr: Scalar_Int(
value: 83 value: 83
) )
) )
2: Stmt_Expression( 2: Stmt_Expression(
expr: Scalar_LNumber( expr: Scalar_Int(
value: 83 value: 83
) )
) )

View File

@ -14,17 +14,17 @@ Different integer syntaxes
----- -----
array( array(
0: Stmt_Expression( 0: Stmt_Expression(
expr: Scalar_LNumber( expr: Scalar_Int(
value: 0 value: 0
) )
) )
1: Stmt_Expression( 1: Stmt_Expression(
expr: Scalar_LNumber( expr: Scalar_Int(
value: 1 value: 1
) )
) )
2: Stmt_Expression( 2: Stmt_Expression(
expr: Scalar_LNumber( expr: Scalar_Int(
value: @@{ PHP_INT_MAX }@@ value: @@{ PHP_INT_MAX }@@
) )
) )
@ -34,27 +34,27 @@ array(
) )
) )
4: Stmt_Expression( 4: Stmt_Expression(
expr: Scalar_LNumber( expr: Scalar_Int(
value: 4095 value: 4095
) )
) )
5: Stmt_Expression( 5: Stmt_Expression(
expr: Scalar_LNumber( expr: Scalar_Int(
value: 4095 value: 4095
) )
) )
6: Stmt_Expression( 6: Stmt_Expression(
expr: Scalar_LNumber( expr: Scalar_Int(
value: 4095 value: 4095
) )
) )
7: Stmt_Expression( 7: Stmt_Expression(
expr: Scalar_LNumber( expr: Scalar_Int(
value: 511 value: 511
) )
) )
8: Stmt_Expression( 8: Stmt_Expression(
expr: Scalar_LNumber( expr: Scalar_Int(
value: 3640 value: 3640
) )
) )

View File

@ -7,7 +7,7 @@ Invalid octal literals
Invalid numeric literal from 2:1 to 2:4 Invalid numeric literal from 2:1 to 2:4
array( array(
0: Stmt_Expression( 0: Stmt_Expression(
expr: Scalar_LNumber( expr: Scalar_Int(
value: 0 value: 0
) )
) )
@ -19,7 +19,7 @@ array(
!!version=5.6 !!version=5.6
array( array(
0: Stmt_Expression( 0: Stmt_Expression(
expr: Scalar_LNumber( expr: Scalar_Int(
value: 7 value: 7
) )
) )

View File

@ -36,22 +36,22 @@ array(
) )
) )
1: Stmt_Expression( 1: Stmt_Expression(
expr: Scalar_LNumber( expr: Scalar_Int(
value: 299792458 value: 299792458
) )
) )
2: Stmt_Expression( 2: Stmt_Expression(
expr: Scalar_LNumber( expr: Scalar_Int(
value: 3405705229 value: 3405705229
) )
) )
3: Stmt_Expression( 3: Stmt_Expression(
expr: Scalar_LNumber( expr: Scalar_Int(
value: 95 value: 95
) )
) )
4: Stmt_Expression( 4: Stmt_Expression(
expr: Scalar_LNumber( expr: Scalar_Int(
value: 48673 value: 48673
) )
) )
@ -74,7 +74,7 @@ array(
) )
) )
6: Stmt_Expression( 6: Stmt_Expression(
expr: Scalar_LNumber( expr: Scalar_Int(
value: 100 value: 100
comments: array( comments: array(
0: // syntax errors 0: // syntax errors
@ -94,7 +94,7 @@ array(
) )
) )
8: Stmt_Expression( 8: Stmt_Expression(
expr: Scalar_LNumber( expr: Scalar_Int(
value: 1 value: 1
) )
) )
@ -108,7 +108,7 @@ array(
) )
) )
10: Stmt_Expression( 10: Stmt_Expression(
expr: Scalar_LNumber( expr: Scalar_Int(
value: 1 value: 1
) )
) )
@ -141,7 +141,7 @@ array(
) )
) )
15: Stmt_Expression( 15: Stmt_Expression(
expr: Scalar_LNumber( expr: Scalar_Int(
value: 0 value: 0
) )
) )
@ -155,7 +155,7 @@ array(
) )
) )
17: Stmt_Expression( 17: Stmt_Expression(
expr: Scalar_LNumber( expr: Scalar_Int(
value: 0 value: 0
) )
) )
@ -169,7 +169,7 @@ array(
) )
) )
19: Stmt_Expression( 19: Stmt_Expression(
expr: Scalar_LNumber( expr: Scalar_Int(
value: 1 value: 1
) )
) )
@ -183,7 +183,7 @@ array(
) )
) )
21: Stmt_Expression( 21: Stmt_Expression(
expr: Scalar_LNumber( expr: Scalar_Int(
value: 1 value: 1
) )
) )

View File

@ -157,7 +157,7 @@ array(
name: Identifier( name: Identifier(
name: TRAIT name: TRAIT
) )
value: Scalar_LNumber( value: Scalar_Int(
value: 3 value: 3
) )
) )
@ -165,7 +165,7 @@ array(
name: Identifier( name: Identifier(
name: FINAL name: FINAL
) )
value: Scalar_LNumber( value: Scalar_Int(
value: 4 value: 4
) )
) )
@ -180,7 +180,7 @@ array(
name: Identifier( name: Identifier(
name: __CLASS__ name: __CLASS__
) )
value: Scalar_LNumber( value: Scalar_Int(
value: 1 value: 1
) )
) )
@ -188,7 +188,7 @@ array(
name: Identifier( name: Identifier(
name: __TRAIT__ name: __TRAIT__
) )
value: Scalar_LNumber( value: Scalar_Int(
value: 2 value: 2
) )
) )
@ -196,7 +196,7 @@ array(
name: Identifier( name: Identifier(
name: __FUNCTION__ name: __FUNCTION__
) )
value: Scalar_LNumber( value: Scalar_Int(
value: 3 value: 3
) )
) )
@ -204,7 +204,7 @@ array(
name: Identifier( name: Identifier(
name: __METHOD__ name: __METHOD__
) )
value: Scalar_LNumber( value: Scalar_Int(
value: 4 value: 4
) )
) )
@ -212,7 +212,7 @@ array(
name: Identifier( name: Identifier(
name: __LINE__ name: __LINE__
) )
value: Scalar_LNumber( value: Scalar_Int(
value: 5 value: 5
) )
) )
@ -220,7 +220,7 @@ array(
name: Identifier( name: Identifier(
name: __FILE__ name: __FILE__
) )
value: Scalar_LNumber( value: Scalar_Int(
value: 6 value: 6
) )
) )
@ -228,7 +228,7 @@ array(
name: Identifier( name: Identifier(
name: __DIR__ name: __DIR__
) )
value: Scalar_LNumber( value: Scalar_Int(
value: 7 value: 7
) )
) )
@ -236,7 +236,7 @@ array(
name: Identifier( name: Identifier(
name: __NAMESPACE__ name: __NAMESPACE__
) )
value: Scalar_LNumber( value: Scalar_Int(
value: 8 value: 8
) )
) )

View File

@ -63,7 +63,7 @@ array(
args: array( args: array(
0: Arg( 0: Arg(
name: null name: null
value: Scalar_LNumber( value: Scalar_Int(
value: 0 value: 0
) )
byRef: false byRef: false
@ -82,7 +82,7 @@ array(
name: Identifier( name: Identifier(
name: x name: x
) )
value: Scalar_LNumber( value: Scalar_Int(
value: 1 value: 1
) )
byRef: false byRef: false
@ -313,7 +313,7 @@ array(
params: array( params: array(
) )
returnType: null returnType: null
expr: Scalar_LNumber( expr: Scalar_Int(
value: 0 value: 0
) )
) )
@ -378,7 +378,7 @@ array(
params: array( params: array(
) )
returnType: null returnType: null
expr: Scalar_LNumber( expr: Scalar_Int(
value: 0 value: 0
) )
) )

View File

@ -9,7 +9,7 @@ class C {}
!!positions !!positions
array( array(
0: Stmt_If[3:1 - 3:7]( 0: Stmt_If[3:1 - 3:7](
cond: Scalar_LNumber[3:5 - 3:5]( cond: Scalar_Int[3:5 - 3:5](
value: 1 value: 1
) )
stmts: array( stmts: array(
@ -42,7 +42,7 @@ trait X {}
!!positions !!positions
array( array(
0: Stmt_If[3:1 - 3:7]( 0: Stmt_If[3:1 - 3:7](
cond: Scalar_LNumber[3:5 - 3:5]( cond: Scalar_Int[3:5 - 3:5](
value: 1 value: 1
) )
stmts: array( stmts: array(
@ -71,7 +71,7 @@ interface X {}
!!positions !!positions
array( array(
0: Stmt_If[3:1 - 3:7]( 0: Stmt_If[3:1 - 3:7](
cond: Scalar_LNumber[3:5 - 3:5]( cond: Scalar_Int[3:5 - 3:5](
value: 1 value: 1
) )
stmts: array( stmts: array(

View File

@ -27,7 +27,7 @@ array(
name: Identifier( name: Identifier(
name: X name: X
) )
value: Scalar_LNumber( value: Scalar_Int(
value: 1 value: 1
) )
) )
@ -64,7 +64,7 @@ array(
name: Identifier( name: Identifier(
name: X name: X
) )
value: Scalar_LNumber( value: Scalar_Int(
value: 1 value: 1
) )
) )
@ -101,7 +101,7 @@ array(
name: Identifier( name: Identifier(
name: X name: X
) )
value: Scalar_LNumber( value: Scalar_Int(
value: 1 value: 1
) )
) )
@ -138,7 +138,7 @@ array(
name: Identifier( name: Identifier(
name: X name: X
) )
value: Scalar_LNumber( value: Scalar_Int(
value: 1 value: 1
) )
) )

View File

@ -31,7 +31,7 @@ array(
name: Identifier( name: Identifier(
name: A name: A
) )
value: Scalar_LNumber( value: Scalar_Int(
value: 1 value: 1
) )
) )
@ -46,7 +46,7 @@ array(
name: Identifier( name: Identifier(
name: B name: B
) )
value: Scalar_LNumber( value: Scalar_Int(
value: 2 value: 2
) )
) )
@ -61,7 +61,7 @@ array(
name: Identifier( name: Identifier(
name: C name: C
) )
value: Scalar_LNumber( value: Scalar_Int(
value: 3 value: 3
) )
) )
@ -76,7 +76,7 @@ array(
name: Identifier( name: Identifier(
name: D name: D
) )
value: Scalar_LNumber( value: Scalar_Int(
value: 4 value: 4
) )
) )
@ -91,7 +91,7 @@ array(
name: Identifier( name: Identifier(
name: E name: E
) )
value: Scalar_LNumber( value: Scalar_Int(
value: 5 value: 5
) )
) )

View File

@ -77,7 +77,7 @@ array(
name: Identifier( name: Identifier(
name: Foo name: Foo
) )
expr: Scalar_LNumber( expr: Scalar_Int(
value: 1 value: 1
) )
) )

View File

@ -93,7 +93,7 @@ array(
var: Expr_Variable( var: Expr_Variable(
name: a name: a
) )
default: Scalar_LNumber( default: Scalar_Int(
value: 0 value: 0
) )
) )

View File

@ -11,7 +11,7 @@ array(
name: Identifier( name: Identifier(
name: A name: A
) )
value: Scalar_LNumber( value: Scalar_Int(
value: 0 value: 0
) )
) )

View File

@ -21,7 +21,7 @@ array(
num: null num: null
) )
1: Stmt_Break( 1: Stmt_Break(
num: Scalar_LNumber( num: Scalar_Int(
value: 2 value: 2
) )
) )
@ -29,7 +29,7 @@ array(
num: null num: null
) )
3: Stmt_Continue( 3: Stmt_Continue(
num: Scalar_LNumber( num: Scalar_Int(
value: 2 value: 2
) )
) )

View File

@ -87,7 +87,7 @@ array(
name: f name: f
) )
default: Expr_UnaryPlus( default: Expr_UnaryPlus(
expr: Scalar_LNumber( expr: Scalar_Int(
value: 1 value: 1
) )
) )

View File

@ -24,7 +24,7 @@ array(
expr: Expr_Yield( expr: Expr_Yield(
key: null key: null
value: Expr_UnaryPlus( value: Expr_UnaryPlus(
expr: Scalar_LNumber( expr: Scalar_Int(
value: 1 value: 1
) )
) )
@ -34,7 +34,7 @@ array(
expr: Expr_Yield( expr: Expr_Yield(
key: null key: null
value: Expr_UnaryMinus( value: Expr_UnaryMinus(
expr: Scalar_LNumber( expr: Scalar_Int(
value: 1 value: 1
) )
) )
@ -47,7 +47,7 @@ array(
value: null value: null
) )
right: Expr_UnaryMinus( right: Expr_UnaryMinus(
expr: Scalar_LNumber( expr: Scalar_Int(
value: 1 value: 1
) )
) )

View File

@ -22,7 +22,7 @@ array(
var: Expr_Variable( var: Expr_Variable(
name: i name: i
) )
expr: Scalar_LNumber( expr: Scalar_Int(
value: 0 value: 0
) )
) )

View File

@ -19,7 +19,7 @@ array(
stmts: array( stmts: array(
0: Stmt_Echo( 0: Stmt_Echo(
exprs: array( exprs: array(
0: Scalar_LNumber( 0: Scalar_Int(
value: 1 value: 1
) )
) )
@ -35,7 +35,7 @@ array(
stmts: array( stmts: array(
0: Stmt_Echo( 0: Stmt_Echo(
exprs: array( exprs: array(
0: Scalar_LNumber( 0: Scalar_Int(
value: 2 value: 2
) )
) )
@ -44,7 +44,7 @@ array(
) )
2: Stmt_Echo( 2: Stmt_Echo(
exprs: array( exprs: array(
0: Scalar_LNumber( 0: Scalar_Int(
value: 3 value: 3
) )
) )
@ -70,7 +70,7 @@ array(
stmts: array( stmts: array(
0: Stmt_Echo( 0: Stmt_Echo(
exprs: array( exprs: array(
0: Scalar_LNumber( 0: Scalar_Int(
value: 1 value: 1
) )
) )
@ -79,7 +79,7 @@ array(
) )
1: Stmt_Echo( 1: Stmt_Echo(
exprs: array( exprs: array(
0: Scalar_LNumber( 0: Scalar_Int(
value: 2 value: 2
) )
) )
@ -93,7 +93,7 @@ array(
stmts: array( stmts: array(
0: Stmt_Echo( 0: Stmt_Echo(
exprs: array( exprs: array(
0: Scalar_LNumber( 0: Scalar_Int(
value: 3 value: 3
) )
) )

View File

@ -9,14 +9,14 @@ Namespace declaration statement has to be the very first statement in the script
array( array(
0: Stmt_Echo( 0: Stmt_Echo(
exprs: array( exprs: array(
0: Scalar_LNumber( 0: Scalar_Int(
value: 1 value: 1
) )
) )
) )
1: Stmt_Echo( 1: Stmt_Echo(
exprs: array( exprs: array(
0: Scalar_LNumber( 0: Scalar_Int(
value: 2 value: 2
) )
) )
@ -49,7 +49,7 @@ array(
) )
1: Stmt_Echo( 1: Stmt_Echo(
exprs: array( exprs: array(
0: Scalar_LNumber( 0: Scalar_Int(
value: 1 value: 1
) )
) )
@ -79,7 +79,7 @@ array(
key: Identifier( key: Identifier(
name: ticks name: ticks
) )
value: Scalar_LNumber( value: Scalar_Int(
value: 1 value: 1
) )
) )

View File

@ -25,7 +25,7 @@ array(
) )
cases: array( cases: array(
0: Stmt_Case( 0: Stmt_Case(
cond: Scalar_LNumber( cond: Scalar_Int(
value: 0 value: 0
) )
stmts: array( stmts: array(
@ -35,7 +35,7 @@ array(
) )
) )
1: Stmt_Case( 1: Stmt_Case(
cond: Scalar_LNumber( cond: Scalar_Int(
value: 1 value: 1
) )
stmts: array( stmts: array(