diff options
Diffstat (limited to 'dev_tools/src/verify.rs')
| -rw-r--r-- | dev_tools/src/verify.rs | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/dev_tools/src/verify.rs b/dev_tools/src/verify.rs index 36283d3..2ddff0c 100644 --- a/dev_tools/src/verify.rs +++ b/dev_tools/src/verify.rs @@ -73,6 +73,24 @@ fn parse_single_block(lines: &[&str], start: usize, source_file: &str) -> Option break; } + // @@@ lines: strip the prefix and treat as regular Rust code + // These lines are hidden in the rendered docs (filtered by a docsify plugin) + // but must still compile. + if trimmed.starts_with("@@@") { + in_header = false; + // Strip @@@ and optionally one following space + let code = trimmed[3..].trim_start(); + if code.contains("fn main") { + has_main = true; + } + if code.contains("gen_program!") { + has_gen_program = true; + } + code_lines.push(code.to_string()); + idx += 1; + continue; + } + // Parse header comments // Check for NOT VERIFIED marker if in_header && trimmed == "// NOT VERIFIED" { |
