You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi
When a body has noob child the start and end location are swapped. For example this code:
<?phpfunctiontest()
{
/* taken from http://de3.php.net/manual/en/reserved.php */# $m[] = 'declare';/* taken from http://de3.php.net/manual/en/reserved.php */# $m[] = 'declare';
}
Produce this AST:
body {
loc: {
source: null
start: {
line: 3 <-- Correct value, but child have wrong value
column: 0
offset: 22
}
end: {
line: 8 <-- Correct value, but child have wrong value
column: 1
offset: 201
}
}
children: [
noop {
leadingComments: [4 elements]
loc: {
start: {
line: 8 <-- Start line should 3
column: 0
offset: 200
}
end: {
line: 3 <-- End line should 8
column: 1
offset: 23
}
}
}
]
}
As you can see the body loc is correct, but the child noop has the wrong start and end data.
The text was updated successfully, but these errors were encountered:
Hi
When a body has noob child the start and end location are swapped. For example this code:
Produce this AST:
As you can see the body loc is correct, but the child noop has the wrong start and end data.
The text was updated successfully, but these errors were encountered: