(data []byte)
| 102 | } |
| 103 | |
| 104 | func (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 | |
| 119 | func append_to_top_decls(decls map[string]*decl, decl ast.Decl, scope *scope) { |
| 120 | foreach_decl(decl, func(data *foreach_decl_struct) { |
no test coverage detected