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

Function parseArrayLike

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

Source from the content-addressed store, hash-verified

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