add ParenthesizedExpression support to t.isDynamic
This commit is contained in:
@@ -114,7 +114,9 @@ t.shallowEqual = function (actual, expected) {
|
||||
//
|
||||
|
||||
t.isDynamic = function (node) {
|
||||
if (t.isIdentifier(node) || t.isLiteral(node) || t.isThisExpression(node)) {
|
||||
if (t.isParenthesizedExpression(node)) {
|
||||
return t.isDynamic(node.expression);
|
||||
} else if (t.isIdentifier(node) || t.isLiteral(node) || t.isThisExpression(node)) {
|
||||
return false;
|
||||
} else if (t.isMemberExpression(node)) {
|
||||
return t.isDynamic(node.object) || t.isDynamic(node.property);
|
||||
|
||||
Reference in New Issue
Block a user