func (d *deps) addDepsToGlobal(ident *ast.Identifier, node ast.Node, scopes depScopes) {
	if scopes == nil {
		scopes = depScopes{map[string]struct{}{}}
	}
	if d.d[ident] == nil {
		d.d[ident] = []*ast.Identifier{}
	}
	for _, dep := range d.nodeDeps(node, scopes) {
		if dep.Name == "_" {
			continue
		}
		alreadyAdded := false
		for _, d := range d.d[ident] {
			if d.Name == dep.Name {
				alreadyAdded = true
				break
			}
		}
		if !alreadyAdded {
			d.d[ident] = append(d.d[ident], dep)
		}
	}
}
addDepsToGlobal adds all identifiers that appear in node and in its children
as dependency of the global identifier ident.
package compiler
import (
	"fmt"
	"github.com/open2b/scriggo/ast"
)
type packageDeclsDeps map[*ast.Identifier][]*ast.Identifier
type deps struct {
	d packageDeclsDeps
	itea                     map[string][]*ast.Identifier
	analyzingVarExprWithItea *ast.Identifier
}