1
0
mirror of https://github.com/danog/PHP-Parser.git synced 2024-11-30 04:19:30 +01:00
PHP-Parser/test/code/parser
Nikita Popov 60d025a914 Fix attributes for zero-length nop nodes
Previously zero-length nop nodes used the lookahead start attributes
and current end attributes. This choice ends up being somewhat weird,
because the end attributes will be the at the last non-whitespace,
non-comment token, which might be quite far back. More problematically,
we may not have encountered any non-discarded token if we're at the
start of the file, in which case we will have no end attributes to
assign.

Change things to use a canonical "zero-length" node representation,
where the end position (token & file) will be exactly one before the
start position.

Fixes #589.
2019-05-11 20:01:25 +02:00
..
errorHandling [PHP 7.4] Add array spread 2019-05-09 19:15:35 +02:00
expr [PHP 7.4] Add array spread 2019-05-09 19:15:35 +02:00
scalar [PHP 7.4] Add array spread 2019-05-09 19:15:35 +02:00
stmt [PHP 7.4] Add array spread 2019-05-09 19:15:35 +02:00
blockComments.test Merge branch '3.x' 2017-10-01 16:55:54 +02:00
commentAtEndOfClass.test Add PHP 7.4 typed properties support 2019-01-05 21:34:25 +01:00
comments.test Perform automated test update 2017-01-19 22:25:22 +01:00
nopPositions.test Fix attributes for zero-length nop nodes 2019-05-11 20:01:25 +02:00
semiReserved.test Add PHP 7.4 typed properties support 2019-01-05 21:34:25 +01:00