Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(3725)

Delta Between Two Patch Sets: src/pkg/go/parser/interface.go

Issue 189080: code review 189080: Steps towards tracking scopes for identifiers. (Closed)
Left Patch Set: code review 189080: Steps towards tracking scopes for identifiers. Created 15 years, 2 months ago
Right Patch Set: code review 189080: Steps towards tracking scopes for identifiers. Created 15 years, 2 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « src/pkg/go/doc/doc.go ('k') | src/pkg/go/parser/parser.go » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
1 // Copyright 2009 The Go Authors. All rights reserved. 1 // Copyright 2009 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style 2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file. 3 // license that can be found in the LICENSE file.
4 4
5 // This file contains the exported entry points for invoking the parser. 5 // This file contains the exported entry points for invoking the parser.
6 6
7 package parser 7 package parser
8 8
9 import ( 9 import (
10 "bytes" 10 "bytes"
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 } 153 }
154 154
155 pkgs := make(map[string]*ast.Package) 155 pkgs := make(map[string]*ast.Package)
156 for i := 0; i < len(list); i++ { 156 for i := 0; i < len(list); i++ {
157 entry := &list[i] 157 entry := &list[i]
158 if filter == nil || filter(entry) { 158 if filter == nil || filter(entry) {
159 src, err := ParseFile(pathutil.Join(path, entry.Name), n il, mode) 159 src, err := ParseFile(pathutil.Join(path, entry.Name), n il, mode)
160 if err != nil { 160 if err != nil {
161 return pkgs, err 161 return pkgs, err
162 } 162 }
163 » » » name := src.Name.Value() 163 » » » name := src.Name.Name()
164 pkg, found := pkgs[name] 164 pkg, found := pkgs[name]
165 if !found { 165 if !found {
166 pkg = &ast.Package{name, path, make(map[string]* ast.File)} 166 pkg = &ast.Package{name, path, make(map[string]* ast.File)}
167 pkgs[name] = pkg 167 pkgs[name] = pkg
168 } 168 }
169 pkg.Files[entry.Name] = src 169 pkg.Files[entry.Name] = src
170 } 170 }
171 } 171 }
172 172
173 return pkgs, nil 173 return pkgs, nil
174 } 174 }
LEFTRIGHT

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b