#NEWLINE# @ pg . production ( 'function-decl : DEF var formal-list rtype NL' ) #NEWLINE# def function_decl( s , p ) : #NEWLINE# #INDENT# res = ast . Decl ( s . pos ( p [ 0 ] ) ) #NEWLINE# res . decor = set ( ) #NEWLINE# res . name = p [ 1 ] #NEWLINE# res . args = p [ 2 ] #NEWLINE# res . rtype = p [ 3 ] #NEWLINE# return res