MCPcopy
hub / github.com/opentrace/opentrace / parseKotlin

Function parseKotlin

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

Source from the content-addressed store, hash-verified

272
273/** Parse Kotlin source and return root node. */
274export async function parseKotlin(source: string): Promise<SyntaxNode> {
275 const parser = await getKotlinParser();
276 const tree = parser.parse(source);
277 if (!tree) throw new Error('Failed to parse Kotlin source');
278 return tree.rootNode;
279}
280
281/** Parse Swift source and return root node. */
282export async function parseSwift(source: string): Promise<SyntaxNode> {

Callers 1

Calls 1

getKotlinParserFunction · 0.85

Tested by

no test coverage detected