예제 #1
0
def p_primary_super(p):
    'primary : SUPER'
    if (current_storage_kind == 'instance'):
        p[0] = ast.SuperExpr(p.lineno(1))
    else:
        signal_error("'super' expression cannot be used in a static context",
                     p.lineno(1))
        p[0] = None
예제 #2
0
def p_primary_super(p):
    'primary : SUPER'
    p[0] = ast.SuperExpr(p.lineno(1))