def p_end_function(p): """ top : top END_FUNCTION """ p[0] = p[1] p[0].append(node.return_stmt(ret=ret_expr)) p[0].append(node.comment_stmt("\nif __name__ == '__main__':\n pass"))
def p_comment_stmt(p): """ comment_stmt : COMMENT """ p[0] = node.comment_stmt(p[1])