Esempio n. 1
0
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"))
Esempio n. 2
0
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"))
Esempio n. 3
0
def p_comment_stmt(p):
    """
    comment_stmt : COMMENT
    """
    p[0] = node.comment_stmt(p[1])
Esempio n. 4
0
def p_comment_stmt(p):
    """
    comment_stmt : COMMENT
    """
    p[0] = node.comment_stmt(p[1])