MCPcopy Create free account
hub / github.com/LPC4/Full-Stack / defines_code

Function defines_code

crates/hll-to-ir/src/imports.rs:99–114  ·  view source on GitHub ↗

Whether a module defines code to assemble (a function body or non-extern global). Header-only modules (only consts/types, e.g. `layout`) produce no object and are skipped by the closure.

(source: &str)

Source from the content-addressed store, hash-verified

97 generics,
98 is_extern: false,
99 ..
100 } if generics.is_empty() => Some(name.clone()),
101 DeclNode::Variable {
102 name,
103 is_extern: false,
104 ..
105 } => Some(name.clone()),
106 _ => None,
107 })
108 .collect())
109}
110
111/// Exported names prefixed by a closure build without becoming link symbols:
112/// interfaces, and generic functions the importer specializes into its own object.
113pub fn collect_exported_interfaces(source: &str) -> Result<HashSet<String>, String> {
114 let program = parse_module(source)?;
115 Ok(program
116 .declarations
117 .iter()

Callers 1

Calls 2

parse_moduleFunction · 0.85
anyMethod · 0.80

Tested by

no test coverage detected