PHP-Parser icon indicating copy to clipboard operation
PHP-Parser copied to clipboard

Comments are assigned multiple times

Open nikic opened this issue 9 years ago • 1 comments

As reported in #36, a code snippet like

/* this is a common multiline comment */
$a * $b == 1 + 2;

will associate the comment with all of the Equals node, the Mul node and the Variable node for $a, basically all nodes that share the same starting token. The comment should only be associated with the outermost node.

nikic avatar Mar 09 '16 18:03 nikic

Another related issue is #469 I think

jhodgdon-drp avatar Jan 30 '18 20:01 jhodgdon-drp