MCPcopy
hub / github.com/opentrace/opentrace / parseTSX

Function parseTSX

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

Source from the content-addressed store, hash-verified

110
111/** Parse TSX source and return root node. */
112export async function parseTSX(source: string): Promise<SyntaxNode> {
113 const parser = await getTsxParser();
114 const tree = parser.parse(source);
115 if (!tree) throw new Error('Failed to parse TSX source');
116 return tree.rootNode;
117}
118
119/** Parse Python source and return root node. */
120export async function parsePy(source: string): Promise<SyntaxNode> {

Callers 1

Calls 1

getTsxParserFunction · 0.85

Tested by

no test coverage detected