History log of /PHP-Parser/test/code/parser/expr/new.test (Results 1 – 12 of 12)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# beba9c52 19-Jul-2024 Nikita Popov

Remove support for alternative array syntax in PHP 8 parser

We cannot support both this syntax and property hooks. Drop
support for the alternative syntax in the PHP 8 parser. The
PH

Remove support for alternative array syntax in PHP 8 parser

We cannot support both this syntax and property hooks. Drop
support for the alternative syntax in the PHP 8 parser. The
PHP 7 parser still supports it.

show more ...


# 4e27a17c 06-Jun-2022 Nikita Popov

Use visitor to assign comments

This fixes the long-standing issue where a comment would get assigned
to all nodes with the same starting position, instead of only the
outer-most one.

Use visitor to assign comments

This fixes the long-standing issue where a comment would get assigned
to all nodes with the same starting position, instead of only the
outer-most one.

Fixes #253.

show more ...


# 23647573 21-May-2023 Nikita Popov

Represent names using string rather than array of parts

In most circumstances we are interested in the whole string, not
the parts split by namespace separator. As names are common, this

Represent names using string rather than array of parts

In most circumstances we are interested in the whole string, not
the parts split by namespace separator. As names are common, this
representation measurably improves memory usage and performance.

show more ...


# 9a5d5c11 20-May-2023 Nikita Popov

Add newline at end of file for many tests

Add the newline in reconstructTest() and run updateTests.php, to
reduce spurious diffs in the future.


# 98f7f39d 09-Aug-2020 Nikita Popov

Add named argument support

Not adding any explicit FPPP support, as I don't think add/remove
of names can be handled any better than full reformatting.


Revision tags: v4.3.0, v4.2.5, v4.2.4, v4.2.3, v4.2.2, v4.2.1, v4.2.0, v4.1.1, v4.1.0, v4.0.4, v4.0.3, v4.0.2, v4.0.1, v4.0.0, v3.1.5, v4.0.0beta1, v3.1.4, v4.0.0alpha3, v3.1.3, v4.0.0alpha2, v3.1.2, v4.0.0alpha1, v3.1.1, v3.1.0, v3.0.6
# a6846e3b 28-Apr-2017 Nikita Popov

Always use Identifier nodes

The parser will now always generate Identifier nodes (for
non-namespaced identifiers). This obsoletes the useIdentifierNodes
parser option.

Node

Always use Identifier nodes

The parser will now always generate Identifier nodes (for
non-namespaced identifiers). This obsoletes the useIdentifierNodes
parser option.

Node constructors still accepts strings and will implicitly create
an Identifier wrapper. Identifier implement __toString(), so that
outside of strict-mode many things continue to work without changes.

show more ...


Revision tags: v3.0.5, v3.0.4, v3.0.3
# 953f8c96 19-Jan-2017 Nikita Popov

Perform automated test update


Revision tags: v3.0.2, v3.0.1, v3.0.0, v3.0.0beta2, v3.0.0beta1, v2.1.1, v3.0.0alpha1
# e45e31c2 20-Apr-2016 Nikita Popov

Fix new.test and code test runner

Using only the basename leads to collisions...


Revision tags: v2.1.0, v2.0.1, v2.0.0, v2.0.0beta1, v1.4.1, v2.0.0alpha1, v1.4.0, v1.3.0, v1.2.2, v1.2.1, v1.2.0, v1.1.0, v1.0.2, v1.0.1, v1.0.0, v1.0.0beta2, v0.9.5, v1.0.0beta1
# b5bcfa11 26-Mar-2014 nikic

Add support for argument unpacking (PHP 5.6)


Revision tags: v0.9.4, v0.9.3
# 9d8e13b4 19-Oct-2012 nikic

Fix Switch subnode order

Not that it makes much of a difference, but could have caused issues with
"out of order" visiting of nodes.


Revision tags: v0.9.2
# e16513a0 12-May-2012 nikic

Fix parsing of new expressions in parenthesis

The new dereferencing syntaxes (new Foo)->bar and (new Foo)['bar'] were
causing a shift/reduce conflict with the '(' expr ')' rule. When

Fix parsing of new expressions in parenthesis

The new dereferencing syntaxes (new Foo)->bar and (new Foo)['bar'] were
causing a shift/reduce conflict with the '(' expr ')' rule. When
(new Foo) was encountered (without dereference operators following) the
parser thus threw a parse error.

The fix simply adds a special '(' new_expr ')' rule to expr. This does not
remove the shift/reduce conflict itself, but makes it irrelevant.

This fixes issue #20.

show more ...


# 81e53ce0 11-May-2012 nikic

Insert comments when pretty printing

This changset also adds unit tests for Comments and adds a way to test the
pretty printer.