MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / declared_names

Method declared_names

codegraph-kernel/src/go.rs:969–975  ·  view source on GitHub ↗

goDeclaredNames (languages/go.ts): what a type name written bare inside a type declaration can mean without naming another type — the declaration's own type parameters, and its own name, which in a recursive type is the declaration itself.

(&self, decl: Node<'t>)

Source from the content-addressed store, hash-verified

967 /// declaration's own type parameters, and its own name, which in a
968 /// recursive type is the declaration itself.
969 fn declared_names(&self, decl: Node<'t>) -> HashSet<&'t str> {
970 let mut names = self.type_parameter_names(decl);
971 if let Some(name) = decl.child_by_field_name("name") {
972 names.insert(self.text(name));
973 }
974 names
975 }
976
977 /// goTypeParameterNames (languages/go.ts): the type parameters a type
978 /// declaration declares.

Callers 2

alias_type_namesMethod · 0.80

Calls 2

type_parameter_namesMethod · 0.80
textMethod · 0.65

Tested by

no test coverage detected