(self)
return FunctionBody(namelist, dots, block, start=pos, end=self._pos)
Parse a funcbody.

        funcbody ::= '(' [parlist] ')' block end

        parlist ::= namelist [',' '...'] | '...'

        Returns:
          FunctionBody(parlist, dots, block)
Parse a funcbody.
Parse a funcbody .
def _funcbody(self):
        """Parse a funcbody.

        funcbody ::= '(' [parlist] ')' block end

        parlist ::= namelist [',' '...'] | '...'

        Returns:
          FunctionBody(parlist, dots, block)
        """
        pos = self._pos
        if self._accept(lexer.TokSymbol(b'(')) is None:
            return None

        namelist = self._namelist()
        dots = None
        if namelist is not None:
            if self._accept(lexer.TokSymbol(b',')) is not None:
                dots_pos = self._pos
                dots = self._expect(lexer.TokSymbol(b'...'))
        else:
            dots_pos = self._pos
            dots = self._accept(lexer.TokSymbol(b'...'))
        if dots is not None:
            dots = VarargDots(start=dots_pos, end=self._pos)

        self._expect(lexer.TokSymbol(b')'))
        block = self._assert(self._chunk(), 'block in funcbody')
        self._expect(lexer.TokKeyword(b'end'))

        return FunctionBody(namelist, dots, block, start=pos, end=self._pos)
def _funcbody ( self ) : pos = self . _pos if self . _accept ( lexer . TokSymbol ( b'(' ) ) is None : return None namelist = self . _namelist ( ) dots = None if namelist is not None : if self . _accept ( lexer . TokSymbol ( b',' ) ) is not None : dots_pos = self . _pos dots = self . _expect ( lexer . TokSymbol ( b'...' ) ) else : dots_pos = self . _pos dots = self . _accept ( lexer . TokSymbol ( b'...' ) ) if dots is not None : dots = VarargDots ( start = dots_pos , end = self . _pos ) self . _expect ( lexer . TokSymbol ( b')' ) ) block = self . _assert ( self . _chunk ( ) , 'block in funcbody' ) self . _expect ( lexer . TokKeyword ( b'end' ) ) return FunctionBody ( namelist , dots , block , start = pos , end = self . _pos )