-
-
Notifications
You must be signed in to change notification settings - Fork 214
Closed
Description
This should be invalid.
require("espree").parse('(a = 1) = 2', {sourceType: 'module', ecmaVersion: 2019}).body[0].expression
Node {
type: 'AssignmentExpression',
start: 0,
end: 11,
operator: '=',
left: Node {
type: 'AssignmentPattern',
start: 1,
end: 6,
left: Node { type: 'Identifier', start: 1, end: 2, name: 'a' },
right: Node { type: 'Literal', start: 5, end: 6, value: 1, raw: '1' }
},
right: Node { type: 'Literal', start: 10, end: 11, value: 2, raw: '2' }
}