       throw new Error "No matches found!"
 
         
-
     # Create a DOM range object
 #    console.log "Building range..."
     r = @rootWin.document.createRange()

            match.start = start - mapping.start
            match.end = end - mapping.start
            match.wanted = mapping.pathInfo.content.substr match.start, match.end - match.start
        @computeSourcePositions match
        match.yields = mapping.pathInfo.node.data.substr match.startCorrected, match.endCorrected - match.startCorrected
        matches.push match

    if matches.length is 0
#      console.log "Wanted: [" + start + ":" + end + "], found: "

  # If the "path" argument is supplied, scan is called automatically.
  # (Except if the supplied path is the same as the last scanned path.)
  getMappingsForRange: (start, end, path = null) ->
    unless (start? and end?) then throw new Error "start and end is required!"    
#    console.log "Collecting matches for [" + start + ":" + end + "]"
    if path? then @scan path

    unless @scannedPath? then throw new Error "Can not run getMappingsFor() without existing mappings. Either supply a path to scan, or call scan() beforehand!"

    # Collect the matching mappings
#    console.log "Collecting mappings"
    matches = []
    for p, mapping of @mappings when mapping.atomic and @regions_overlap mapping.start, mapping.end, start, end
      do (mapping) =>
