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

Function parseCode

packages/babel-types/test/misc.js:4–11  ·  view source on GitHub ↗
(string)

Source from the content-addressed store, hash-verified

2import { parseExpression } from "@babel/parser";
3
4function parseCode(string) {
5 return parseExpression(string, {
6 allowSuperOutsideMethod: true,
7 allowNewTargetOutsideFunction: true,
8 allowReturnOutsideFunction: true,
9 sourceType: "module",
10 });
11}
12
13describe("misc helpers", function () {
14 describe("matchesPattern", function () {

Callers 1

misc.jsFile · 0.85

Calls 1

parseExpressionFunction · 0.90

Tested by

no test coverage detected