'Returns an expression that matches the function call opened with
function_start_match.
Arguments:
file_contents: The contents of the JavaScript file.
function_start_match: A regex match representing the start of the function
call (e.g. ".escape(").
Returns:
An Expression that best matches the function.'

def _get_expression_for_function(self, file_contents, function_start_match):

    start_index = function_start_match.start()
    inner_start_index = function_start_match.end()
    result = self._find_closing_char_index(None, '(', ')', file_contents, start_index=inner_start_index)
    if (result is not None):
        end_index = (result['close_char_index'] + 1)
        expression = Expression(start_index, end_index, template=file_contents, start_delim=function_start_match.group(), end_delim=')')
    else:
        expression = Expression(start_index)
    return expression
