Example #1
0
 /**
  * Copies this expression's return type and size to the given expression.
  *
  * @param <T> expression type
  * @param ex expression
  * @return the expression for convenience
  */
 protected final <T extends ParseExpr> T copyType(final T ex) {
   ex.seqType = seqType;
   ex.size = size;
   return ex;
 }
Example #2
0
 /**
  * Copies fields to the given object.
  *
  * @param <T> object type
  * @param p copy
  * @return the copy
  */
 protected final <T extends Preds> T copy(final T p) {
   p.last = last;
   p.pos = pos;
   return copyType(p);
 }