code: func hcl1NodeEndPos(node hcl1ast.Node) hcl1token.Pos {
  	switch tn := node.(type) {
  	case *hcl1ast.ObjectItem:
  		if tn.LineComment != nil && len(tn.LineComment.List) > 0 {
  			return tn.LineComment.List[len(tn.LineComment.List)-1].Start
  		}
  		return hcl1NodeEndPos(tn.Val)
  	case *hcl1ast.ListType:
  		return tn.Rbrack
  	case *hcl1ast.ObjectType:
  		return tn.Rbrace
  	default:
  		// If all else fails, we'll just return the position of what we were given.
  		return tn.Pos()
  	}
  }
docs: // hcl1NodeEndPos tries to find the latest possible position in the given
  // node. This is primarily to try to find the last line number of a multi-line
  // construct and is a best-effort sort of thing because HCL1 only tracks
  // start positions for tokens and has no generalized way to find the full
  // range for a single node.