code: func (p *Path) String() string {
  	// make a slice to iterate
  	elems := []*Path{}
  	for ; p != nil; p = p.parent {
  		elems = append(elems, p)
  	}
  
  	// iterate, but it has to be backwards
  	buf := bytes.NewBuffer(nil)
  	for i := range elems {
  		p := elems[len(elems)-1-i]
  		if p.parent != nil && len(p.name) > 0 {
  			// This is either the root or it is a subscript.
  			buf.WriteString(".")
  		}
  		if len(p.name) > 0 {
  			buf.WriteString(p.name)
  		} else {
  			fmt.Fprintf(buf, "[%s]", p.index)
  		}
  	}
  	return buf.String()
  }
docs: // String produces a string representation of the Path.