MCPcopy Create free account
hub / github.com/PHPantom-dev/phpantom_lsp / collect_compact_vars

Function collect_compact_vars

src/diagnostics/undefined_variables.rs:994–1000  ·  view source on GitHub ↗

Collect variable names referenced by `compact('var1', 'var2', …)` calls. These variables are used by string name and should be considered defined.

(statements: &[Statement<'_>])

Source from the content-addressed store, hash-verified

992/// calls. These variables are used by string name and should be
993/// considered defined.
994pub(crate) fn collect_compact_vars(statements: &[Statement<'_>]) -> HashSet<String> {
995 let mut vars = HashSet::new();
996 for stmt in statements {
997 collect_compact_from_stmt(stmt, &mut vars);
998 }
999 vars
1000}
1001
1002fn collect_compact_from_stmt(stmt: &Statement<'_>, vars: &mut HashSet<String>) {
1003 match stmt {

Callers 3

check_scopeFunction · 0.85
collect_from_statementFunction · 0.85

Calls 1

Tested by

no test coverage detected