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

Method process_data

declcache.go:104–117  ·  view source on GitHub ↗
(data []byte)

Source from the content-addressed store, hash-verified

102}
103
104func (f *decl_file_cache) process_data(data []byte) {
105 var file *ast.File
106 f.fset = token.NewFileSet()
107 file, f.error = parser.ParseFile(f.fset, "", data, 0)
108 f.filescope = new_scope(nil)
109 for _, d := range file.Decls {
110 anonymify_ast(d, 0, f.filescope)
111 }
112 f.packages = collect_package_imports(f.name, file.Decls, f.context)
113 f.decls = make(map[string]*decl, len(file.Decls))
114 for _, decl := range file.Decls {
115 append_to_top_decls(f.decls, decl, f.filescope)
116 }
117}
118
119func append_to_top_decls(decls map[string]*decl, decl ast.Decl, scope *scope) {
120 foreach_decl(decl, func(data *foreach_decl_struct) {

Callers 2

read_fileMethod · 0.95
aproposMethod · 0.45

Calls 4

new_scopeFunction · 0.85
anonymify_astFunction · 0.85
collect_package_importsFunction · 0.85
append_to_top_declsFunction · 0.85

Tested by

no test coverage detected