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