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