summaryrefslogtreecommitdiff
path: root/src/pkg/go/printer/nodes.go
diff options
context:
space:
mode:
authorRobert Griesemer <gri@golang.org>2010-01-15 13:27:45 -0800
committerRobert Griesemer <gri@golang.org>2010-01-15 13:27:45 -0800
commit1dd0f7c2e78657111e265fbc76f281f7850c38c5 (patch)
treef7a2ae997c05b400635bc380102dd73102b05b0f /src/pkg/go/printer/nodes.go
parent2442a6ddd956d1a902282d9bef429c16348fcf37 (diff)
downloadgolang-1dd0f7c2e78657111e265fbc76f281f7850c38c5.tar.gz
Steps towards tracking scopes for identifiers.
- Identifiers refer now to the language entity (Object) that they denote. At the moment this is at best an approximation. - Initial data structures for language entities (Objects) and expression types (Type) independent of the actual type notations. - Initial support for declaring and looking up identifiers. - Updated various dependent files and added support functions. - Extensively tested to avoid breakage. This is an AST change. R=rsc CC=golang-dev, rog http://codereview.appspot.com/189080
Diffstat (limited to 'src/pkg/go/printer/nodes.go')
-rw-r--r--src/pkg/go/printer/nodes.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/pkg/go/printer/nodes.go b/src/pkg/go/printer/nodes.go
index 226e34572..29dc1737b 100644
--- a/src/pkg/go/printer/nodes.go
+++ b/src/pkg/go/printer/nodes.go
@@ -308,7 +308,7 @@ func identListSize(list []*ast.Ident, maxSize int) (size int) {
if i > 0 {
size += 2 // ", "
}
- size += len(x.Value)
+ size += len(x.Name())
if size >= maxSize {
break
}