 
   # Matches interpolated JavaScript.
   js_token: ->
-    return false unless script: @match JS, 1
+    return false unless script: @balanced_token ['`', '`']
     @token 'JS', script.replace(JS_CLEANER, '')
     @i += script.length
     true

    @i += regex.length
    true

  # Matches a balanced group such as a single or double-quoted string.
  balanced_group: (delimited...) ->
    (each[1]: each[0]) for each in delimited when not each[1]?
    (each[2]: '\\') for each in delimited when not each[2]?
    levels: []
    i: 0
    while i < @chunk.length
      for each, type in delimited
        if each[2] isnt false and @chunk.substring(i, i + each[2].length) is each[2]
          i += each[2].length
          break
        else if levels.length and @chunk.substring(i, i + each[1].length) is each[1] and levels[levels.length - 1] is type
          levels.pop()


  # Matches strings, including multi-line strings.
  string_token: ->
    string: @balanced_token ['"', '"'], ['${', '}']
    string: @balanced_token ["'", "'"] if string is false
    return false unless string
    @interpolate_string string.replace STRING_NEWLINES, " \\\n"
    @line += count string, "\n"
