esprima
esprima copied to clipboard
get wrong range for ArrowFunctionExpression.body
Get wrong range for ArrowFunctionExpression.body when the body is AssignmentExpression and has bracket around
Steps to reproduce
esprima.parse('e => ({ property: 42 })')
Expected output
range of ArrowFunctionExpression.body should be [5, 23], that is , the body is "({ property: 42 })"
Actual output
got range of ArrowFunctionExpression.body [6, 22], missing left and right bracket, only "{ property: 42 }" is left