Skip to main content

implicit_main

Function implicit_main 

Source
pub fn implicit_main(source: &str) -> Option<String>
Expand description

IMPLICIT MAIN: a source with no ## headers whose first non-blank line reads as an imperative statement runs as its own ## Main body, so a bare script runs rather than parsing as logic prose. Natural-language documents (no statement-keyword opening) are untouched. Returns the wrapped source, or None when the input is not a bare script.