Lines Matching refs:file

21 function getStructureFromFile(file: FileType) {
22 const command = 'sourcekitten structure --file ' + file.path;
57 function getIdentifierFromOffsetObject(offsetObject: Structure, file: FileType) {
59 return file.content
120 function getTypeFromOffsetObject(offsetObject: Structure, file: FileType) {
126 'key.sourcefile': file.path,
128 'key.compilerargs': [file.path, '-target', 'arm64-apple-ios', '-sdk', getSDKPath()],
168 function findNamedDefinitionsOfType(type: string, moduleDefinition: Structure[], file: FileType) {
172 const name = getIdentifierFromOffsetObject(definitionParams[0], file);
177 types = getTypeFromOffsetObject(definitionParams[1], file);
184 function findGroupedDefinitionsOfType(type: string, moduleDefinition: Structure[], file: FileType) {
188 return definitionParams.map((d) => ({ name: getIdentifierFromOffsetObject(d, file) }));
194 file: FileType
210 const { view: _, ...definition } = parseModuleDefinition(viewModuleDefinition, file);
226 file: FileType
229 name: findNamedDefinitionsOfType('Name', moduleDefinition, file)?.[0]?.name,
230 functions: findNamedDefinitionsOfType('Function', moduleDefinition, file),
231 asyncFunctions: findNamedDefinitionsOfType('AsyncFunction', moduleDefinition, file),
232 events: findGroupedDefinitionsOfType('Events', moduleDefinition, file),
233 properties: findNamedDefinitionsOfType('Property', moduleDefinition, file),
234 props: omitViewFromClosureArguments(findNamedDefinitionsOfType('Prop', moduleDefinition, file)),
235 view: findAndParseView(moduleDefinition, file),
243 const file = { path, content: fsNode.readFileSync(path, 'utf8') }; constant
244 const definition = findModuleDefinitionInStructure(getStructureFromFile(file));
246 modules.push(parseModuleDefinition(definition, file));