function patch(config, nodes, offset) {
  var index = -1
  var start = offset
  var end
  var node

  while (++index < nodes.length) {
    node = nodes[index]

    if (node.children) {
      patch(config, node.children, start)
    }

    end = start + toString(node).length

    node.position = {
      start: config.location.toPoint(start),
      end: config.location.toPoint(end)
    }

    start = end
  }

  return nodes
}
// `offset` is the offset in `file` this run of content starts at.
`offset` is the offset in `file` this run of content starts at.
` offset ` is the offset in ` file ` this run of content starts at .
function patch(config, nodes, offset) {
  var index = -1
  var start = offset
  var end
  var node
  while (++index < nodes.length) {
    node = nodes[index]
    if (node.children) {
      patch(config, node.children, start)
    }
    end = start + toString(node).length
    node.position = {
      start: config.location.toPoint(start),
      end: config.location.toPoint(end)
    }
    start = end
  }
  return nodes
}
function patch ( config , nodes , offset ) { var index = - 1 var start = offset var end var node while ( ++ index < nodes . length ) { node = nodes [ index ] if ( node . children ) { patch ( config , node . children , start ) } end = start + toString ( node ) . length node . position = { start : config . location . toPoint ( start ) , end : config . location . toPoint ( end ) } start = end } return nodes }
`offset` is the offset in `file` this run of content starts at.
` offset ` is the offset in ` file ` this run of content starts at .