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

Method declared_names

codegraph-kernel/src/go.rs:997–1003  ·  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

995 /// declaration's own type parameters, and its own name, which in a
996 /// recursive type is the declaration itself.
997 fn declared_names(&self, decl: Node<'t>) -> HashSet<&'t str> {
998 let mut names = self.type_parameter_names(decl);
999 if let Some(name) = decl.child_by_field_name("name") {
1000 names.insert(self.text(name));
1001 }
1002 names
1003 }
1004
1005 /// goTypeParameterNames (languages/go.ts): the type parameters a type
1006 /// 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