MCPcopy Create free account
hub / github.com/babel/babel / parseArrayLike

Function parseArrayLike

packages/babel-parser/src/parser/expression.ts:2502–2516  ·  view source on GitHub ↗
(
    this: Parser,
    close: TokenType,
    refExpressionErrors?: ExpressionErrors | null,
  )

Source from the content-addressed store, hash-verified

2500 // parse an array literal
2501 // https://tc39.es/ecma262/#prod-ArrayLiteral
2502 parseArrayLike(
2503 this: Parser,
2504 close: TokenType,
2505 refExpressionErrors?: ExpressionErrors | null,
2506 ): N.ArrayExpression {
2507 const node = this.startNode<N.ArrayExpression>();
2508 this.next();
2509 node.elements = this.parseExprList(
2510 close,
2511 /* allowEmpty */ true,
2512 refExpressionErrors,
2513 node,
2514 );
2515 return this.finishNode(node, "ArrayExpression");
2516 }
2517
2518 // Parse arrow function expression.
2519 // If the parameters are provided, they will be converted to an

Callers

nothing calls this directly

Calls 2

nextMethod · 0.80
finishNodeMethod · 0.80

Tested by

no test coverage detected