示例#1
0
def p_fDef(p):
    """fDef : DEF NAME defTuple ARROW EXCLAMATION NAME block"""
    p[0] = Node("Fdef")
    p[0].func = p[2]
    p[0].args = p[3]
    p[0].rettype = p[6]
    p[0].body = p[7]
示例#2
0
def p_fcall(p):
    '''fcall : unary_expr tuple
                | fcall tuple
    '''
    p[0] = Node('FCALL')
    p[0].func = p[1]
    p[0].args = p[2].elems
示例#3
0
def p_fCall2(p):
    """fCall : load LPAREN expr RPAREN
    """
    p[0] = Node("Fcall")
    p[0].func = p[1]
    p[0].args = [p[3]]
示例#4
0
def p_fCall1(p):
    """fCall : load LPAREN exprList RPAREN
    """
    p[0] = Node("Fcall")
    p[0].func = p[1]
    p[0].args = p[3]
示例#5
0
def p_fptr(p):
    '''fptr : tuple ARROW IDENTIFIER
    '''
    p[0] = Node('FPTR')
    p[0].args = p[1].elems
    p[0].func = p[3]