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

Function parses

__tests__/c-statement-macro-names.test.ts:182–186  ·  view source on GitHub ↗
(source: string)

Source from the content-addressed store, hash-verified

180
181 it('goes whole where no statement can stand', () => {
182 const parses = (source: string): void => {
183 const preParsed = EXTRACTORS.c!.preParse!(source);
184 expect(preParsed).not.toMatch(/\b(?:entry|members|values|inner|tail);/);
185 expect(getParser('c')!.parse(preParsed)!.rootNode.hasError).toBe(false);
186 };
187 // In an initializer.
188 parses(['static const int table[] = {', ' entry(a)', ' entry(b)', ' last', '};', ''].join('\n'));
189 // In a struct's or an enum's body.

Callers 1

Calls 2

getParserFunction · 0.90
parseMethod · 0.80

Tested by

no test coverage detected