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

Method constant_loader

src/resolution.rs:916–918  ·  view source on GitHub ↗

Return a constant-value-loader closure. The returned closure looks up a global constant name and returns `Some(Some(value))` when found with a known value, `Some(None)` when found without a value, and `None` when not found.

(&self)

Source from the content-addressed store, hash-verified

914 /// `Some(None)` when found without a value, and `None` when not
915 /// found.
916 pub(crate) fn constant_loader(&self) -> impl Fn(&str) -> Option<Option<String>> + '_ {
917 move |name: &str| self.lookup_global_constant(name)
918 }
919}

Callers 1

runFunction · 0.45

Calls 1

Tested by

no test coverage detected