class Sass::Compiler::Host::FunctionRegistry
def function_call(function_call_request)
def function_call(function_call_request) oneof = function_call_request.identifier identifier = function_call_request.public_send(oneof) function = case oneof when :name @functions_by_name[identifier] when :function_id @functions_by_id[identifier] else raise ArgumentError, "Unknown FunctionCallRequest.identifier #{identifier}" end arguments = function_call_request.arguments.map do |argument| protofier.from_proto(argument) end success = protofier.to_proto(function.call(arguments)) accessed_argument_lists = arguments.filter_map do |argument| if argument.is_a?(Sass::Value::ArgumentList) && argument.instance_variable_get(:@keywords_accessed) argument.instance_variable_get(:@id) end end EmbeddedProtocol::InboundMessage::FunctionCallResponse.new( id: function_call_request.id, success:, accessed_argument_lists: ) rescue StandardError => e EmbeddedProtocol::InboundMessage::FunctionCallResponse.new( id: function_call_request.id, error: e.full_message(highlight: @highlight, order: :top) ) end