'grammar: def name [( [arg [= val], ...][,*vararg], [, &blockarg])]'

def parse_method_args(self, curr_node):

    tok = self.tokenizer.get_next_token()
    if (not self.classifier.is_operator(tok, '(')):
        self.tokenizer.put_back(tok)
        return
    tok = self.tokenizer.get_next_token()
    if self.classifier.is_operator(tok, ')'):
        return
    self.tokenizer.put_back(tok)
    while 1:
        have_equals = False
        tok = self.tokenizer.get_next_token()
        extra_info = ''
        if (self.classifier.is_any_operator(tok) and (len(tok['text']) == 1) and ('*&'.find(tok['text']) >= 0)):
            extra_info = tok['text']
            tok = self.tokenizer.get_next_token()
        if self.classifier.is_identifier(tok, True):
            txt = tok['text']
            if (txt[(-1)] == '='):
                txt = txt[:(-1)]
                have_equals = True
            curr_node.add_arg(txt, extra_info)
        else:
            return
        if (not have_equals):
            tok = self.tokenizer.get_next_token()
            if self.classifier.is_operator(tok, '='):
                have_equals = True
        if have_equals:
            self.parse_simple_expn(True)
            tok = self.tokenizer.get_next_token()
        if (tok['style'] == shared_lexer.EOF_STYLE):
            return
        elif self.classifier.is_operator(tok, ')'):
            return
        elif (self.classifier.is_keyword(tok, 'end') and (self.compare_curr_ind() <= 0)):
            self.tokenizer.put_back(tok)
            return
        elif self.classifier.is_operator(tok, ','):
            pass
        else:
            self.tokenizer.put_back(tok)
            return
