MCPcopy Create free account
hub / github.com/nsf/gocode / add_decl

Method add_decl

scope.go:43–50  ·  view source on GitHub ↗
(name string, d *decl)

Source from the content-addressed store, hash-verified

41}
42
43func (s *scope) add_decl(name string, d *decl) *decl {
44 decl, ok := s.entities[name]
45 if !ok {
46 s.entities[name] = d
47 return d
48 }
49 return decl
50}
51
52func (s *scope) replace_decl(name string, d *decl) {
53 s.entities[name] = d

Callers 2

add_named_declMethod · 0.95
add_package_to_scopeMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected