package edit

import (
	
	

	
	
)

// Calls the passed function for each variable name in namespace ns that can be
// found from the top context.
func (,  *eval.Ns,  string,  func( string)) {
	switch  {
	case "", ":":
		.IterateNames()
		.IterateNames()
	case "e:":
		fsutil.EachExternal(func( string) {
			( + eval.FnSuffix)
		})
	case "E:":
		for ,  := range os.Environ() {
			if  := strings.IndexByte(, '=');  > 0 {
				([:])
			}
		}
	default:
		 := eval.SplitQNameSegs()
		 := .IndexName([0])
		if  == nil {
			 = .IndexName([0])
		}
		for ,  := range [1:] {
			if  == nil {
				return
			}
			 = .Get().(*eval.Ns).IndexName()
		}
		if  != nil {
			.Get().(*eval.Ns).IterateNames()
		}
	}
}

// Calls the passed function for each namespace that can be used from the top
// context.
func (,  *eval.Ns,  func( string)) {
	("e:")
	("E:")

	.IterateNames(func( string) {
		if strings.HasSuffix(, eval.NsSuffix) {
			()
		}
	})

	.IterateNames(func( string) {
		if strings.HasSuffix(, eval.NsSuffix) {
			()
		}
	})
}