Support `**` (exponentiation) as a BinaryOperator for BinaryExpression's
jrop opened this issue · comments
For instance: the AST for x**y
is:
BinaryExpression {
operator: '**',
left: Identifier('x'),
right: Identifier('y'),
}
Currently, when I try to create a **
node:
builders.binaryExpression('**', id('x'), id('y'))
I get the following error
"**" does not match field "operator": == | != | === | !== | < | <= | > | >= | << | >> | >>> | + | - | * | / | % | & | | | ^ | in | instanceof | .. of type BinaryExpression
This is not part of ESTree: /estree/estree/blob/master/es5.md#binaryexpression
ast-types uses esprima, which sticks to those definitions.