From 1dd0f7c2e78657111e265fbc76f281f7850c38c5 Mon Sep 17 00:00:00 2001 From: Robert Griesemer Date: Fri, 15 Jan 2010 13:27:45 -0800 Subject: 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 --- src/pkg/exp/eval/expr.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/pkg/exp/eval/expr.go') diff --git a/src/pkg/exp/eval/expr.go b/src/pkg/exp/eval/expr.go index 8e161e522..27aea0877 100644 --- a/src/pkg/exp/eval/expr.go +++ b/src/pkg/exp/eval/expr.go @@ -578,7 +578,7 @@ func (a *exprCompiler) compile(x ast.Expr, callCtx bool) *expr { } case *ast.Ident: - return ei.compileIdent(a.block, a.constant, callCtx, x.Value) + return ei.compileIdent(a.block, a.constant, callCtx, x.Name()) case *ast.IndexExpr: l, r := a.compile(x.X, false), a.compile(x.Index, false) @@ -612,7 +612,7 @@ func (a *exprCompiler) compile(x ast.Expr, callCtx bool) *expr { if v == nil { return nil } - return ei.compileSelectorExpr(v, x.Sel.Value) + return ei.compileSelectorExpr(v, x.Sel.Name()) case *ast.StarExpr: // We pass down our call context because this could be -- cgit v1.2.3