Example #1
0
 public boolean hasTail() {
   if (hasPayload()) {
     return seq != null;
   } else {
     return seq != null && seq.tail() != null;
   }
 }
Example #2
0
 public Seq<Pattern> tail() {
   if (!generated) {
     generate();
   }
   if (hasPayload()) {
     return seq;
   } else {
     return (seq == null) ? null : seq.tail();
   }
 }
Example #3
0
 public Pattern head() {
   if (!generated) {
     generate();
   }
   if (hasPayload()) {
     return wrap(token);
   } else {
     return (seq == null) ? null : seq.head();
   }
 }