#NEWLINE# def _funcbody( self ) : #NEWLINE# #INDENT# "Parse a funcbody.\n\n        funcbody ::= '(' [parlist] ')' block end\n\n\tparlist ::= namelist [',' '...'] | '...'\n\n        Returns:\n          FunctionBody(parlist, dots, block)\n        " #NEWLINE# pos = self . _pos #NEWLINE# if ( self . _accept ( lexer . TokSymbol ( '(' ) ) is None ) : #NEWLINE# #INDENT# return None #NEWLINE# #UNINDENT# namelist = self . _namelist ( ) #NEWLINE# dots = None #NEWLINE# if ( namelist is not None ) : #NEWLINE# #INDENT# if ( self . _accept ( lexer . TokSymbol ( ',' ) ) is not None ) : #NEWLINE# #INDENT# dots_pos = self . _pos #NEWLINE# dots = self . _expect ( lexer . TokSymbol ( '...' ) ) #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# dots_pos = self . _pos #NEWLINE# dots = self . _accept ( lexer . TokSymbol ( '...' ) ) #NEWLINE# #UNINDENT# if ( dots is not None ) : #NEWLINE# #INDENT# dots = VarargDots ( start = dots_pos , end = self . _pos ) #NEWLINE# #UNINDENT# self . _expect ( lexer . TokSymbol ( ')' ) ) #NEWLINE# block = self . _assert ( self . _chunk ( ) , 'block in funcbody' ) #NEWLINE# self . _expect ( lexer . TokKeyword ( 'end' ) ) #NEWLINE# return FunctionBody ( namelist , dots , block , start = pos , end = self . _pos )