MCPcopy
hub / github.com/opentrace/opentrace / parsePy

Function parsePy

ui/src/runner/browser/__tests__/helpers.ts:120–125  ·  view source on GitHub ↗
(source: string)

Source from the content-addressed store, hash-verified

118
119/** Parse Python source and return root node. */
120export async function parsePy(source: string): Promise<SyntaxNode> {
121 const parser = await getPyParser();
122 const tree = parser.parse(source);
123 if (!tree) throw new Error('Failed to parse Python source');
124 return tree.rootNode;
125}
126
127/** Parse Go source and return root node. */
128export async function parseGo(source: string): Promise<SyntaxNode> {

Calls 1

getPyParserFunction · 0.85

Tested by

no test coverage detected