class Sass::Script::Parser
def defn_arglist!(must_have_default)
def defn_arglist!(must_have_default) return [] unless try_tok(:lparen) return [] if try_tok(:rparen) res = [] loop do line = @lexer.line offset = @lexer.offset + 1 c = assert_tok(:const) var = Script::Variable.new(c.value) if tok = (try_tok(:colon) || try_tok(:single_eq)) val = assert_expr(:concat) if tok.type == :single_eq val.context = :equals val.options = @options Script.equals_warning("mixin argument defaults", "$#{c.value}", val.to_sass, false, line, offset, @options[:filename]) end must_have_default = true elsif must_have_default raise SyntaxError.new("Required argument #{var.inspect} must come before any optional arguments.") end res << [var, val] break unless try_tok(:comma) end assert_tok(:rparen) res end