Exemple #1
0
 public Func shift(int shift) {
   switch (m_type) {
     case VAR:
       return new Func(m_index + shift);
     case CONST:
       return this;
     case UNOP:
       return new Func(m_uop, m_right.shift(shift));
     case BINOP:
       return new Func(m_left.shift(shift), m_bop, m_right.shift(shift));
     default:
       return null;
   }
 }
Exemple #2
0
 public SpecialFunc shift(int shift) {
   return new SpecialFunc(m_utype, m_func.shift(shift));
 }