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

Function source_declares_entry

src/target_mode.rs:3–8  ·  view source on GitHub ↗
(source: &str, entry: &str)

Source from the content-addressed store, hash-verified

1use crate::compilation_pipeline::TargetMode;
2
3fn source_declares_entry(source: &str, entry: &str) -> bool {
4 source.lines().any(|line| {
5 let trimmed = line.trim_start();
6 !trimmed.starts_with(';') && trimmed.starts_with(&format!("{entry}:"))
7 })
8}
9
10pub fn infer_target_mode_for_source(
11 source: &str,

Callers 1

Calls 1

anyMethod · 0.80

Tested by

no test coverage detected