logicaffeine_compile/semantics/escape.rs
1//! `Escape to Rust:` — raw Rust source embedded in a program, which only the Rust backends compile.
2//!
3//! Every other backend refuses a program that reaches one, and they all refuse it with [`REFUSAL`], so the
4//! refusal is one message wherever it happens: the tree-walker, the VM, and every lowering of the VM's
5//! bytecode report these words and no others.
6
7/// The reason every backend but the two Rust backends refuses an `Escape to Rust:` block or expression.
8pub const REFUSAL: &str =
9 "`Escape to Rust:` holds raw Rust code, which only the Rust backends compile. \
10 Use `largo build` or `largo run` to compile and run this program.";