MCPcopy
hub / github.com/opentrace/opentrace / parseRust

Function parseRust

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

Source from the content-addressed store, hash-verified

224
225/** Parse Rust source and return root node. */
226export async function parseRust(source: string): Promise<SyntaxNode> {
227 const parser = await getRustParser();
228 const tree = parser.parse(source);
229 if (!tree) throw new Error('Failed to parse Rust source');
230 return tree.rootNode;
231}
232
233/** Parse Java source and return root node. */
234export async function parseJava(source: string): Promise<SyntaxNode> {

Callers 1

Calls 1

getRustParserFunction · 0.85

Tested by

no test coverage detected