MCPcopy Create free account
hub / github.com/d1ll0n/stack-packer / parseFile

Function parseFile

src/parser/parser.ts:167–176  ·  view source on GitHub ↗
(file: string)

Source from the content-addressed store, hash-verified

165}
166
167export function parseFile(file: string): DefinedType[] {
168 let structs = [];
169 const { children } = <SourceUnit> parse(file, { tolerant: true });
170 for (const child of children) {
171 if (isSupportedNode(child)) {
172 structs.push(parseSubNode('', child))
173 }
174 }
175 return structs;
176}
177
178export function recursiveDirectorySearch(_dirPath) {
179 const files = fs.readdirSync(_dirPath).map(name => path.join(_dirPath, name));

Callers 1

parseDirectoryFunction · 0.85

Calls 2

isSupportedNodeFunction · 0.85
parseSubNodeFunction · 0.85

Tested by

no test coverage detected