Update comment

This commit is contained in:
Cheer Xiao 2015-01-19 22:37:38 +01:00
parent b6ff81693d
commit 73eb217cbb

View File

@ -140,7 +140,8 @@ func (cp *Compiler) mustResolveVar(name string, p parse.Pos) Type {
// ResolveVar returns the type of a variable with supplied name, found in // ResolveVar returns the type of a variable with supplied name, found in
// current or upper scopes. If such a variable is nonexistent, a nil is // current or upper scopes. If such a variable is nonexistent, a nil is
// returned. // returned. When the value to resolve is not on the current scope, it is added
// to cp.enclosed.
func (cp *Compiler) ResolveVar(name string) Type { func (cp *Compiler) ResolveVar(name string) Type {
thisScope := len(cp.scopes) - 1 thisScope := len(cp.scopes) - 1
for i := thisScope; i >= 0; i-- { for i := thisScope; i >= 0; i-- {