MCPcopy
hub / github.com/opentrace/opentrace / parseRuby

Function parseRuby

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

Source from the content-addressed store, hash-verified

256
257/** Parse Ruby source and return root node. */
258export async function parseRuby(source: string): Promise<SyntaxNode> {
259 const parser = await getRubyParser();
260 const tree = parser.parse(source);
261 if (!tree) throw new Error('Failed to parse Ruby source');
262 return tree.rootNode;
263}
264
265/** Parse C# source and return root node. */
266export async function parseCsharp(source: string): Promise<SyntaxNode> {

Callers 1

Calls 1

getRubyParserFunction · 0.85

Tested by

no test coverage detected