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

Method get

src/completion/variable/forward_walk.rs:1847–1851  ·  view source on GitHub ↗

Look up a variable's types. Returns an empty slice when the variable has not been assigned.

(&self, var_name: &str)

Source from the content-addressed store, hash-verified

1845 /// Look up a variable's types. Returns an empty slice when the
1846 /// variable has not been assigned.
1847 pub fn get(&self, var_name: &str) -> &[ResolvedType] {
1848 self.locals
1849 .get(&atom(var_name))
1850 .map_or(&[], |v| v.as_slice())
1851 }
1852
1853 /// Check whether a variable exists in scope (even if its type list is empty).
1854 pub fn contains(&self, var_name: &str) -> bool {

Calls 1

atomFunction · 0.85