Beispiel #1
0
 def gen(self):
     if self.val:
         from helper import isString
         if isString(self.val):
             append(self.val)
         elif hasattr(self.val, 'gen'):
             self.val.gen()
Beispiel #2
0
def p_InDecrement(p):
    '''
    InDecrement : INDECREMENT Assignable 
                | Assignable INDECREMENT
    '''
    from helper import isString
    if isString(p[1]):
        p[0] = InDecrement(p[1], p[2], False)
    else:
        p[0] = InDecrement(p[2], p[1], True)