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