Skip to main content

referenced_names

Function referenced_names 

Source
pub fn referenced_names(text: &str) -> BTreeSet<String>
Expand description

Parse text as a single Polydat expression and return the set of free names it references — wire/param/coordinate identifiers, FieldAccess source names, and {name} interpolation references inside string literals. Function callee names are excluded (they resolve in the function registry).

Returns an empty set when text does not lex/parse as a single expression. Callers that need to distinguish “no references” from “not an expression” should use try_referenced_names.