MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / parse

Function parse

src/graph/branch-guards.ts:213–222  ·  view source on GitHub ↗
(source: string, language: Language)

Source from the content-addressed store, hash-verified

211}
212
213async function parse(source: string, language: Language): Promise<Tree | null> {
214 try {
215 await loadGrammarsForLanguages([language]);
216 const parser = getParser(language);
217 if (!parser) return null;
218 return parseWithinBudget(parser, source);
219 } catch {
220 return null;
221 }
222}
223
224// =============================================================================
225// Entry points

Callers 10

treeForFunction · 0.70
callArgumentsInSourceFunction · 0.70
callSiteInSourceFunction · 0.70
triggerInSourceFunction · 0.70
guardsInSourceFunction · 0.70
loopsInSourceFunction · 0.70
returnsInSourceFunction · 0.70
decoratorsInSourceFunction · 0.70
memberTypesInSourceFunction · 0.70
parseConfigFunction · 0.50

Calls 3

loadGrammarsForLanguagesFunction · 0.90
getParserFunction · 0.90
parseWithinBudgetFunction · 0.90

Tested by

no test coverage detected