MCPcopy
hub / github.com/opentrace/opentrace / getPyParser

Function getPyParser

ui/src/runner/browser/__tests__/helpers.ts:93–101  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

91}
92
93export async function getPyParser(): Promise<Parser> {
94 await ensureInit();
95 if (!pyParser) {
96 pyParser = new Parser();
97 const lang = await loadLanguage('tree-sitter-python.wasm');
98 pyParser.setLanguage(lang);
99 }
100 return pyParser;
101}
102
103/** Parse TypeScript source and return root node. */
104export async function parseTS(source: string): Promise<SyntaxNode> {

Callers 1

parsePyFunction · 0.85

Calls 2

ensureInitFunction · 0.85
loadLanguageFunction · 0.85

Tested by

no test coverage detected