def get_gradient_var(self):
     temp_ir = ir.Var("@_gradient", absyn.Empty(0), fracttypes.Gradient)
     var = self.var(temp_ir)
     return var
 def setUp(self):
     self.fakeNode = absyn.Empty(0)
     self.codegen = codegen.T(fsymbol.T())
     self.parser = fractparser.parser
Exemple #3
0
def p_empty(t):
    'empty :'
    t[0] = absyn.Empty(t.lineno(0))
Exemple #4
0
def p_ifbody(t):
    '''ifbody : exp NEWLINE stmlist
       ifbody : exp COMMA stmlist'''
    t[0] = absyn.If(t[1], t[3], [absyn.Empty(t.lineno(1))], t.lineno(1))
 def setUp(self):
     self.fakeNode = absyn.Empty(0)
     self.canon = canon.T(fsymbol.T())