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

Function cfnptr_scan_files

codegraph-kernel/src/lib.rs:184–223  ·  view source on GitHub ↗
(files: Vec<CfnptrFileIn>)

Source from the content-addressed store, hash-verified

182/// synthesizer keeps its JS sweep.
183#[napi]
184pub fn cfnptr_scan_files(files: Vec<CfnptrFileIn>) -> Vec<CfnptrFacts> {
185 files
186 .into_iter()
187 .map(|f| {
188 let structs: Vec<cfnptr::StructExtent> = f
189 .structs
190 .into_iter()
191 .map(|s| cfnptr::StructExtent { id: s.id, start_line: s.start_line, end_line: s.end_line })
192 .collect();
193 let facts = cfnptr::scan_file(&f.text, &structs);
194 CfnptrFacts {
195 fn_ptr_typedefs: facts.fn_ptr_typedefs,
196 fn_type_typedefs: facts.fn_type_typedefs,
197 structs: facts
198 .structs
199 .into_iter()
200 .map(|s| CfnptrStructOut {
201 id: s.id,
202 parsed: s.parsed,
203 fields: s
204 .fields
205 .into_iter()
206 .map(|fl| CfnptrField { name: fl.name, index: fl.index, ptr: fl.ptr, ty: fl.ty })
207 .collect(),
208 })
209 .collect(),
210 inline_ptr: facts.inline_ptr,
211 inline_types: facts.inline_types,
212 inline_tags: facts.inline_tags,
213 init_tokens: facts.init_tokens,
214 array_elems: facts.array_elems,
215 alias_names: facts.alias_names,
216 d_pairs: facts.d_pairs,
217 dispatch_fields: facts.dispatch_fields,
218 array_dispatch_names: facts.array_dispatch_names,
219 includes: facts.includes,
220 }
221 })
222 .collect()
223}
224
225/// Debug/differential hook: the native `stripCommentsForRegex(text, 'c')`.
226/// Exists so the strip differential oracle can pin the Rust stripper against

Callers

nothing calls this directly

Calls 3

scan_fileFunction · 0.85
mapMethod · 0.80
collectMethod · 0.45

Tested by

no test coverage detected