class RuboCop::AST::NodePattern::Compiler

def compile_funcall(method)

def compile_funcall(method)
  # call a method in the context which this pattern-matching
  # code is used in. pass target value as an argument
  method = method[1..-1] # drop the leading #
  if method.end_with?('(') # is there an arglist?
    args = compile_args(tokens)
    method = method[0..-2] # drop the trailing (
    "#{method}(#{CUR_ELEMENT},#{args.join(',')})"
  else
    "#{method}(#{CUR_ELEMENT})"
  end
end