Skip to content
This repository has been archived by the owner on Jan 19, 2019. It is now read-only.

Commit

Permalink
Fix: Ensure exponentiation operator assignment is AssignmentExpression (
Browse files Browse the repository at this point in the history
fixes #355)
  • Loading branch information
JamesHenry committed Aug 16, 2017
1 parent 67971de commit c68325a
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions lib/convert.js
Original file line number Diff line number Diff line change
Expand Up @@ -1461,6 +1461,13 @@ module.exports = function convert(config) {
result.expressions.push(right);
}

} else if (node.operatorToken && node.operatorToken.kind === SyntaxKind.AsteriskAsteriskEqualsToken) {
Object.assign(result, {
type: AST_NODE_TYPES.AssignmentExpression,
operator: nodeUtils.getTextForTokenKind(node.operatorToken.kind),
left: convertChild(node.left),
right: convertChild(node.right)
});
} else {
Object.assign(result, {
type: nodeUtils.getBinaryExpressionType(node.operatorToken),
Expand Down

0 comments on commit c68325a

Please sign in to comment.