         i += 1
       tokens.push ['STRING', "$quote${ str.substring(pi, i) }$quote"] if pi < i and pi < str.length - 1
       tokens.unshift ['STRING', "''"] unless tokens[0][0] is 'STRING'
-      if (merge ? true)
-        for each, i in tokens
-          if each[0] is 'TOKENS'
-            @tokens: @tokens.concat each[1]
-          else
-            @token each[0], each[1]
-          @token '+', '+' if i < tokens.length - 1
+      for token, i in tokens
+        [tag, value]: token
+        if tag is 'TOKENS'
+          @tokens: @tokens.concat value
+        else if tag is 'STRING' and escape_quotes
+          escaped: value.substring(1, value.length - 1).replace(/"/g, '\\"')
+          @token tag, "\"$escaped\""
+        else
+          @token tag, value
+        @token '+', '+' if i < tokens.length - 1
       tokens
 
   # Helpers

  # If it encounters an interpolation, this method will recursively create a
  # new Lexer, tokenize the interpolated contents, and merge them into the
  # token stream.
  interpolate_string: (str, merge) ->
    if str.length < 3 or not starts str, '"'
      @token 'STRING', str
    else

    return false unless string:
      @balanced_token(['"', '"'], ['${', '}']) or
      @balanced_token ["'", "'"]
    @interpolate_string string.replace(STRING_NEWLINES, " \\\n")
    @line += count string, "\n"
    @i += string.length
    true
