Skip to main content

is_reserved_ident

Function is_reserved_ident 

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

Bare identifiers that resolve to a literal. Resolved before the variable lookup so they cannot be shadowed; an unknown bare name still errors. Whether name is already resolved by the grammar — a built-in variable (the reserved [latch] placeholders included), a named constant, or a function.

The loader’s guard against a [latch] name nothing could reach. Latch names resolve last in Parser::parse_primary, so a latch called bass would silently be the band and one called sin would fail as a call — either way the author debugs a preset that is doing exactly what it was told. Rejecting the collision at load is what makes that resolution order unobservable.