History log of /PHP-Parser/test/code/parser/expr/arrayEmptyElemens.test (Results 1 – 4 of 4)
Revision Date Author Comments
# 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.


# 23835d20 03-Sep-2022 Nikita Popov

Rename Scalar\LNumber to Scalar\Int_


# 8be56afd 02-Sep-2022 Nikita Popov

Rename Expr\ArrayItem to ArrayItem

Array items are not expressions by themselves.


# 09339862 01-Sep-2022 Nikita Popov

Make sure Array nodes can not contain null

Now that destructuring is always represented using List nodes,
make sure that Array nodes can no longer contain null elements,
so well-type

Make sure Array nodes can not contain null

Now that destructuring is always represented using List nodes,
make sure that Array nodes can no longer contain null elements,
so well-typed code doesn't have to deal with them unnecessarily.

If an array does contain empty elements, these are now result in
an error and are represented as a ArrayItem with Error value if
error recovery is used.

The implementation is a bit tricky because at the time the Array
node is created, we cannot tell whether it will be used in a
creation or destructuring context. For this reason the error
reporting is delayed parsing has finished.

Closes #876.

show more ...