if ($foo) {
}
// A comment
if ($bar) {
}
becomes
if ($foo) {
// A comment
}
if ($bar) {
}
This doesn't seem to be because of the empty if blocks, I simply removed them to make the example smaller.
may be related with https://github.com/glayzzle/php-parser/issues/141 - it's related to the way php-parser calculate statements offsets (and includes also the comment)
I believe this should have been fixed with #251 - @aboyton can you confirm?
@mgrip I can confirm that this issue is fixed. However while looking at this I found a similar (but different) issue, which I'll go ahead and open an issue on.
Yes, this does now seem fixed thanks. (Being in Sydney Australia means my replies are sometimes a bit delayed.)