class Sass::Script::Parser

def arglist(type, subexpr)

def arglist(type, subexpr)
  return unless e = send(subexpr)
  if @lexer.peek && @lexer.peek.type == :colon
    name = e
    @lexer.expected!("comma") unless name.is_a?(Variable)
    assert_tok(:colon)
    keywords = {name.underscored_name => assert_expr(subexpr, EXPR_NAMES[type])}
  end
  unless try_tok(:comma)
    return [], keywords if keywords
    return [e], {}
  end
  other_args, other_keywords = assert_expr(type)
  if keywords
    if other_keywords[name.underscored_name]
      raise SyntaxError.new("Keyword argument \"#{name.to_sass}\" passed more than once")
    end
    return other_args, keywords.merge(other_keywords)
  else
    return [e, *other_args], other_keywords
  end
end