MCPcopy Create free account
hub / github.com/observablehq/framework / parseProgram

Function parseProgram

src/javascript/parse.ts:68–72  ·  view source on GitHub ↗
(input: string, params?: Params)

Source from the content-addressed store, hash-verified

66}
67
68export function parseProgram(input: string, params?: Params): Program {
69 const body = Parser.parse(input, acornOptions);
70 if (params) checkParams(body, input, params);
71 return body;
72}
73
74/**
75 * Parses a single expression; like parseExpressionAt, but returns null if

Callers 6

rewriteNpmImportsFunction · 0.85
getDependencyResolverFunction · 0.85
transpileModuleFunction · 0.85
getModuleInfoFunction · 0.85
parseImportsFunction · 0.85
parseJavaScriptFunction · 0.85

Calls 1

checkParamsFunction · 0.85

Tested by

no test coverage detected