How to use the isSequenceExpression function from @babel/types

Find comprehensive JavaScript @babel/types.isSequenceExpression code examples handpicked from public code repositorys.

47
48
49
50
51
52
53
54
55
56
const { parent } = p

if (
  t.isCallExpression(parent) ||
  t.isConditionalExpression(parent) ||
  t.isSequenceExpression(parent) ||
  t.isLogicalExpression(parent)
) {
  return isReturned(p.parentPath)
}
fork icon10
star icon44
watch icon10

+ 17 other calls in file

178
179
180
181
182
183
184
185
186
187
scope.traverse(scope.block, {
  ReturnStatement: (path_) => {
    const node_ = path_.node;
    if (
      node_.argument &&
      t.isSequenceExpression(node_.argument) &&
      t.isAssignmentExpression(node_.argument.expressions[0]) &&
      t.isBinaryExpression(node_.argument.expressions[0].right) &&
      node_.argument.expressions[0].right.operator === '-' &&
      !isNaN(node_.argument.expressions[0].right.right.value)
fork icon5
star icon15
watch icon1

+ 31 other calls in file

85
86
87
88
89
90
91
92
93
            // 为了排除这种情况:
            // (function(n) {
            //     return App(A(n));
            // })
            var parentNode = match[0].nodePath.parentPath.node
            return (t.isExpressionStatement(parentNode) || t.isSequenceExpression(parentNode))
        }
    }
})
fork icon221
star icon0
watch icon0

271
272
273
274
275
276
277
278
279
280
  left: node
})) {
  return true;
}

if (hasPostfixPart(node, parent) && !t.isNewExpression(parent) || t.isSequenceExpression(parent) && parent.expressions[0] === node || t.isConditional(parent, {
  test: node
}) || t.isBinary(parent, {
  left: node
}) || t.isAssignmentExpression(parent, {
fork icon0
star icon0
watch icon0

+ 2 other calls in file

Other functions in @babel/types

Sorted by popularity

function icon

@babel/types.identifier is the most popular function in @babel/types (20936 examples)