Skip to main content

is_bindable_name

Function is_bindable_name 

Source
pub fn is_bindable_name(name: &str) -> bool
Expand description

Can name be bound and then referenced from Elly source as a plain name? It must be a Muon <sym> and pass the same tests plain_name applies to a binding’s left-hand side: not a keyword, not a __ reserved name, not the discard _, and not something that reads_as_number accepts.

This is the rule for names a host binds from outside a program — the PyO3 elly.Env prelude — where there is no left-hand side to parse but source must still be able to read the binding back. Keep it in step with plain_name; crates/elly-core/tests/module.rs pins the two together.