1
0
mirror of https://github.com/danog/PHP-Parser.git synced 2024-12-02 17:28:27 +01:00
PHP-Parser/test/code/parser/nopPositions.test
Nikita Popov 46cbd9393a Place Nop nodes more precisely
If the Nop is created to collect comments, place it directly after
the comment, instead of at the next non-whitespace character.
2020-02-09 17:10:33 +01:00

27 lines
348 B
Plaintext

Positions for leading nop statement
-----
<?php
/* Comment */
-----
!!positions
array(
0: Stmt_Nop[2:14 - 2:13](
comments: array(
0: /* Comment */
)
)
)
-----
<?php
{
/* comment */
}
-----
!!positions
array(
0: Stmt_Nop[3:0 - 3:17](
comments: array(
0: /* comment */
)
)
)